Re: [Neo4j] Enhanced API and HyperRelationships

2011-07-26 Thread Emil Eifrem
Hi Niels --

Very interesting stuff you're doing. Any chance that Scala app of your
is open source? Would love to see the impact of using your enhanced
API vs not using it.

Cheers,

-EE

On Tue, Jul 26, 2011 at 21:44, Niels Hoogeveen
pd_aficion...@hotmail.com wrote:

 I just ported my own application 12kloc of Scala code to use the Enhance API 
 and got it working. Of course more thorough testing needs to be done, but it 
 proves that at least in the case of my own application the Enhanced API can 
 work as a drop-in replacement.
 Niels

 From: pd_aficion...@hotmail.com
 To: user@lists.neo4j.org
 Date: Tue, 26 Jul 2011 22:13:59 +0200
 Subject: Re: [Neo4j] Enhanced API and HyperRelationships


 A first stab at implementing the Enhanced API and HyperRelationships is 
 finished. It still needs thorough testing, so this is PRE-ALPHA quality.It 
 also still lacks proper documentation (java docs).The source code can be 
 found 
 at:https://github.com/peterneubauer/graph-collections/tree/master/src/main/java/org/neo4j/collections/graphdbA
  description can be found 
 at:https://github.com/peterneubauer/graph-collections/wiki/Enhanced-APINiels
  From: pd_aficion...@hotmail.com
  To: user@lists.neo4j.org
  Date: Tue, 26 Jul 2011 01:02:20 +0200
  Subject: Re: [Neo4j] Enhanced API and HyperRelationships
 
 
  The implementation of HyperRelationships needs another day of work, though 
  the hard parts are finished now.
 
  Time to explain the inner workings of HyperRelationships.
 
  HyperRelationships are a generalization of the binary relationships found 
  in Neo4j.
 
  Instead of creating a relationship from a node to another node,
  we define a HyperRelationship as a set of Nodes each having a 
  RelationshipRole within the HyperRelationship.
 
  For the binary case the RelationshipRoles are StartNode and EndNode.
  For HyperRelationships with an arity higher than 2, the Roles need to be 
  defined for each HyperRelationshipType.
 
  A HyperRelationship is layed-out in the database as a regular relationship 
  in the binary case.
 
  For HyperRelationship with an arity higher than 2, a Node is created 
  subsuming the role of Relationship.
  From this Node, binary relationships (regular Neo4J relationships) are 
  created for each Element of the relationship.
 
  The RelationshipTypes of these binary relationships are a concatenation of 
  the name of the HyperRelationshipType used
  and the RelationshipRole of the attached Element.
 
  Example:
 
  Suppose we want to store the fact that Flo and Eddie give Tom, Dick and 
  Harry a Book.
 
  This is a ternary relationship, with the following RelationshipRoles:
 
  Giver: Flo and Eddie
  Recipient: Tom, Dick and Harry
  Gift: Book
 
  The GIVE relationship is first created with a Set of Roles (Giver, 
  Recipient and Gift).
  When the example relation is created the following binary relationships 
  will be create:
 
  HyperRelationshipNode --GIVE/#/Giver-- Flo
  HyperRelationshipNode --GIVE/#/Giver-- Eddie
  HyperRelationshipNode --GIVE/#/Recipient-- Tom
  HyperRelationshipNode --GIVE/#/Recipient-- Dick
  HyperRelationshipNode --GIVE/#/Recipient-- Harry
  HyperRelationshipNode --GIVE/#/Gift-- Book
 
  We can now retrieve all Relationships where Flo is the Giver in a GIVE 
  relationship,
  simply by concatenating GiVE and Giver into GIVE/#/Giver,
  and then ask all incoming Relationships with that RelationshipType.
 
  This fetches the HyperRelationship nodes and the other attached Elements 
  of the HyperRelationship can be loaded.
 
  I added an extra interface FunctionalRelationshipRole, which restricts the 
  number of Elements attached to a RelationshipRole within a 
  HyperRelationship to one.
 
  The use of this amounts to something similar to having a 
  getSingleRelationship method,
  which cannot throw an Exception, because multiple entries with the same 
  RelationshipType cannot be created by design.
 
  Niels
   From: pd_aficion...@hotmail.com
   To: user@lists.neo4j.org
   Date: Mon, 25 Jul 2011 02:03:54 +0200
   Subject: [Neo4j] Enhanced API and HyperRelationships
  
  
   Today I wrote a piece about the Enhanced API and about 
   HyperRelationships, I have been working on over the last couple of days.
  
   See: https://github.com/peterneubauer/graph-collections/wiki/Enhanced-API
  
   The API as presented in the graph-collections repo on Git is not feature 
   complete yet with respect to HyperRelationships.
   The interfaces are there, but the implementation only works for binary 
   relationships at present. Need one more day for the implementation.
  
   I posted the Wiki page and the source code to open the discussion about 
   these new features.
  
   Niels
   ___
   Neo4j mailing list
   User@lists.neo4j.org
   https://lists.neo4j.org/mailman/listinfo/user
 
  ___
  Neo4j mailing list
  User@lists.neo4j.org
  

Re: [Neo4j] Recent Experience with RingoJS (Rhino) and Neo4j

2011-06-10 Thread Emil Eifrem
On Tue, Jun 7, 2011 at 06:36, McKinley mckinley1...@gmail.com wrote:
 I will release a RingoJS package for Neo4j soon. Please let me know if you
 have any questions. If you would like to arrange a demonstration of Neo4j
 and RingoJS at your local meetup in San Francisco, Orange County or San
 Diego please let me know. I would love to present this effective and
 interesting combination and answer more questions.

As Michael said, great post! Please point us to a blogified version if
you get around to it (or as a guest post on blog.neo4j.org). I think
Andreas Kollegger (who's running the SF meetups) would love to have
you present at the next available free slot.

Great work!

Cheers,

-- 
Emil Eifrém, CEO [e...@neotechnology.com]
Neo Technology, www.neotechnology.com
Cell: +46 733 462 271 | US: 206 403 8808
http://blogs.neotechnology.com/emil
http://twitter.com/emileifrem
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Paddys TransportDublin = awesome!

2011-05-26 Thread Emil Eifrem
Really really cool. Good job!

-EE

On Thu, May 26, 2011 at 10:52, Patrick Fitzgerald paddyf...@gmail.com wrote:
 Thanks Peter, But really its Neo4j = awesome! :)

 On Thu, May 26, 2011 at 5:27 AM, Peter Neubauer 
 peter.neuba...@neotechnology.com wrote:

 All,
 if you haven't checked it out, look at Paddy Fitzgeralds
 http://www.transportdublin.ie/ - routing through Dublin, done with Neo4j
 Spatial and other magic on top of OpenStreetMap. VERY cool and well done,
 Paddy!

 Cheers,

 /peter neubauer

 GTalk:      neubauer.peter
 Skype       peter.neubauer
 Phone       +46 704 106975
 LinkedIn   http://www.linkedin.com/in/neubauer
 Twitter      http://twitter.com/peterneubauer

 http://www.neo4j.org               - Your high performance graph database.
 http://startupbootcamp.org/    - Öresund - Innovation happens HERE.
 http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party.
 ___
 Neo4j mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user

 ___
 Neo4j mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user




-- 
Emil Eifrém, CEO [e...@neotechnology.com]
Neo Technology, www.neotechnology.com
Cell: +46 733 462 271 | US: 206 403 8808
http://blogs.neotechnology.com/emil
http://twitter.com/emileifrem
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Taking a Snapshot.

2011-04-16 Thread Emil Eifrem
Guru --

I think the online backup functionality may be what you're looking for:

   http://docs.neo4j.org/chunked/stable/operations-backup.html

It's a feature that's not available in Neo4j Community, but in Neo4j
Enterprise (which you can get under the AGPL or a commercial license,
see http://neo4j.org/licensing-guide/).

Hope that helps!

Cheers,

-EE

On Fri, Apr 15, 2011 at 23:25, Guru GV guru...@gmail.com wrote:
 I have a use case :
  - An embedded Neo4j DB is constantly being written and updated into. At any
 point of time I would like to take a snapshot of the same and use it for
 analysis of the state at that particular time.If the data changes in between
 - then the snapshot not be inconsistent with the correct state of particular
 moment of time of interest.

  Is there a way Neo4j provides for such a usecase directly or indirectly ?

 thanks
 Guru
 ___
 Neo4j mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user




-- 
Emil Eifrém, CEO [e...@neotechnology.com]
Neo Technology, www.neotechnology.com
Cell: +46 733 462 271 | US: 206 403 8808
http://blogs.neotechnology.com/emil
http://twitter.com/emileifrem
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Taking a Snapshot.

2011-04-16 Thread Emil Eifrem
On Fri, Apr 15, 2011 at 23:47, Guru GV guru...@gmail.com wrote:
 What happens if I initiate the Backup and then couple of more transactions
 are performed on the DB and only after that the Backup finishes.
 In that case - is it guaranteed that the those Txs (that started after the
 backup was initiated)* are not included* and the backup that I get is
 exactly what the *DB was at the point of time I requested for a backup ?*

Yes. It will behave as you expect in the scenario you outline.

Cheers,

-- 
Emil Eifrém, CEO [e...@neotechnology.com]
Neo Technology, www.neotechnology.com
Cell: +46 733 462 271 | US: 206 403 8808
http://blogs.neotechnology.com/emil
http://twitter.com/emileifrem
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Seattle neo4j meetup proposed

2011-04-16 Thread Emil Eifrem
Indeed, let's definitely set something up next time I'm in Seattle. I
have a travel heavy schedule over the next few weeks (that doesn't
include Seattle) but after that we should be able to find some time!

-EE

On Sat, Apr 16, 2011 at 09:14, Saikat Kanjilal sxk1...@hotmail.com wrote:

 Hi Emil,When you come up to Seattle next time how about Chris Walters, you 
 and Savas and I get together?  Let us know when you're coming and we can have 
 some good grbeers (graph-beers) and conversation?  If anyone else is 
 interested please ping me.
 Regards

 CC: user@lists.neo4j.org
 From: sxk1...@hotmail.com
 Date: Sat, 16 Apr 2011 08:12:41 -0700
 To: user@lists.neo4j.org
 Subject: Re: [Neo4j] Seattle neo4j meetup proposed

 Ummm graph beers, nothing better than that :), I know Bradford because he 
 organizes the high scalability meetings in this area.

 Sent from my iPhone

 On Apr 16, 2011, at 7:49 AM, Jim Webber j...@neotechnology.com wrote:

  Hi Saikat,
 
  Savas Parastatidis and Bradford Stephens had a bit of a twitter exchange 
  about this. And Emil visits Seattle reasonably often too.
 
  Seems there's at least the four of you that could get some graph-beers on.
 
  Jim
  ___
  Neo4j mailing list
  User@lists.neo4j.org
  https://lists.neo4j.org/mailman/listinfo/user
 
 ___
 Neo4j mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user

 ___
 Neo4j mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user




-- 
Emil Eifrém, CEO [e...@neotechnology.com]
Neo Technology, www.neotechnology.com
Cell: +46 733 462 271 | US: 206 403 8808
http://blogs.neotechnology.com/emil
http://twitter.com/emileifrem
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Neo4j Cloudfoundry

2011-04-15 Thread Emil Eifrem
Hi alphazero,

Neo4j is not quite yet up and running on CloudFoundry but it's
definitely on our roadmap. It's an obvious extension of our dedicated
work with Spring.

It does require some work on VMware's end so if you think this is
interesting, please post a feature request (or vote up an existing
one) here:

   http://support.cloudfoundry.com/forums/373013-feature-requests

Only do this though if you're interested in actually checking out
CloudFoundry though.

Thanks!

Cheers,

-EE


On Fri, Apr 15, 2011 at 11:44, alphazero (SenseSay)
alphaz...@sensesay.net wrote:
 Hello all/NeoTeam,

 It wasn't entirely clear from the announces whether the recent
 integration with Spring DataGraph means we can push apps using neo4j
 as the datasource.  If true, then awesome: would appreciate any hints/
 help/etc.  If not, have you guys  tried running the rest server on
 cloudfoundry?  (That would be a great start too.)

 Thank you and congratulations on your latest!

 /R
 ___
 Neo4j mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user




-- 
Emil Eifrém, CEO [e...@neotechnology.com]
Neo Technology, www.neotechnology.com
Cell: +46 733 462 271 | US: 206 403 8808
http://blogs.neotechnology.com/emil
http://twitter.com/emileifrem
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Palo Alto release party!

2011-04-15 Thread Emil Eifrem
It's the release party for Neo4j 1.3!

   http://blog.neo4j.org/2011/04/neo4j-13-abisko-lampa-released.html

It's going to be a small informal event, with free beer and lots of
graph discussions! :) At last Dave and meself from the Neo4j gang will
be there. Show up! It'll be tons of fun.

Cheers,

-EE

On Fri, Apr 15, 2011 at 17:23, Stephen Young st...@electricmint.com wrote:
 Hey David

 I'm a neo4J list lurker and I'm currently in SF.  What's this event about?

 Cheers

 Steve

 On 15 April 2011 15:45, David Montag david.mon...@neotechnology.com wrote:

 Hi graphsters,

 If you are in the SF bay area, don't think you'll go unnoticed! We're
 expecting to see you at the Palo Alto release party next Monday (4/18).
 Beers are on us! I'll be the guy with the tan Neo4j shirt.

 The venue is Nola (www.nolas.com) at 535 Ramona St. Hoping to see you
 there!

 David

 --
 David Montag david.mon...@neotechnology.com
 Neo Technology, www.neotechnology.com
 Cell: 650.556.4411
 Skype: ddmontag
 ___
 Neo4j mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user




 --
 Stephen Young
 CEO @ factnexus.com
 Architect @ wik.me
 Founding member @ knowledgerights.org
 ___
 Neo4j mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user




-- 
Emil Eifrém, CEO [e...@neotechnology.com]
Neo Technology, www.neotechnology.com
Cell: +46 733 462 271 | US: 206 403 8808
http://blogs.neotechnology.com/emil
http://twitter.com/emileifrem
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Neo4j 1.3 GA Released!

2011-04-13 Thread Emil Eifrem
Yea, fantastic job and a huge effort by the entire team. And thanks to
all of you in the community for your feedback during the milestone
releases. Please keep it coming!

Also, if you like the release, please consider voting on DZone and Hacker News:

   
http://www.dzone.com/links/neo4j_13_released_now_a_graph_database_with_gpl_v.html
   http://news.ycombinator.com/item?id=2443002

Stay connected!

Cheers,

-EE

On Wed, Apr 13, 2011 at 09:18, Jim Webber j...@neotechnology.com wrote:
 Hello fellow graphistas!

 It's been 3 whole months and 5 tantalizing milestones since our last major 
 release, and now we're proud to announce that Neo4j 1.3 has been released for 
 general availability (GA).

 While there are a whole bunch of new features and improvements included in 
 the new release (and described on our blog posting 
 http://blog.neo4j.org/2011/04/neo4j-13-abisko-lampa-released.html), perhaps 
 the most striking feature of 1.3 is that it marks a new product direction for 
 the database, being split into Community, Advanced, and Enterprise editions, 
 with some radial and progressive license changes to boot:

 - Community edition is now licensed under the GPL. Our community and 
 customers now have the right to run any number of Neo4j Community edition 
 instances for whatever purpose they like at no charge. This means for most of 
 our community, Neo4j is completely free to use with no strings attached!
 - Advanced edition is licensed under a dual AGPL/commercial arrangement. 
 Where you have greater needs around managing Neo4j instances or production 
 support, this is the right product for you.
 -  Enterprise edition is also licensed under a dual AGPL/commercial 
 arrangement. Where you need high availability, and more production support 
 this is the right product for you.

 Note that since Advanced and Enterprise editions are dual licensed under the 
 AGPL or a commercial license, you can continue to be free and open source, or 
 choose a commercial license that meets your needs.

 In terms of features we've rolled together all of the improvements that we've 
 been releasing as part of our milestones. For instance we've upped the 
 database limits to 32 billion nodes, and 64 billion relationships, while at 
 the same time being able to compact the footprint on disk. On the operational 
 side, we've wrapped the database in a brand new visualization tool that ships 
 by default with each version inside the Webadmin tool. Now exploring your 
 graph is just a click away, and we think it looks super too!

 None of this would have been possible without the support of our community. 
 Every day we're amazed at the enthusiasm and insight you bring to the mailing 
 list, Twitter, and blogs. We hope this release powers you on even further. 
 And by way of thanks and giving back to our awesome community, we're running 
 release parties around the planet. If you're in or near Athens, Berlin, 
 Copenhagen, London, Stockholm, or Washington  DC, then check out the release 
 parties schedule at 
 http://blog.neo4j.org/2011/04/neo4j-13-abisko-lampa-released.html.

 Until next time, stay connected!

 Jim

 ___
 Neo4j mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user




-- 
Emil Eifrém, CEO [e...@neotechnology.com]
Neo Technology, www.neotechnology.com
Cell: +46 733 462 271 | US: 206 403 8808
http://blogs.neotechnology.com/emil
http://twitter.com/emileifrem
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


[Neo4j] Please fill out this quick poll

2011-03-23 Thread Emil Eifrem
Friends --

Feel free to fill out this quick poll if you have 10 seconds over:

   http://dev.mysql.com/tech-resources/quickpolls/

Cheers,

--
Emil Eifrém, CEO [e...@neotechnology.com]
Neo Technology, www.neotechnology.com
Cell: +46 733 462 271 | US: 206 403 8808
http://blogs.neotechnology.com/emil
http://twitter.com/emileifrem
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] New Blog post: Strategies for Scaling Neo4j

2011-03-22 Thread Emil Eifrem
Absolutely. Option #3 can scale writes horizontally.

Cheers,

-EE

On Tue, Mar 22, 2011 at 22:20, Guru GV guru...@gmail.com wrote:
 From Neo4j perspective - would there be strategies that would scale well for
 writes? Just curious.

 On Tue, Mar 22, 2011 at 6:37 AM, Jim Webber j...@neotechnology.com wrote:

 Duly updated, thanks for the feedback.

 Jim

 On 22 Mar 2011, at 00:56, Emil Eifrem wrote:

  Great post. Only thing I'd add is that a weakness of 1  2 is that
  while they scale ~linearly for reads, they don't scale writes. Maybe
  that's obvious but it may be worth pointing out anyway.
 
  Cheers,
 
  -EE
 
  On Mon, Mar 21, 2011 at 17:47, Jim Webber j...@neotechnology.com wrote:
  With especial thanks to Mark Harwood and Alex Averbuch, I wrote this on
  approaches for scaling:
 
 
  http://jim.webber.name/2011/03/22/ef4748c3-6459-40b6-bcfa-818960150e0f.aspx
 
  Your thoughts would be most welcome.
 
  Jim
 
  ___
  Neo4j mailing list
  User@lists.neo4j.org
  https://lists.neo4j.org/mailman/listinfo/user
 
 
 
 
  --
  Emil Eifrém, CEO [e...@neotechnology.com]
  Neo Technology, www.neotechnology.com
  Cell: +46 733 462 271 | US: 206 403 8808
  http://blogs.neotechnology.com/emil
  http://twitter.com/emileifrem

 ___
 Neo4j mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user





-- 
Emil Eifrém, CEO [e...@neotechnology.com]
Neo Technology, www.neotechnology.com
Cell: +46 733 462 271 | US: 206 403 8808
http://blogs.neotechnology.com/emil
http://twitter.com/emileifrem
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] New Blog post: Strategies for Scaling Neo4j

2011-03-21 Thread Emil Eifrem
Great post. Only thing I'd add is that a weakness of 1  2 is that
while they scale ~linearly for reads, they don't scale writes. Maybe
that's obvious but it may be worth pointing out anyway.

Cheers,

-EE

On Mon, Mar 21, 2011 at 17:47, Jim Webber j...@neotechnology.com wrote:
 With especial thanks to Mark Harwood and Alex Averbuch, I wrote this on 
 approaches for scaling:

 http://jim.webber.name/2011/03/22/ef4748c3-6459-40b6-bcfa-818960150e0f.aspx

 Your thoughts would be most welcome.

 Jim

 ___
 Neo4j mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user




-- 
Emil Eifrém, CEO [e...@neotechnology.com]
Neo Technology, www.neotechnology.com
Cell: +46 733 462 271 | US: 206 403 8808
http://blogs.neotechnology.com/emil
http://twitter.com/emileifrem
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Beer and Talk

2011-03-14 Thread Emil Eifrem
On Mon, Mar 14, 2011 at 12:15, Axel Morgner a...@morgner.de wrote:
 Hi everybody,

 as said, here's a new thread for the idea of having beer and talk
 meetings.

 Possible locations so far:

 Malmö
 London
 Berlin
 Frankfurt

Let's add San Francisco bay area to that as well! Great initiative!

Cheers,

-- 
Emil Eifrém, CEO [e...@neotechnology.com]
Neo Technology, www.neotechnology.com
Cell: +46 733 462 271 | US: 206 403 8808
http://blogs.neotechnology.com/emil
http://twitter.com/emileifrem
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Where is the beer?

2011-03-14 Thread Emil Eifrem
On Mon, Mar 14, 2011 at 13:21, Andreas Kollegger
andreas.kolleg...@neotechnology.com wrote:
 I've shared a map with you called Neo4j Graphistas:
 You can view and edit this map at
 http://maps.google.com/maps/ms?ie=UTF8hl=enoe=UTF8msa=0msid=215787240736307886514.00049e70e573cbd8a91e5

 Where are people graphing? Add yourself to the map (or at least your city ;)

Great idea!


 Note: To edit this map, you'll need to sign into Google with this email 
 address. To use a different email address, just reply to this message and ask 
 me to invite your other one.  If you don't have a Google account, you can 
 create one at
 http://www.google.com/accounts/NewAccount?reqemail=user@lists.neo4j.org.

Hmm, dunno if I have special powahs but I didn't have to sign in or
anything to be able to edit the map. The UI was incredibly
counter-intuitive, but once I found the right pixel to click I was
authorized to edit.

Cheers,

-- 
Emil Eifrém, CEO [e...@neotechnology.com]
Neo Technology, www.neotechnology.com
Cell: +46 733 462 271 | US: 206 403 8808
http://blogs.neotechnology.com/emil
http://twitter.com/emileifrem
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Reference node pains.

2010-12-14 Thread Emil Eifrem
Gang --

I've found that this is (as so frequently the case) a question of
different types of stakeholders.

   * For folks that are getting into Neo4j from a more graph
theoretical / algorithmic angle (for example, they might have found us
through Gremlin and Tinkerpop) then the reference node is a bug, an
odd escalated artifact that makes our graph less graph-y. [These are
also the folks who think nodes are connected by *edges* or arcs,
because that's how graph literature talks about it.]

   * For folks that are getting into Neo4j from a more industrial /
software engineering angle (for example by hearing a talk at a
conference like JavaOne) then the reference node is an intuitive and
pragmatic way of attaching various subgraphs to an entry point into
the graph. [These are also the folks who think nodes are connected
through *relationships*, because in normal lingo you say there's a
relationship between these two entities.]

Couple of options forward:

   (a) Keep it as it is. Pro with this is that it's worked and
provided value in real systems forever. Con is that it's unintuitive
and awkward for a segment of our user base.

   (b) Completely remove it. Pro with this is that it makes more sense
to one user group. Con is that we will have to replace it with
something that is as convenient (or more) as the reference node for
the users who *do* use it.

   (c) Create the reference node lazily on invocation of
getReferenceNode(). Pro with this is that we can cater to both use
cases -- if you don't like the reference node, just don't invoke
getReferenceNode(). Con is that it's non-intuitive: we do a mutating
operation as part of an API that advertises itself through its name as
read-only.

   (d) Codify the subreference pattern that we use so frequently, by
supporting named subreference nodes, a'la getReferenceNode( actors
). Pro with this is that we have more powerful and explicit support
for a pattern that has emerged as a defacto way of using Neo4j. Con is
that it really is a special case of indexing and possibly of the
metamodel as well.

I'm not sure which approach is the better one but I do think we should
address it once and for all and put this discussion to rest.

Cheers,

-EE

On Tue, Dec 14, 2010 at 14:50, Rick Otten rot...@windfish.net wrote:
 I vote for it being optional.

 Hi Marko,

 On Fri, Dec 10, 2010 at 7:35 PM, Marko Rodriguez okramma...@gmail.com
 wrote:
 Hello.

 I have one question and a comment:

 QUESTION: Is the reference node always id 0 on a newly created graph?

 Yes.


 COMMENT: By chance, will you guys remove the concept of a reference node
 into the future. I've noticed this to be a pain in the side for people
 moving between various graph systems. Going from Neo4j to iGraph to
 TinkerPop to etc. The reference node, if the user is not conscious,
 begins to build as data is migrated into and from Neo4j graphs. And what
 ensues is a data bug. Perhaps a GraphDatabaseServer = new
 GraphDatabaseService(String directory, boolean createReferenceNode).
 ...?

 The reference node is very helpful in certain use-cases. The current
 implementation could however be improved.

 Would having the option to create a graph without the reference node
 solve the problems you are experiencing?

 -Johan


 Thanks,
 Marko.

 http://markorodriguez.com
 http://tinkerpop.com

 ___
 Neo4j mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user



 --
 Rick Otten
 rot...@windfish.net
 O=='=+


 ___
 Neo4j mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user




-- 
Emil Eifrém, CEO [e...@neotechnology.com]
Neo Technology, www.neotechnology.com
Cell: +46 733 462 271 | US: 206 403 8808
http://blogs.neotechnology.com/emil
http://twitter.com/emileifrem
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] How stable is the New Traversal API in 1.2 m2?

2010-11-03 Thread Emil Eifrem
On Wed, Nov 3, 2010 at 14:03, Hans Brattberg hans.brattb...@crisp.se wrote:
 Should I learn the old style or the new traversal api?

We're going to make the new traversal API be the default at some
point, but the problem right now is that while the new API is
*incredibly* powerful it's also *much* harder to grasp initially. It's
high on easy to use but low on easy to learn.

 I'm using the 1.2 Milestone 2 release.
 Is there a lot of changes in the interface to the new traversal api
 between 1.1 and 1.2 M2?

I'd be more worried about the changes between M2 and 1.2 final. :)

But what's your opinion? How can we improve the new API and make it
easier for people to grasp immediately?

Cheers,

-- 
Emil Eifrém, CEO [e...@neotechnology.com]
Neo Technology, www.neotechnology.com
Cell: +46 733 462 271 | US: 206 403 8808
http://blogs.neotechnology.com/emil
http://twitter.com/emileifrem
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] The Graph Traversal Programming Pattern Presentation

2010-06-26 Thread Emil Eifrem
Mlarko --

Lots of positive noise on the twitter tubes about your talk. Well
done! Is there a video up somewhere?

Cheers,

-EE

On Sat, Jun 26, 2010 at 16:07, Marko Rodriguez okramma...@gmail.com wrote:
 Hello,

 I presented on the graph traversal programming pattern [ 
 http://bit.ly/cKJ8P7]  this afternoon at WindyCityDB in Chicago.
        - http://windycitydb.org/sessions/#rodriguez

 My slides are available on SlideShare for those that are interested: 
 http://bit.ly/bAfrVI

 Enjoy,
 Marko.

 http://markorodriguez.com
 ___
 Neo4j mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user




-- 
Emil Eifrém, CEO [e...@neotechnology.com]
Neo Technology, www.neotechnology.com
Cell: +46 733 462 271 | US: 206 403 8808
http://blogs.neotechnology.com/emil
http://twitter.com/emileifrem
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo] license

2010-05-10 Thread Emil Eifrem
Marcin / Tobias --

It's AGPLv3 as Tobias points out. The LICENSE.txt file in the APOC
tarball is Apache because all source code that it bundles is
Apache-licensed. This is because we want people to be able to reuse
and morph those examples into their own code, hence Apache makes a lot
of sense for the source code examples. (Public domain would also make
sense.)

But if you look into the NOTICES.txt file, it enumerates the various
licenses for the *library* files that APOC includes, including the
Neo4j kernel. This is per convention, but I can understand that it may
be confusing.

Cheers,

-EE

On Mon, May 10, 2010 at 21:04, Tobias Ivarsson
tobias.ivars...@neotechnology.com wrote:
 It is AGPLv3. I have no idea why there is an Apache license in the so called
 APOC packaging of Neo4j, it should be AGPLv3.

 Thanks for pointing this out.

 Cheers,
 Tobias

 On Mon, May 10, 2010 at 9:56 PM, Marcin Krol mrk...@gmail.com wrote:

 Hello,

 On the main page I see following statement:

 Neo4j is released under a dual free software/commercial license model
 (which basically means that it’s open source under the AGPLv3 but if
 you’re interested in using it with closed source software, then you must
 buy a commercial license).

 But when I downloaded archive in the LICENSE.txt file I see Apache license.

 So which is it?


 --

 Regards,
 mk

 --
 Premature optimization is the root of all fun.
 ___
 Neo mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user




 --
 Tobias Ivarsson tobias.ivars...@neotechnology.com
 Hacker, Neo Technology
 www.neotechnology.com
 Cellphone: +46 706 534857
 ___
 Neo mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user




-- 
Emil Eifrém, CEO [e...@neotechnology.com]
Neo Technology, www.neotechnology.com
Cell: +46 733 462 271 | US: 206 403 8808
http://blogs.neotechnology.com/emil
http://twitter.com/emileifrem
___
Neo mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo] Facebook Graph API and Neo4j

2010-05-07 Thread Emil Eifrem
Yea, great post! If you like it, feel free to vote up on Hacker News as well:

   http://news.ycombinator.com/item?id=1327523

Cheers,

-EE

On Fri, May 7, 2010 at 16:08, Peter Neubauer
peter.neuba...@neotechnology.com wrote:
 Hi folks,
 Anders wrote up a blog on using the Facebook Graph API together with
 Neo4j, based on some weekend coding bySteen Lehman and Jacob Hansson -
 http://www.dzone.com/links/mashups_with_the_facebook_graph_api_and_neo4j.html
 .

 Feel free to vote it up so more people are seeing it! I think it
 really is worth it.

 Thanks Anders, Steen  and Jacob for the weekend effort!

 Cheers,

 /peter neubauer

 COO and Sales, Neo Technology

 GTalk:      neubauer.peter
 Skype       peter.neubauer
 Phone       +46 704 106975
 LinkedIn   http://www.linkedin.com/in/neubauer
 Twitter      http://twitter.com/peterneubauer

 http://www.neo4j.org               - Your high performance graph database.
 http://www.thoughtmade.com - Scandinavias coolest Bring-a-Thing party.
 ___
 Neo mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user




-- 
Emil Eifrém, CEO [e...@neotechnology.com]
Neo Technology, www.neotechnology.com
Cell: +46 733 462 271 | US: 206 403 8808
http://blogs.neotechnology.com/emil
http://twitter.com/emileifrem
___
Neo mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


[Neo] Neo4j meetup on Thu Mar 25 @ Twitter HQ San Francisco

2010-03-23 Thread Emil Eifrem
Friends --

If anyone of you are in the San Francisco bay area, please join me at
a Neo4j meetup hosted by Twitter on Thursday. It'll be cool. For more
info, check out:

   http://blog.neo4j.org/2010/03/neo4j-meetup-at-twitter-hq-thu-mar-25.html

Please join us!

Cheers,

-- 
Emil Eifrém, CEO [e...@neotechnology.com]
Neo Technology, www.neotechnology.com
Cell: +46 733 462 271 | US: 206 403 8808
http://blogs.neotechnology.com/emil
http://twitter.com/emileifrem
___
Neo mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo] Sharding

2010-01-26 Thread Emil Eifrem
On Tue, Jan 26, 2010 at 20:32, Rick Whitesel (rwhitese)
rwhit...@cisco.com wrote:
 Hi:

 Potentially stupid questions follow: In looking at how to add sharding
 to Neo4j, I was wondering if it made any sense to put Neo4j on top of
 Cassandra or maybe a distributed BTree+ system? I love the relationship
 modeling in Neo4j but I need the scalability of sharding; preferable not
 done at the client.

Hi Rick --

Worry not, that's not a stupid question at all. The problem with just
putting the Neo4j API on top of something like Cassandra is that it
doesn't really solve the problem. The challenge with auto-sharding a
graph isn't the engineering of writing a distributed system. It's the
science of efficiently partitioning a dynamic graph.

Cassandra shards everything by a defined key. That will lead to an
inefficienct sharding scheme if you have a graph-like connected data
structure that you want to be able to traverse in an ad-hoc manner.

Do you know any invariants about the domain, like entity of type X
will NEVER be connected to entity of type Y?

Cheers,

-- 
Emil Eifrém, CEO [e...@neotechnology.com]
Neo Technology, www.neotechnology.com
Cell: +46 733 462 271 | US: 206 403 8808
http://blogs.neotechnology.com/emil
http://twitter.com/emileifrem
___
Neo mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo] SparQL engine?

2010-01-09 Thread Emil Eifrem
On Sat, Jan 9, 2010 at 21:14, Peter Neubauer
peter.neuba...@neotechnology.com wrote:
 Hi there,
 just found out about http://sparql.sourceforge.net/ , has anyone ever
 tried this out? Would Neo4j benefit anything from writing an adapter
 to it as opposed to the existing RDF components?

That's what our existing sparql engine
(http://components.neo4j.org/sparql-engine-neo/) is based on...

-- 
Emil Eifrém, CEO [e...@neotechnology.com]
Neo Technology, www.neotechnology.com
Cell: +46 733 462 271 | US: 206 403 8808
http://blogs.neotechnology.com/emil
http://twitter.com/emileifrem
___
Neo mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo] Question about the Interface Traverser

2010-01-06 Thread Emil Eifrem
On Wed, Jan 6, 2010 at 15:29, Tim Langley timlang...@me.com wrote:
 When I try to access the collection (getAllNodes)
 for example to see how large the result set is then the traverser is 
 automatically dumped to the last node (or reset)

That's the expected result. getAllNodes() is a convenient method that
basically iterates through the result set for you and return it as a
collection.

Looking through the javadoc, we obviously need to improve and clarify
that point. Thanks.

Cheers,

-- 
Emil Eifrém, CEO [e...@neotechnology.com]
Neo Technology, www.neotechnology.com
Cell: +46 733 462 271 | US: 206 403 8808
http://blogs.neotechnology.com/emil
http://twitter.com/emileifrem
___
Neo mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo] PHP and Neo

2009-12-23 Thread Emil Eifrem
On Wed, Dec 23, 2009 at 15:32,  a...@andypotter.org wrote:
 I have updated my PHP/Java example with functionality using the traverser.

Great, thanks!


 I have a neo question concerning transactions.  In my example I have the
 creation of the traverser wrapped in a transaction. And each individual
 iteration of the traverser is also wrapped in a transaction. This had to be so
 otherwise it wouldn't work.

 My question is: Are there any technical problems associated with using neo
 like this? I don't seem to be having any problems.

No, that won't be a problem. You run the risk of the original node
having been mutated (e.g. deleted) below your feet in between
defining the traverser and starting to iterate across it. But with the
default isolation level (i.e. no manual locks) that can potentially
happen even if you do it all in the same tx.

Cheers,

-- 
Emil Eifrém, CEO [e...@neotechnology.com]
Neo Technology, www.neotechnology.com
Cell: +46 733 462 271 | US: 206 403 8808
http://blogs.neotechnology.com/emil
http://twitter.com/emileifrem
___
Neo mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo] setProperty allowed objects

2009-11-22 Thread Emil Eifrem
On Sun, Nov 22, 2009 at 18:34, Robert Lockhart bobby...@gmail.com wrote:
 it's super-lame that you only allow a basic set of objects to be the values
 of properties.  Any plans to open it up to arbitrary objects?

No. We're not an object database. I think going down that path opens
up a whole can of worms that I'd rather not get us into. For example,
class/object versioning and activation depth.

On the contrary, I've always agreed with the relational gurus that
separating data and logic is a good thing. I.e., a programming
language paradigm is not necessarily the most robust and effective
data model. I disagree with the RDBMS guys, however, that tables is
that data model. At least not for the majority of the applications in
2009.

Anyway, it seems to be easy enough to map any object down to the
property data types Neo4j provides. If you think about it, you can
recursively decompose most Java object's state to Strings + the JVM
primitive types. What we need to add is more powerful wiring so you
won't have to do as much of the get/setProperty that you need to do
today.

Cheers,

-- 
Emil Eifrém, CEO [e...@neotechnology.com]
Neo Technology, www.neotechnology.com
Cell: +46 733 462 271 | US: 206 403 8808
http://blogs.neotechnology.com/emil
http://twitter.com/emileifrem
___
Neo mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo] Storing binary data

2009-10-06 Thread Emil Eifrem
On Tue, Oct 6, 2009 at 18:46, Stefan Armbruster ml...@armbruster-it.de wrote:
 Assume a large public facing site enabling its users to upload avatar
 images.
 There are basically two alternatives:
 1) store the binary data in a byte[] property with the node
 2) externalize the binary data in the file system and store a reference
 in a node's property

Hi Stefan,

Definitely option 2. Neo4j can store binaries using byte arrays as you
point out, but we think a file system is a lot better at that so the
recommended way is to store a reference as you suggest.

As an aside: I'm at JAOO and there's a lot of people excited about
GORM + graph databases. Good stuff!

Cheers,

-- 
Emil Eifrém, CEO [e...@neotechnology.com]
Neo Technology, www.neotechnology.com
Cell: +46 733 462 271 | US: 206 403 8808
http://twitter.com/emileifrem
___
Neo mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo] neo4j with terracotta?

2009-08-18 Thread Emil Eifrem
On Tue, Aug 18, 2009 at 15:02, Dennis Petersondennisbpeter...@gmail.com wrote:
 Just curious, is there anything else people are doing with Neo4J to meet
 high-availability requirements?

Two architectures seem to have emerged:

   a) Add a REST layer in front of your Neo4j backend. That REST layer
speaks the domain language (i.e. Persons, Cars, Images rather than
Nodes, Relationships, etc) and it pushes mutating messages onto some
form of a queue (something like ActiveMQ/RabbitMQ/Tibco/SQS) which is
propagated to the backing Neo4j instances. Read requests are
dispatched to one of the instances. We have a number of commercial
customers that use this setup.

   b) Use the online backup to create a warm spare. That warm spare
can be used to create infrequently synchronized read-only slaves
(updated maybe hourly or something like that).

Cheers,

-- 
Emil Eifrém, CEO [e...@neotechnology.com]
Neo Technology, www.neotechnology.com
Cell: +46 733 462 271 | US: 206 403 8808
http://twitter.com/emileifrem
___
Neo mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


[Neo] OSGi bundle-ification

2009-07-13 Thread Emil Eifrem
On Fri, Jul 10, 2009 at 19:35, Emil Eifreme...@neotechnology.com wrote:
 I have a fairly tight weekend, but unless someone else has added the
 osgi plugin to the pom by the end of the WE, I'll have a look at it.

I had a first stab at adding the maven-bundle-plugin here:

   https://trac.neo4j.org/changeset/2978

I ran a mvn package in the 'neo' component after changing the poms,
and it looked like at least added some OSGi headers to the manifest.
No clue if they're the right ones tho.

Cheers,

-- 
Emil Eifrém, CEO [e...@neotechnology.com]
Neo Technology, www.neotechnology.com
Cell: +46 733 462 271 | US: 206 403 8808
http://twitter.com/emileifrem
___
Neo mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo] syntactic and semantic model for XML

2009-07-11 Thread Emil Eifrem
Hi Andreas,

Sounds like a very interesting problem and approach. As noted
previously, this is a sorta offline weekend for me, but lemme shoot
some questions to get this thing started.

On Sat, Jul 11, 2009 at 05:04, Andreas
Kolleggerakolleg...@tembopublic.org wrote:
 My thinking is
 that I could then preserve the original syntax of the XML, but
 annotate with relationships to put the data in semantic context.

Do you need to preserve the exact String representation (incl comments
/ formatting / etc)? You probably don't need that, but if you do then
my experience is that at the end it'll be easier to actually store two
representations: one graph representation in the node space, and one
string representation typically in a property on some root node for
the document. Just a FYI.


 The approach I'm pursuing looks like this:

 A. Define meta-model per form
    1. define syntactic meta-model (org.neo4j.neometa) based on XSD
 of form instance data

Right. The meta model is based on RDFS with a few OWL constructs for
extra flavor, so it should be able to represent anything from XSD.

    2. add to ontology vocabulary (using OWL? RDF?) as needed

A vocabulary to me is an instance set that narrows the base data type
of a property. For example, the property industry may have a type of
xsd:string, but a vocabulary of { information technology,
automotive, defense }.

Are we talking about the same thing? If so, where do you get the vocabulary?

    3. define mapping from syntactic to semantic model

I'm not 100% clear on this step. Could you describe the semantic model
a bit more. For example, from where do you get the semantic model
originally? How do you define the mapping? Is the mapping a manual
step or something you can infer?

 B. Process submitted forms
    1. transform XML into meta-model compliant nodes in the graph

Right.

    2. traverse the nodes to add INSTANCE_OF relationships into the
 semantic model

So, the meta model component will add INSTANCE_OF relationships into
the meta model which originates from the XSD (step A 1). You may need
something else, but I'll defer on this until I have more info about
your semantic model (see above).

Just a few quick Qs to get this started...

Cheers,

-- 
Emil Eifrém, CEO [e...@neotechnology.com]
Neo Technology, www.neotechnology.com
Cell: +46 733 462 271 | US: 206 403 8808
http://twitter.com/emileifrem
___
Neo mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo] neo-component-commons package namespace

2009-07-10 Thread Emil Eifrem
On Fri, Jul 10, 2009 at 19:05, Mattias Perssonmatt...@neotechnology.com wrote:
 absolutely, it sounds like a good idea. As Emil pointed out there's
 much to be desired regarding these areas.

 So go ahead :)

Ok, bumped the version number and changed namespace to
org.neo4j.commons.iterator. (FYI: The s in 'commons' is not plural,
it's the noun commons. The general rule is to not have plural package
names.)

It may take half an hour or so before the build scripts have pushed
the new snapshot to the maven repo.

I have a fairly tight weekend, but unless someone else has added the
osgi plugin to the pom by the end of the WE, I'll have a look at it.

Cheers,

-- 
Emil Eifrém, CEO [e...@neotechnology.com]
Neo Technology, www.neotechnology.com
Cell: +46 733 462 271 | US: 206 403 8808
http://twitter.com/emileifrem
___
Neo mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo] Neo under OSGi

2009-07-07 Thread Emil Eifrem
Hi Andreas,

On Tue, Jul 7, 2009 at 17:31, Andreas
Kolleggerakolleg...@tembopublic.org wrote:
 Starting with the APOC-bundle to guide the transition and provide both
 a starting and reference point sounds really good to me.

 I'd be willing to get started with a nice pax-constructed project in
 labs, while you lounge away in Iceland.

Awesome. We've wanted to be a better OSGi citizen for quite some time
now. Great that someone picks up the ball.

 I'll try to time the biggest
 changes for when you're the least capable of paying attention ;) .

Good plan! ;)


 How do I sign up?

Sign the CLA as outlined here:

   http://wiki.neo4j.org/content/Code_Contributor%27s_Guide

Cheers,

-- 
Emil Eifrém, CEO [e...@neotechnology.com]
Neo Technology, www.neotechnology.com
Cell: +46 733 462 271 | US: 206 403 8808
http://twitter.com/emileifrem
___
Neo mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo] Help with Neo program execution

2009-06-12 Thread Emil Eifrem
Hi Ajay,

On Fri, Jun 12, 2009 at 21:14, Ajay Sharmasharmaa...@gmail.com wrote:
 C:\neo-1.0-b8\javadoc\org\neo4j\example\helloworldjavac -Xlint:deprecation
 NeoT
 est2.java
 NeoTest2.java:57: warning: [deprecation] END_OF_NETWORK in
 org.neo4j.api.core.St http://org.neo4j.api.core.st/
 opEvaluator has been deprecated
                StopEvaluator.END_OF_NETWORK,

This one has been deprecated in favor of StopEvaluator.END_OF_GRAPH.

                                      ^
 NeoTest2.java:66: cannot find symbol
 symbol  : method getDepth()
 location: interface org.neo4j.api.core.TraversalPosition
                        friendsTraverser.currentPosition().getDepth(),

This was previously deprecated and has now been renamed to
currentPosition().depth().

You can always see javadocs for the latest release here:

   http://api.neo4j.org/current/

As well as for specific releases like:

   http://api.neo4j.org/1.0-b7/

Hope that helps!

Cheers,

-- 
Emil Eifrém, CEO [e...@neotechnology.com]
Neo Technology, www.neotechnology.com
Cell: +46 733 462 271 | US: 206 403 8808
http://twitter.com/emileifrem
___
Neo mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo] Newbie Q: How to load a previously created database?

2009-05-29 Thread Emil Eifrem
n Fri, May 29, 2009 at 16:27,  orla.spill...@sunlife.com wrote:
 Hi,
 I am new to Neo4J and relatively new to Java and have recently downloaded
 and ran a few Neo4j examples (i.e. Hello World and Matrix).
 In these examples the main() method creates the nodes and relationships of
 the graph. I assumed these would persist to disk automatically once the
 transaction was complete or the database was shutdown but if I change the
 code to assume these nodes exist and run it again, it can't find them.
 How do I load a previously created database?

Hi Orla,

If you commit the transaction (by flagging it successful through
tx.success() before you tx.finish()) then the data is definitely
persisted to disk. There are three ways you can find it:

   1) Make sure all your nodes are connected (indirectly) to the
reference node. Then go neoService.getReferenceNode() and traverse
from there.

   2) Index your nodes using an IndexService like LuceneIndexService.
The IndexService would be responsible for maintaining the mapping from
a property like name=Orla to a specific node (or more).

   3) Remember the node ids in some secondary persistent storage and
look up the nodes directly through neoService.getNodeById().

I think the easiest way for you is to download the latest apoc release
(see front page of http://neo4j.org). It ships with a number of basic
examples. For example, look at the
EmbeddedNeoWithIndexingExample.java.

Hope that helps!

Cheers,

-- 
Emil Eifrém, CEO [e...@neotechnology.com]
Neo Technology, www.neotechnology.com
Cell: +46 733 462 271 | US: 206 403 8808
http://twitter.com/emileifrem
___
Neo mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo] Online backup fails with suggested Spring transaction integration

2009-05-20 Thread Emil Eifrem
On Thu, May 21, 2009 at 02:06, Andreas Guenther
aguent...@flying-orange.com wrote:
 This also avoids casting NeoService down to EmbeddedNeo, which I frankly
 have seen too many times in the code base, and really suffered under with my
 own NeoService wrapper implementation ;) Anyhow, I understand that your
 changes are workarounds to get things going until someone has time to properly
 address the underlying transaction manager integration issue.

Hi Andreas,

Thanks for the patch! I'll let Johan comment on the actual code.
(Though I know that he has a few fairly offline days Thu and Fri.)
Just wanted to quickly jump in and say that the main -- actually
hopefully the only -- reason we have all these downcasts to
EmbeddedNeo is to get access to configuration stuff. And pushing out a
neat config API is something I really hope we can get in to the b9
release (~mid June). So hopefully that'll sort out at least the
EmbeddedNeo cast issue once and for all.

Cheers,

-- 
Emil Eifrém, CEO [e...@neotechnology.com]
Neo Technology, www.neotechnology.com
Cell: +46 733 462 271 | US: 206 403 8808
http://twitter.com/emileifrem
___
Neo mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo] Online backup fails with suggested Spring transaction integration

2009-05-17 Thread Emil Eifrem
On Sun, May 17, 2009 at 23:45, Andreas Guenther
aguent...@flying-orange.com wrote:
 Johan,

 Looks like there's no unexpected shutdown going on according to my
 debugging. I do have a full test project available for you but it's too
 big for pasting it here. Any suggestion on where I can place you a Maven
 test project tarball?

Hi Andreas,

Well, I'd suggest using something like dropbox [1] or yousendit [2].

Or if you do want to submit patches as discussed previously and agree
with our contributor policy [3], then you can just sign the CLA [4].
After that, I'd be glad to give you write access to the svn repo and
you can add it to your laboratory.

1] http://getdropbox.com
2] http://yousendit.com/
3] http://wiki.neo4j.org/content/Code_Contributor%27s_Guide
4] http://wiki.neo4j.org/content/About_Contributor_License_Agreement

Cheers,

-- 
Emil Eifrém, CEO [e...@neotechnology.com]
Neo Technology, www.neotechnology.com
Cell: +46 733 462 271 | US: 206 403 8808
http://twitter.com/emileifrem
___
Neo mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


[Neo] Apoc 0.1 released

2009-05-08 Thread Emil Eifrem
Friends,

We just pushed out the news about Apoc 0.1. The binaries were actually
ready by the time we released b8, but we wanted to get some
documentation cleaned up first.

What's Apoc? I hear you say. Apoc is A Package Of Components, a
bundle of useful components in a single package. It currently
includes:

   o neo for your everyday kickass graph database needs
   o index-util for indexing
   o remote-neo for remote access to a running instance
   o shell for browsing a running instance with a command-line interface

In addition, it ships with sample code that demonstrates basic use
cases for these components.

How do you get it?

   Direct link: http://dist.neo4j.org/neo4j-apoc-0.1.tar.gz
   Quick Guide: http://wiki.neo4j.org/content/Getting_Started_With_Apoc

Maven? See the guide. For the impatient, groupId / artifactId is
org.neo4j / apoc. Stable version is 0.1, development in 0.2-SNAPSHOT.

A bundle of components along with the core engine is something that's
been requested before and we've wanted to do for a while. I think it
does make things a bit easier especially for newcomers. Please
download and kick it around for a bit and let us know how it can be
improved.

Cheers,

-- 
Emil Eifrém, CEO [e...@neotechnology.com]
Neo Technology, www.neotechnology.com
Cell: +46 733 462 271 | US: 206 403 8808
http://twitter.com/emileifrem
___
Neo mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo] Persist control

2009-05-07 Thread Emil Eifrem
On Fri, May 8, 2009 at 02:04, Solomon (Sung) Wu (solowu)
sol...@cisco.com wrote:
 I am wondering, is there a mode to run neo4j in in-memory mode without
 persisting?  Or alternatively, is there a mode to run it in-memory, then
 say persist to persist the entire data graph set into persistence at a
 time chosen by developer?  Thank you.  :)

At the moment, there's no purely in-memory implementation. However:

   1) From a runtime perspective, if you just give the JVM enough RAM
then the Neo4j kernel will keep everything cached, in effect turning
it into an in-memory solution for reads with write-through.

   2) I know that Tobias was hacking on a way to mock up a NeoService
for unit testing, which really is an in-memory Neo4j. This was a while
ago though and I'm not sure if it was ever finished.

What is your specific use case?

Cheers,

-- 
Emil Eifrém, CEO [e...@neotechnology.com]
Neo Technology, www.neotechnology.com
Cell: +46 733 462 271 | US: 206 403 8808
http://twitter.com/emileifrem
___
Neo mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


[Neo] Spring expertise?

2009-05-05 Thread Emil Eifrem
Hi all,

Johan just created a new ticket about integration with an external
transaction manager in for example a Spring environment. If anyone
here feels knowledgeable about Spring, feel free to chip in either in
this thread or as a comment in the ticket:

   https://trac.neo4j.org/ticket/166

Or see below.

Cheers,

-EE


-- Forwarded message --
From: neo4j.org nore...@neo4j.org
Date: Wed, May 6, 2009 at 00:20
Subject: [Neo tickets] #166: Improve Spring integration
To:
Cc: tick...@lists.neo4j.org


#166: Improve Spring integration
-+--
 Reporter:  johans               |       Owner:  johans
    Type:  enhancement request  |      Status:  new
 Priority:  major                |   Milestone:  neo-1.0-b9
Component:  neo                  |    Keywords:
-+--
 Neo4j supports {{{JTA}}} and so does Spring. In a Spring environment or
 equal we need to be able to:

 * Configure Neo4j's own transaction manager to handle additional {{{XA}}}
 resources
 * Configure Neo4j to use an external transaction manager

 The real problem arise when the global transaction log indicates there are
 transactions that are in inconsistent state (on startup). We need to get
 information on how Spring with random transaction manager in place handle
 that problem today.

 A transaction manager can throw exception on any request until it has got
 all the resources it needs to invoke {{{recover()}}} on. The problem is
 there is no specification on how this should be done and in a container
 environment it is the container that creates these resources. If anyone
 know how this is done in Spring today please let me know.

 Also see:

 http://lists.neo4j.org/pipermail/user/2009-April/001122.html
 http://lists.neo4j.org/pipermail/user/2008-August/000707.html

--
Ticket URL: https://trac.neo4j.org/ticket/166
neo4j.org http://trac.neo4j.org/
The Neo4J.org Issue Tracker
___
Tickets mailing list
tick...@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/tickets



-- 
Emil Eifrém, CEO [e...@neotechnology.com]
Neo Technology, www.neotechnology.com
Cell: +46 733 462 271 | US: 206 403 8808
http://twitter.com/emileifrem
___
Neo mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


[Neo] Input on new batch insert API?

2009-05-05 Thread Emil Eifrem
Hi,

As you may or may not know, the Neo4j kernel is heavily optimized for
reads and transactional updates, which in a typical transactional
system probably constitute 95+% of the operations. So far, we haven't
focused on raw batch insert velocity, since that's typically a
one-time operation that you execute when you're bootstrapping a
project and then never again.

However, having said that, when you DO import your initial data it's
kinda nice if that import is a reasonably performant operation. So
we've decided to develop a specific batch insert API that is optimized
for insertion. See API outlined in the ticket below.

Do you have any input on this API? Is it a convenient API for that
first importer that parses your CSVs or XML or SQL dumps and injects
the data into Neo4j?

Please give input either in this thread or in ticket comments.

Cheers,

-EE


-- Forwarded message --
From: neo4j.org nore...@neo4j.org
Date: Wed, May 6, 2009 at 01:03
Subject: [Neo tickets] #167: Create a batch insert API
To:
Cc: tick...@lists.neo4j.org


#167: Create a batch insert API
-+--
 Reporter:  johans               |       Owner:  johans
    Type:  enhancement request  |      Status:  new
 Priority:  major                |   Milestone:  neo-1.0-b9
Component:  neo                  |    Keywords:
-+--
 Create a batch insert {{{API}}} that drops support for transactions and
 the like in favor of speed. This is useful to get already existing data
 (existing in some form) injected into a Neo4j store.

 Here is the the suggested API:
 {{{
 long createNode( MapString,Object properties )
 void createNode( long id, MapString,Object properties )
 long createRelationship( long startNode, long endNode,
    RelationshipType type, MapString,Object properties )
 void setNodeProperties( long node, MapString,Object properties )
 void setRelationshipProperties( long rel, MapString,Object properties )
 MapString,Object getNodeProperties( long nodeId )
 MapString,Object getRelationshipProperties( long relId )
 IterableLong getRelationshipIds( long nodeId )
 IterableSimpleRelationship getRelationships( long nodeId )
 SimpleRelationship getRelatoinshipById( long relId )
 }}}

 Implementation is in progress and here are some details:

 * Everything will be optimized for insert only.
 * Use create methods and supply properties for nodes and relationships
 right away. The setProperties methods approach is slower.
 * Get operations may be slow.
 * Delete operation has been left out completely for now.
 * If anything breaks (you get a exception from an API call) your store is
 garbage and you have start over with a fresh new one.

--
Ticket URL: https://trac.neo4j.org/ticket/167
neo4j.org http://trac.neo4j.org/
The Neo4J.org Issue Tracker
___
Tickets mailing list
tick...@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/tickets



-- 
Emil Eifrém, CEO [e...@neotechnology.com]
Neo Technology, www.neotechnology.com
Cell: +46 733 462 271 | US: 206 403 8808
http://twitter.com/emileifrem
___
Neo mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo] neo4j on .NET

2009-05-05 Thread Emil Eifrem
On Wed, May 6, 2009 at 02:05, Antonello Provenzano antone...@deveel.com wrote:
 I will try to elaborate a plan of porting as soon as it will be
 possible, coming back to you if i will find anything that will be an
 obstacle to it. In the meanwhile, I thought that the name neo4n
 would be appropriate for the project, being the j in the name
 referred to java.

+1

Great initiative.

Cheers,

-- 
Emil Eifrém, CEO [e...@neotechnology.com]
Neo Technology, www.neotechnology.com
Cell: +46 733 462 271 | US: 206 403 8808
http://twitter.com/emileifrem
___
Neo mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo] Using a Date class as property value in a Node

2009-05-03 Thread Emil Eifrem
Hi Keerthy,

2009/5/3 ஸ்ரீராம் கீர்த்தி sriramkeer...@gmail.com:
 I think that most of the users would have come across scenarios where
 storing an utility JAVA object like Date etc., would have been necessary in
 the application.

 How is this generally handled in application using neo4j? Is there any
 common pattern (toString() etc.,) that you implement to handle storing
 custom java objects as property values (OR) do you have your own custom
 implementation (custom logic) to achieve this?

A common pattern for dates is to convert it to unixtime, which is a
long (milliseconds since the epoch, i.e. midnight at 1970-01-01). So
you'd do something like:

node.setProperty( CREATION_DATE, myDateObject.getTime() );

Hope that helps!

Cheers,

-- 
Emil Eifrém, CEO [e...@neotechnology.com]
Neo Technology, www.neotechnology.com
Cell: +46 733 462 271 | US: 206 403 8808
http://twitter.com/emileifrem
___
Neo mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


[Neo] Announcing Neo4j 1.0-b8: online backup, reduced footprint, substantial performance improvements

2009-05-03 Thread Emil Eifrem
Friends,

It's my pleasure to announce the general availability of Neo4j 1.0-b8.
This release has been a few months in the making and we're finally
ready to roll it out. While this is a beta release, we've had later
stage snapshots in production for a couple of months on several
production systems.

It's available here:

   http://neo4j.org/download
   http://dist.neo4j.org/neo-1.0-b8-binary.zip
   http://dist.neo4j.org/neo-1.0-b8-binary.tar.gz

Or, if you're in Maven land, at m2.neo4j.org with group / artifact id:
org.neo4j / neo-1.0-b8

Major changes include:

   o A NeoService.getAllNodes() method for iterating across the entire
node space.
   o A NeoService.getRelationshipTypes() accessor for all relationship
types currently in the underlying storage.
   o Programmatic online backup, enabling you to run an incremental
snapshot backup of a Neo4j instance while it's running. The details
are outlined here: http://wiki.neo4j.org/content/Online_Backup
   o Reduced memory footprint and object allocation, resulting in less
GC thrashing and thereby improved performance.
   o A lot of general performance improvements across the board, but
in particular for traversals.

And lots more. For details, check out the changelog here:

   http://dist.neo4j.org/CHANGES.txt

Happy hacking!

Cheers,

-- 
Emil Eifrém, CEO [e...@neotechnology.com]
Neo Technology, www.neotechnology.com
Cell: +46 733 462 271 | US: 206 403 8808
http://twitter.com/emileifrem
___
Neo mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo] neo4j on .NET

2009-05-02 Thread Emil Eifrem
On Sun, May 3, 2009 at 03:55, Antonello Provenzano antone...@deveel.com wrote:
 I've found that neo4j would be perfect for my scope: unfortunately, it
 is purely written in Java code and it's not portable to .NET, because
 of the massive differences between the two architectures.

 Can you tell me if is it there any language binding or any port of
 neo4j for .NET/Mono?

Hi Antonello,

There's no port and no language binding at the time. I agree with you
that porting Neo4j to .NET would probably be require a substantial
investment, although I'm certainly no expert at .NET.

As for bindings, I don't know how hard that would be. Neo4j currently
has bindings for a number of languages (Python, Jython, Ruby, Clojure)
and sometimes they've been fairly easy to roll. The conceptual
impedance between Java and C# is certainly close to zero, so maybe
adding .NET bindings is not that hard. You're certainly welcome to
give it a shot!

Another thought: Would it work if you implemented your graph algos in
Java using Neo4j, then wrapped them in a thin REST layer and used that
as a backend to the rest of your app written in .NET?

Cheers,

-- 
Emil Eifrém, CEO [e...@neotechnology.com]
Neo Technology, www.neotechnology.com
Cell: +46 733 462 271 | US: 206 403 8808
http://twitter.com/emileifrem
___
Neo mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo] Digg's graph database

2009-04-19 Thread Emil Eifrem
On Sun, Apr 19, 2009 at 09:08, Ashwin Jayaprakash
ashwin.jayaprak...@gmail.com wrote:
 Have you guys seen this video - http://blog.digg.com/?p=127 ?

 I was just wondering if you know anything about Digg's custom graph
 database. Sounds very cool.

Hi Ashwin,

I actually hadn't seen this and don't know more about their graph db
than what is revealed in the clip. Certainly sounds like they could've
gone with a Neo4j backend instead though!

Thanks for the link.

Cheers,

-- 
Emil Eifrém, CEO [e...@neotechnology.com]
Neo Technology, www.neotechnology.com
Cell: +46 733 462 271 | US: 206 403 8808
http://twitter.com/emileifrem
___
Neo mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo] Multi-Threaded access

2009-04-13 Thread Emil Eifrem
On Mon, Apr 13, 2009 at 17:47, Ashwin Jayaprakash
ashwin.jayaprak...@gmail.com wrote:
 Hi, I see that JTA is supported, but are there any
 limitations/recommendations to Neo4J being used in a server environment?
 Like how many read and write requests it can handle concurrently?

Hi Ashwin,

There are no artificial limitations on the amount of concurrent
read/write requests the Neo4j kernel can handle. In general, a read
operation doesn't block other reads and write operation will acquire a
write lock for every resource it mutates. That write lock will block
other writing requests but allow concurrent read requests to read the
old value.

So the actual upper limit on number of concurrent operations will be
set by the JVM / OS and how much contention your access patterns will
lead to on your data set.

Cheers,

-- 
Emil Eifrém, CEO [e...@neotechnology.com]
Neo Technology, www.neotechnology.com
Cell: +46 733 462 271 | US: 206 403 8808
___
Neo mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo] read-only access

2009-04-06 Thread Emil Eifrem
On Mon, Apr 6, 2009 at 16:10, Jan Berkel jan.ber...@gmail.com wrote:
 another idea would be to use distributed ruby instead of rmi. would make it
 possible for normal ruby clients to use neo4j as well i guess. will have a
 play. anyone done any experimenting with that already?

Hi Jan,

I don't know about Andreas and others on the list who are well versed
in Ruby-fu, but no one on the core team has been playing around with
distributed Ruby. We would love to hear about your findings if you
have a chance to look at it!

Cheers,

-- 
Emil Eifrém, CEO [e...@neotechnology.com]
Neo Technology, www.neotechnology.com
Cell: +46 733 462 271 | US: 206 403 8808
___
Neo mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo] Backups

2009-04-02 Thread Emil Eifrem
On Thu, Apr 2, 2009 at 13:31, Atle Prange atle.pra...@gmail.com wrote:
 Hi,

 how do i take backups from the Store?

Online backup is now merged into the latest trunk, but the tool set is
still fairly weak. If you want to do it now your best bet is to invoke
it programmatically. See introductory docs at:

   http://wiki.neo4j.org/content/Onlinebackup

Cheers,

-- 
Emil Eifrém, CEO [e...@neotechnology.com]
Neo Technology, www.neotechnology.com
Cell: +46 733 462 271 | US: 206 403 8808
___
Neo mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo] Mapping objects

2009-04-01 Thread Emil Eifrem
On Wed, Apr 1, 2009 at 10:39, Atle Prange atle.pra...@gmail.com wrote:
 In my search for a better persistence solution than ORMs i accidentally
 came across Neo4J. After reading some articles on the wiki i get the
 impression that Neo4J not only can do the job of persisting object
 graphs, but a really good job too.

Thanks!


 Are there already any efforts made towards node / object and
 relationship / reference conversion?

 Any thoughts on where one should start (i have several thoughts myself,
 but would like to hear from the experts first)

Well, the Neo4j crew, when we build apps based on Neo4j then the
lion's share of our domain layer implementation is according to the
patterns outlined on the wiki, e.g.:

   http://wiki.neo4j.org/content/Design_Guide#How_to_wrap_nodes_in_POJOs

This means that all state is kept in the node/relationship and we use
the delegator pattern to wrap the node/relationship in domain-centric
operations. That's how we roll it manually.

But I assume you mean transparent mapping? Some work has been done
here, for example by Magnus Robertsson in his neo-weaver component:

   http://components.neo4j.org/neo-weaver/

and:

   
http://components.neo4j.org/neo-weaver/apidocs/org/neo4j/weaver/api/DomainObjectFactory.html

Unfortunately, it was a few days hack and it seems to have lost
traction. But it was a good idea that someone should pick up at some
point.

Other than that, we're pretty much blank in terms of object mapping.
Would love to hear your thoughts!

Cheers,

-- 
Emil Eifrém, CEO [e...@neotechnology.com]
Neo Technology, www.neotechnology.com
Cell: +46 733 462 271 | US: 206 403 8808
___
Neo mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo] db recovery

2009-02-18 Thread Emil Eifrem
On Thu, Feb 19, 2009 at 00:04, Lyudmila L. Balakireva lu...@lanl.gov wrote:
 Hello,
 I am testing  native neo API  and LuceneIndexService.
  If  I ctrl -c the loading to the neo db, the next time  db  can not
 recover with   java.lang.OutOfMemoryError. Could you give me advice on
 it?

Hi Luda,

How large heap are you running this with? The recovery process needs a
fair amount of RAM available to read the logical log. Try increasing
the size of the heap (-Xmx=blabalaM etc) and see if that helps.

Cheers,

-- 
Emil Eifrém, CEO [e...@neotechnology.com]
Neo Technology, www.neotechnology.com
Cell: +46 733 462 271 | US: 206 403 8808
___
Neo mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo] db recovery

2009-02-18 Thread Emil Eifrem
On Thu, Feb 19, 2009 at 00:39, Lyudmila L. Balakireva lu...@lanl.gov wrote:
 But I worry how it going to recover with billions nodes in it .  It should
 be able to recover with the same memory used to write the indexes?

Johan will have to chime in here with the specifics tomorrow (he's
asleep right now). But I believe the memory required here is depending
on the size of whatever non-completed transactions that existed when
the JVM crashed, not the total size of the node store.

Cheers,

-- 
Emil Eifrém, CEO [e...@neotechnology.com]
Neo Technology, www.neotechnology.com
Cell: +46 733 462 271 | US: 206 403 8808
___
Neo mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo] Are Neo4j transactions local to thread?

2009-02-12 Thread Emil Eifrem
On Fri, Feb 13, 2009 at 01:44, Tsai Xing Wei tsaixing...@gmail.com wrote:
 If I started 2 transactions in 2 separate threads using the same NeoService
 instance,
 will a succeed() call in one transaction also commit the other transaction
 too?

Hi Tsai,

Transactional context is per thread so whatever you do in one thread
(tx.success(), tx.finish(), etc) won't affect transactions running in
other threads.

Good luck!

Cheers,

-- 
Emil Eifrém, CEO [e...@neotechnology.com]
Neo Technology, www.neotechnology.com
Cell: +46 733 462 271 | US: 206 403 8808
___
Neo mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo] In-memory Neo

2009-02-01 Thread Emil Eifrem
On Sun, Feb 1, 2009 at 6:47 PM, Johan Svensson jo...@neotechnology.com wrote:
 A real implementation optimized of in-memory would require some work.

Tobias, didn't you do some work on this for NeoMock and/or RemoteNeo?
Maybe something we could refactor out to an InMemoryNeoService at some
point.

Cheers,

-- 
Emil Eifrém, CEO [e...@neotechnology.com]
Neo Technology, www.neotechnology.com
Cell: +46 733 462 271 | US: 206 403 8808
___
Neo mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo] Sharding

2009-01-29 Thread Emil Eifrem
On Wed, Jan 28, 2009 at 8:47 PM, Joel Longtine j...@socialthing.com wrote:
 Hey All,

 I noticed the copy on neo4j.org:

  - massive scalability. Neo4j can handle graphs of several billion
 nodes/relationships/properties on a single machine and can be sharded
 to scale out across multiple machines.

 But I can't seem to find information about how to actually set up a
 sharded instance of Neo. Is this simply not implemented yet? Or am I
 missing something?

Hi Joel,

We haven't yet written up an example of how to shard Neo4j, but at its
core it's equivalent to sharding a relational database: there's no
inherent support for sharding on the server side (don't think that's
doable in RDBMS or graph db?) so the logic for defining and
dispatching to shards resides on the client side.

As you're probably aware, there's plenty to read about sharding on the
internets. Fundamentally you need to find the entities in your domain
that make sense to partition horizontally, and then figure out a good
sharding scheme. Common schemes are key- and hash-based partitioning,
vertical partitioning and range-based partitioning. Then in code on
the client side that works with a sharded domain entity, you add some
(hopefully simple) logic to first figure out the destination shard and
direct your messages there.

For example, let's say that we have a simple e-commerce application
with Customers, Products and Orders. They are all represented by nodes
and every Order node has a relationship to one Customer node and one
Product node. (Extremely simplified, obviously.) In this case, the
scalability pain point will typically be Order throughput (imagine
something like 1M products, 100M customers and 100B orders).

One setup for that could be:

   o Implement business logic wrapper classes (Customer, Order, etc)
on top of the Neo4j Nodes/Rels/etc as usual. Expose a domain-oriented
API over the wire somehow, for example via REST or a component that
eats messages off a JMS queue and then invokes the domain APIs (i.e.
invokes addCustomer(...) when it gets an AddCustomer JMS message,
etc). This service (Neo4j db code + business logic) is a backend unit
which will be deployed on several machines.[1]
   o Shard orders and customers based on e.g. hashed customer id.
   o Duplicate products across all backend instances, use a
master-slave setup with asynchronous write updates. This ensures that
there's no write conflicts and is eventually consistent (so it may
take some time for the read-only slaves to get an updated view of the
products).
   o So with 20 machines and a total data set as above, each machine
would handle something like 1M products, 5M customers and 5B orders
(assuming a uniform distribution).
   o On the client side, when there's an incoming order, pass the
customer id to your shard distribution function which in this case
will simply hash it and return the id of the shard where that customer
resides. The AddOrder message will then be directed to the appropriate
shard.

1] Those machines would in a typical RDBMS architecture host only the
relational database. The database would be exposed over the wire,
making SQL and the raw data model (table layout) the de-facto
integration API. With the architecture outlined above, the integration
API is domain oriented -- it speaks Customers and Orders rather than
SQL strings. This is not exclusive for a graph db like Neo4j, you can
implement a similar setup based on RDBMS technology obviously, but I
do believe that it's a better and more maintainable architecture.

Does that make sense?

Cheers,

-- 
Emil Eifrém, CEO [e...@neotechnology.com]
Neo Technology, www.neotechnology.com
Cell: +46 733 462 271 | US: 206 403 8808
___
Neo mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo] cost of startup and shutdown of NeoService instances

2008-12-15 Thread Emil Eifrem
On Mon, Dec 15, 2008 at 3:49 PM, Mattias Persson
matt...@neotechnology.com wrote:
 True, but if EmbeddedNeo adds a shutdown hook for itself and I'd like
 to add my IndexService instance to that hook I couldn't and it won't
 do to just add another shutdown hook which just shuts down the
 IndexService because I have no control over the order those hooks are
 executed in.

Oh, I see what you're saying. You can't handle it the same way as
before, because the same way used to be to register it with a
shutdown hook, which is now not an option because the automatically
registered hook may have been executed first. Good point. Damn.

Cheers,

-- 
Emil Eifrém, CEO [e...@neotechnology.com]
Neo Technology, www.neotechnology.com
Cell: +46 733 462 271 | US: 206 403 8808
___
Neo mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo] cost of startup and shutdown of NeoService instances

2008-12-15 Thread Emil Eifrem
On Mon, Dec 15, 2008 at 2:28 PM, Mwanji Ezana mwa...@gmail.com wrote:
 Hi Mattias and Johan,

 Thanks for the tips. Actually, I didn't know about
 Runtime.addShutdownHook(), which is why I was having trouble and was
 shutting down on every transaction.

 I don't think that this is mentioned on the wiki anywhere. It would be nice
 to do so, since using addShutdownHook() might not be intuitive for a lot of
 people.

There's also this idea:

quote who=myself from=a week or so ago on the mailing list
Idea: What if EmbeddedNeo's constructor registered a shutdown hook
with the JVM to shutdown (if not already done) when the JVM exits?
There's obvious goodness with that, but any bad consequences that I'm
missing?
/quote

I think I'm hesitating on this because it's clearly a hack around not
having proper life cycle support in Java. But unless someone can tell
me why that would be a bad idea, I'll add it to the trunk?

Cheers,

-- 
Emil Eifrém, CEO [e...@neotechnology.com]
Neo Technology, www.neotechnology.com
Cell: +46 733 462 271 | US: 206 403 8808
___
Neo mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo] cost of startup and shutdown of NeoService instances

2008-12-15 Thread Emil Eifrem
On Tue, Dec 16, 2008 at 12:59 AM, Mwanji Ezana mwa...@gmail.com wrote:
 Thanks again for all the help, things are going a lot faster.

Happy to hear that!


 I was trying to come up with a better post-unit tests clean-up strategy than
 delete all Neo files when I realised that a node can't be deleted if it
 had relationships, but a relationship can always be deleted (please correct
 me if I'm wrong). This isn't mentioned in the JavaDoc, either. Would you
 consider dumping the root relationship(s) a sufficient clean-up, or are
 there things I should watch out for?

This requirement seems to come up in every project, but we've still
been hesitant to add it to the core API. This is partly because it
doesn't feel like it belongs there (not part of day-to-day operations)
and partly because it's a very unsafe operation. I'm not sure if those
are convincing enough arguments, to be honest.

The way we usually end up solving it is to write a method in the test
harness that manually (i.e. using java.io.* classes) deletes all the
files in the Neo4j data directory.

What does everyone else think? Is this something that should be
supported by the core API? (Do remember that our philosophy is to keep
the core API lean, clean and mean. Simplicity is a virtue and anything
that could be a component on top probably should be.)


 Sorry to harp on about this. I've spent the last few months writing a web
 framework for my current employer, so I know first-hand how painful
 documentation is, but I just thought I'd point it out so that the
 referential integrity constraints could be explained at some point.

Please let us know whenever the javadocs or any other documentation is
insufficient. That's extremely valuable information. We're very aware
that our documentation is not perfect by far -- and we continuously
work on improving it -- but if you keep pointing out where we're most
lacking, we know what to prioritize. So thanks!


 I've been thinking about the issues raised in the Starting pain with
 Neo4jhttp://lists.neo4j.org/pipermail/user/2008-December/000924.htmlthread
 because I've had some of the same experiences, so I might comment on
 them when I have a bit more experience with it.

Please do. Would love to get more people's opinions on those issues.

Cheers,

-- 
Emil Eifrém, CEO [e...@neotechnology.com]
Neo Technology, www.neotechnology.com
Cell: +46 733 462 271 | US: 206 403 8808
___
Neo mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


[Neo] Fwd: Starting pain with Neo4j

2008-12-02 Thread Emil Eifrem
Hi all,

Robert Rees gave Neo4j a shot last week, trying to drive it from
Groovy but came away disappointed:

   http://twitter.com/rrees/statuses/1022507656

I asked why:

   http://twitter.com/emileifrem/status/1023049302

And here is Robert's excellent reply. I asked permission to repost on
the list to get everyone's input and kept Robert in cc since he's not
subscribed.

See mail below.

-EE


-- Forwarded message --
From: Robert Rees [EMAIL PROTECTED]
Date: Fri, Nov 28, 2008 at 4:04 PM
Subject: Starting pain with Neo4j
To: [EMAIL PROTECTED]


Hi Emil,

This is a follow up to the Tweets we've exchanged. I might also blog
about this at some point, for my own reference.

So what was the pain with getting started with Neo4j?

Well first I found I couldn't run it without the Shell and JTA jars. I
wouldn't mind but the documentation implied that if you just want to
embed a graph db and go you only need the main jar. I think in terms
of distributables if Neo4J requires these things then it is worth
having a complete jar for when you do want to just get going and
play around with it.

The EmbeddedNeo name also caused me a lot of confusion. I read that as
being in-memory in the style of Hsql or Derby. I didn't understand
that the path I was passing had to be a real directory rather than a
virtual or conceptual path. I then felt that if the process was going
to create a lot of files and be quite fussy as to whether it was
explicitly asked to shutdown then it would actually be easier to have
it run as a server process. The Abstract Server classes and the whole
process felt like I had all the process of a big server architecture
with all the micromanagement involved but none of the power of being
able to connect and share multiple clients.

The error messages you get when you fire up an Embedded datastore on
a directory that is either locked or non-existent didn't feel that
intuitive. The locked message says something like cannot create
neoidb or something similar rather than informing that the store was
already in use.

Once everything was running I had two issues. The first was having to
open a transaction just to read data seemed wrong. I see pure read
data as being one of the most common tasks and if I am not going to be
changing anything I don't see why I have to manage a transaction.

Secondly the property setting felt quite cumbersome, I would expect to
be able to set multiple Properties via a MapString, type for
example. I also think it should be part of the Core API to retrieve
Nodes by Property although if I am reading the documentation correctly
I think that might already be on your roadmap.

Again it might be just to do with the name but I would not expect to
have to explicitly shutdown an Embedded process. The shutdown should
be on the finalizer for the server. Once an Embedded object goes out
of scope it is, to my mind, not in use any longer.

Finally Traversing queries again felt quite heavyweight, I felt that
some things like Direction.BOTH and StopEvaluator.END_OF_GRAPH could
be assumed unless I stated otherwise. I felt that maybe a Traverser
Builder would have helped my pain by creating Traversers with common
characteristics quickly.

The same is true of nodes as I kind of envisaged a builder that would
build up a set of properties and perhaps even the relationships and
the build the required node and store it.

So to sum up, things I liked: a working graph database(!),
relationships being first order.

Things that were difficult: micromanging the database process, lack of
lightweight query modes, ceremony for node creation.

I don't know if I am going to get time next week but I might try and
generate some code illustrating what I mean about wrapping the current
API in something that assumes basic options until overridden.



-- 
Emil Eifrém, CEO [EMAIL PROTECTED]
Neo Technology, www.neotechnology.com
Cell: +46 733 462 271 | US: 206 403 8808
___
Neo mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo] Starting pain with Neo4j

2008-12-02 Thread Emil Eifrem
Robert --

First off: great and relevant feedback. So thank you for that. Let's
see what we can address. Comments inline.

On Tue, Dec 2, 2008 at 8:41 PM, Emil Eifrem [EMAIL PROTECTED] wrote:
 Hi all,

 Robert Rees gave Neo4j a shot last week, trying to drive it from
 Groovy but came away disappointed:

   http://twitter.com/rrees/statuses/1022507656

 I asked why:

   http://twitter.com/emileifrem/status/1023049302

 And here is Robert's excellent reply. I asked permission to repost on
 the list to get everyone's input and kept Robert in cc since he's not
 subscribed.

 See mail below.

 -EE


 -- Forwarded message --
 From: Robert Rees [EMAIL PROTECTED]
 Date: Fri, Nov 28, 2008 at 4:04 PM
 Subject: Starting pain with Neo4j
 To: [EMAIL PROTECTED]


 Hi Emil,

 This is a follow up to the Tweets we've exchanged. I might also blog
 about this at some point, for my own reference.

 So what was the pain with getting started with Neo4j?

 Well first I found I couldn't run it without the Shell and JTA jars. I
 wouldn't mind but the documentation implied that if you just want to
 embed a graph db and go you only need the main jar.

Hmm, yea that sucks.

So, the 'neo' component has a compile-time dependency on the 'shell'
component, but only a soft runtime dependency. I.e. it detects the
presence of the shell jar on the classpath when enableRemoteShell() is
invoked and only start up the shell server if it's available. If not,
it'll print an error message. So shell shouldn't have caused you any
trouble, unless of course you wanted to use it, at which point of
course you need the jar.

We do have a 'hard' dependency on JTA. I've toyed with the idea to
replace this dependency with a soft dep, but at the end of the day I
think it introduces more complexity than it's worth. It's probably
better to solve that through an assembly as discussed below.

Anyway, I fixed the line on neo4j.org that said a single 500k jar.
(Now says that it's a single jar w/ one dependency.)

 I think in terms
 of distributables if Neo4J requires these things then it is worth
 having a complete jar for when you do want to just get going and
 play around with it.

Yea, we should definitely make an aggregate assembly of some sort that
includes the most common artifacts like neo, shell, index-util and so
on.

Anders: you suggested this last week, did you create a ticket for it?


 The EmbeddedNeo name also caused me a lot of confusion. I read that as
 being in-memory in the style of Hsql or Derby. I didn't understand
 that the path I was passing had to be a real directory rather than a
 virtual or conceptual path. I then felt that if the process was going
 to create a lot of files and be quite fussy as to whether it was
 explicitly asked to shutdown then it would actually be easier to have
 it run as a server process.

I think this potential name confusion is something we'll have to live
with. Embedded really means in-process and hopefully most people
won't associate it with in-memory.

 The Abstract Server classes and the whole
 process felt like I had all the process of a big server architecture
 with all the micromanagement involved but none of the power of being
 able to connect and share multiple clients.

Hmm, I'm not sure exactly what you're refering to. I believe Mattias'
shell work has an AbstractServer (?), but that's an internal
implementation class. We're currently not a standalone server but are
doing work in that area (mainly via the RemoteNeo project).

(As a side note: I believe running standalone database servers is an
architectural bug, a boiling frog situation we've got stuck in because
of the 'best practices' and inertia of past paradigms when it was for
some reason deemed ok to expose your persistence layer to everyone and
their mom and use the database as the de-facto integration bus. That's
not the way to roll it in a world of services, IMHO, where you should
expose a domain abstraction rather than your underlying representation
on the wire. In that world, having an embedded database is the only
thing that makes sense. /rant

Having said that, I realize that a lot of people still expect a
standalone server and it IS very convenient in some situations. So
it's still something we should and will do. But that's the reason why
we didn't start out with that.)


 The error messages you get when you fire up an Embedded datastore on
 a directory that is either locked or non-existent didn't feel that
 intuitive. The locked message says something like cannot create
 neoidb or something similar rather than informing that the store was
 already in use.

Hmm, the exception message is:

   throw new IllegalStateException( Unable to lock store [
   + storageFileName + ], this is usually a result of some 
   + other Neo running using the same store. );

where storageFileName will be the file we weren't able to lock. (The
file name is printed for debugging purposes so we can figure

Re: [Neo] Neo Usecase

2008-11-25 Thread Emil Eifrem
Hi Johan,

See comments inline.

On Tue, Nov 25, 2008 at 10:45 AM,  [EMAIL PROTECTED] wrote:
 Our problem (as you may have guessed) is that we have performance issues when 
 doing
 large changes in the topology (for minor changes it works ok), like deletion 
 of large groups.  The topology does not have to be that large either... 
 Removing a group with 300 connected units (300x300 relationships)  is enough 
 to cause improper response times. Since it is a many2many relationship we 
 have to resolve and remove all relationships before removal of any units and 
 this is what is time consuming.

 Question:
 1. I was hoping that neo could help us speed up things here

This sounds very likely. One guy I talked to summed up Neo4j as
solving the many-to-many problem. From your description of the
domain it seems like a perfect fit.

I obviously need to know more numbers to say for sure but it sounds
like we'll be able to do at least sub-second times on all those
operations.

 2. I would like to use neo for the topology part only. Simply (well.. not 
 that simply perhaps) switch our TopologyRepository (impl today as 
 JpaTopologyRepository) to a
   NeoTopologyRepository.  I know that transactions are supported, but is it 
 possible to use it with a jta transactionmanager since we will end up with 
 two different datasources if we keep the rest of the system in the relational 
 database? We are using spring.
 I found this, what is the status? http://wiki.neo4j.org/content/Spring_And_Neo

Well, Johan should fill in with the latest details here, but we
certainly support both participating in and directing a 2PC
environment. I.e. both registering Neo4j as an XA resource to another
transaction manager or setting up our transaction manager to be in
charge. But IIRC, it currently requires a pretty messy config that we
need to shape up to expose it properly.

 3. Or is it better(or easier?) to simply use Neo for everything?

Do you have any legacy integration against your existing SQL database?
Do you have reporting tools (like Crystal Reports or Jasper or
something like that) that's already setup against it?

If not, it'll certainly be easier and very doable to just use Neo4j to
persist the entire domain.

Cheers,

-- 
Emil Eifrém, CEO [EMAIL PROTECTED]
Neo Technology, www.neotechnology.com
Cell: +46 733 462 271 | US: 206 403 8808
___
Neo mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo] Neo Usecase

2008-11-25 Thread Emil Eifrem
Hi again,

On Tue, Nov 25, 2008 at 10:45 AM,  [EMAIL PROTECTED] wrote:
 We are using spring.
 I found this, what is the status? http://wiki.neo4j.org/content/Spring_And_Neo

I forgot this question! There's a Spring example app documented at:

   http://wiki.neo4j.org/content/IMDB_Example

In particular, to see how you configure Spring to use Neo4j's
transaction manager, you want to check the config information at:

   http://wiki.neo4j.org/content/IMDB_Transaction_handling

Hope that helps!

Cheers,

-- 
Emil Eifrém, CEO [EMAIL PROTECTED]
Neo Technology, www.neotechnology.com
Cell: +46 733 462 271 | US: 206 403 8808
___
Neo mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo] Holding nodes between transactions

2008-09-25 Thread Emil Eifrem
On Thu, Sep 25, 2008 at 8:06 AM, Michael Hunger [EMAIL PROTECTED] wrote:
 Thanks for the answers. The main question however remains. I don't know how 
 this is with Software Transactional Memory.

 If you hold nodes between transactions and they are e.g. deleted by another 
 thread/user then your reference is no longer
 valid. Changed properties/relationships shouldn't matter as they are just 
 provided by a transactional neo service. But
 removal is still a problem (imho).

If the node you wrap is deleted from under you (for example by
another operation) then you're going to get a runtime exception next
time you invoke a method on that node reference. So it's up to the
layer above to make sure that it invalidates any long-held references
to those nodes. There's nothing we can do to prevent that other than
alerting the client through a runtime exception.

In our applications, we new up domain wrappers very liberally. The
typical getXXXByYYY() operations on a service interface are for
example implemented as such:

   // pseudo code
   Person getPersonByName( String name )
   {
  Node underlyingNode = someIndex.getSingleNodeFor( name );
  return new PersonImpl( underlyingNode );
   }

And we also make sure that we in data structures in the upper layers
only store identifyers and execute a lookup, rather than references to
the actual nodes or relationships.

Does that help?

Cheers,

-- 
Emil Eifrém, CEO [EMAIL PROTECTED]
Neo Technology, www.neotechnology.com
Cell: +46 733 462 271 | US: 206 403 8808
___
Neo mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo] Modelling advice

2008-09-25 Thread Emil Eifrem
On Fri, Sep 26, 2008 at 12:37 AM, Jonny Wray [EMAIL PROTECTED] wrote:
 Hi,

 I'm in the process of moving an application over from an RDF based graph
 store to Neo. So far it's being great but I'm currently hitting a modelling
 question that I'm sure some experience with the technology would help, and
 so I'm asking the group.

Hi Jonny,

I *think* I understand your problem and basically the solution will be
depending on the complexity of the evidence data. If it's fairly
complex, I think injecting a middle node will be the best way. So when
node1 is SIMILAR related (just making this up) to node2, then instead
of the obvious:

   ( node1 ) -- SIMILAR -- ( node2 )

you would model it like this:

   ( node1 ) -- SIMILAR -- ( node14 ) -- SIMILAR -- ( node2 )

Node 14 in this diagram is the middle node, and you an attach whatever
information you want to it, either in the form of properties or for
example separate evidence nodes that aggregate data for a single piece
of evidence and that attach to node14 through e.g. a
SUPPORTING_EVIDENCE relationship.

But if your evidence data is simple enough, it may be enough to just
connect the nodes with a relationship and then add the data as
key-encoded properties. For example:

   ( node1 ) -- SIMILAR -- ( node2 )

And then on the relationship, you would have properties like:

   evidence1.origin = something
   evidence1.weight = 0.8f
   evidence2.origin = somethingelse
   evidence2.weight = 0.4f

The advantage with the middle node design is that the node space
layout in a sense is more clean and flexible. But it loses out on
intuition and white-board friendliness.

The advantage with the second layout is that it's the intuitive and
obvious way to model this data. It also keeps the number of primitives
down. The disadvantage is that it's brittle to encode information in
the names of the property keys. (How do you delete one piece of
evidence? Gotta loop through all keys and do string matching. Yuk!)

Which one is the better choice I believe comes down to personal
preference and the specifics of the actual domain.

Does that make sense or did I misunderstand the use case?

Cheers,

-- 
Emil Eifrém, CEO [EMAIL PROTECTED]
Neo Technology, www.neotechnology.com
Cell: +46 733 462 271 | US: 206 403 8808
___
Neo mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo] neo-template-api at http://components.neo4j.org/

2008-09-24 Thread Emil Eifrem
On Wed, Sep 24, 2008 at 9:29 AM, Peter Neubauer
[EMAIL PROTECTED] wrote:
 This is maven generated, I am not sure if there is an automatic
 process executing the build?

It's automated, but it's a very hacky homegrown solution based on bash
shell scripts that is extremely brittle. The real solution is to get a
real automated build like Hudson or Bamboo or Team City or something
like that going, but we haven't had the cycles for that yet.

I have a very offline day but I'll look into why it doesn't get
generated when I get home tonight.

Cheers,

-- 
Emil Eifrém, CEO [EMAIL PROTECTED]
Neo Technology, www.neotechnology.com
Cell: +46 733 462 271 | US: 206 403 8808
___
Neo mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo] Holding nodes between transactions

2008-09-24 Thread Emil Eifrem
On Wed, Sep 24, 2008 at 11:54 PM, Michael Hunger [EMAIL PROTECTED] wrote:
 When looking at imdb examples the nodes are hold as delegates of the domain 
 objects.

 What is the implication of holding neo nodes from one transaction to another? 
 And whats the best patterns related to that.

I think the behavior will be exactly as you expect it would be, if you
in your mind imagine that the entire node space is kept in an in-RAM
structure. Except your RAM is transactionally safe and persistent. I
say that I think the behavior will be as you expect, because it may
be that my expectations have shifted after having worked with Neo for
a while. In the (unfinished) Guidelines for Building a Neo App, I talk
a bit about that mindset:

   http://wiki.neo4j.org/content/Guidelines_for_Building_a_Neo_App#Mindset

(Needs to be expanded, I know.)

Basically, since all stateful operations are delegated to the
underlying node (rather than mutating instance variables that at some
later stage will be serialized to e.g. SQL), you in essence get
transactional memory for free. This gives you neat features like
rollback of your domain objects as well as improves parallelism
without incurring any new concepts on the developer.


 The same question goes along regarding what are the best strategies of making 
 start nodes for traversal easily
 accessible? By adding them directly to the reference node? By what 
 relationship do you do this normally.

We typically use a subreference pattern, where the
neoService.getReferenceNode() in turn ties in a few (typically 10)
subreference nodes. Subreferences are mentioned in the outdated Design
Guide:

   http://wiki.neo4j.org/content/Design_Guide#Subreferences

Have a peek at the convenience neoUtil.getOrCreateSubReferenceNode()
for an implementation:

   
https://trac.neo4j.org/browser/components/neo-utils/trunk/src/main/java/org/neo4j/util/NeoUtil.java#L397

I like a naming convention on the relationship type to be something
like REF_TO_USERS_SUBREF or USERS_REF_TO_SUBREF. But I tend to like
more verbose and descriptive names than many others.


 On single method transactions like in neo-utils. It is sensible to support 
 that as this is certainly degrading
 performance? And if so, wouldn't it be better to have neoservice support it 
 itself (when methods called without tx
 thant create one for just this method). This could be done by having a 
 factory creating neoservices (and not calling
 new EmbeddedNeo which I personally dislike. Adding an option to a factory 
 method for creating a decorator around the
 neoservice that automatically starts transactions if there is none running 
 for the single method and finishes them
 afterwards would be simple.

I agree that that is a better solution than reimplementing specific
methods in neo-utils. But the important question, as you point out, is
whether this is a good idea. We debated quite heavily whether we
should have Neo automagically open up a transaction if someone
executed an operation without a transactional context. I was
originally for, because of developer convenience, but at the end we
opted not to.

Today, I feel that that was the right decision: it does have the
drawback of forcing the programmer to deal with transactions. OTOH,
grouping logical business operations into a single cohesive
all-or-nothing unit typically improves the domain layer code, and it
also fixes the potentially gigantic performance hole that results from
running every operation in a separate small transaction.

Cheers,

-- 
Emil Eifrém, CEO [EMAIL PROTECTED]
Neo Technology, www.neotechnology.com
Cell: +46 733 462 271 | US: 206 403 8808
___
Neo mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo] First glimpt @ Ne04J

2008-09-24 Thread Emil Eifrem
On Wed, Sep 24, 2008 at 1:01 PM, Stig Lau [EMAIL PROTECTED] wrote:
 I've just opened the magic box of Neo4J, and am trying to get the
 grips of how I can use the program. Here are the thoughts I've made at
 this stage:

 What is your golden Neo4J showcase? Where do I find it on the webpages?
 * I would like to find a zip file / svn project I can download
 straight away, even before looking at a 5 min tutorial, just to see it
 working.
 * Could be the example from the Getting Started Guide. Should be shown
 from the download page or similar.
 * Building with Maven is the whole difference
 * An example of this kind is easily distributed when I want to make a
 3 line introduction to Neo4J; Download from this link, mvn install
 and you've got a small example that works and is informative.

With this in mind, what's your view on the IMDB example that Anders mentioned?


 When I looked for a good starting point, I found social-network-
 simulation. Which is something I can relate to.
 However
* social-network-simulation references a parent-pom which is not
 downloadable from the svn repo. Perhaps the reference should be
 deleted as a demo project is better standalone.
* Neo4J and MySQL domain files are mixed together. Should perhaps be
 put in seperate packages.
* If the showcase should be based on social-network-simulation, the
 mysql stuff should be moved out because it requires to set up a mysql
 database which is a hassle. HSQLDB or DerbyDB could be used as
 substitutes as they can be distributed as mvn-jars.
 Strive to document by tests that show the functionality and use cases
 of the system. In that way, the documentation is more fun to write/
 run, and stay updated. Make your web site point to the source code
 (tests) so that the user is drawn into your repo.

Yea, that was a quick hack that did not intend to showcase Neo for new
developers per se.


 Hope this rant may give you some ideas. I've only browsed your site
 and code for an hour, but I feel that the experience someone has with
 a product the first hour is the most valuable, because it matters so
 much to the majority of people browsing by, and is not seen by the
 regulars.

Very, very true! Much appreciated.

 And please make me a nice small showcase I can use as a reference in
 the mail I'm sending to my company .

Does the IMDB example fit this requirement?

 Regards

 -Stig,


 PS. Thanks for the introduction to [EMAIL PROTECTED], Emil!

You're certainly welcome! Was great fun!

Cheers,

-- 
Emil Eifrém, CEO [EMAIL PROTECTED]
Neo Technology, www.neotechnology.com
Cell: +46 733 462 271 | US: 206 403 8808
___
Neo mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo] neo-template-api at http://components.neo4j.org/

2008-09-24 Thread Emil Eifrem
On Wed, Sep 24, 2008 at 10:29 AM, Emil Eifrem [EMAIL PROTECTED] wrote:
 I have a very offline day but I'll look into why it doesn't get
 generated when I get home tonight.

I issued a manual refresh of the component tree. This means that all
components should have re-generated sites but also means that their
artifacts have been unnecessarily redeployed to the m2 repo. So that's
why your maven will probably download a lot of new artifacts next
time, even though there has been no svn commits. Owell.

So there's now:

   http://components.neo4j.org/neo-template-api/

Please note that the javadocs are not linked from that site, but they
ARE generated and deployed to:

   http://components.neo4j.org/neo-template-api/apidocs

I have no clue why. Maven sites are a big unknown to me. Making a
good-looking as well as decent-default-configured site template is
part of ticket #90 (https://trac.neo4j.org/ticket/90). Anders is
working on the non-layout parts of that, but I'm unsure about his time
frame. If anyone has some insights into Maven sites and can help us
out with how to structure this, please chime in.

Cheers,

-- 
Emil Eifrém, CEO [EMAIL PROTECTED]
Neo Technology, www.neotechnology.com
Cell: +46 733 462 271 | US: 206 403 8808
___
Neo mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo] neo online?

2008-08-13 Thread Emil Eifrem
On Wed, Aug 13, 2008 at 4:24 AM, Kai Devan [EMAIL PROTECTED] wrote:
 Hello everyone, I've been following neo4j for a little bit and really
 believe in the concept. The 8-page introduction is a little abstract for me
 to fully understand but as I read about the node, relationship, property
 structure it makes a lot of sense.

Great!

 I've setup maven to build the database so
 I can play with it and try to understand more. I come from a web development
 background and work mainly with design/css/html/php and I'm not familiar
 with Java. Will it be possible to use neo as a database for a web
 development project and still use php for the backend logic?

It's definitely possible, but will require some experience with
exposing Java services to PHP frontends. I would wrap Neo4j in a thin
domain-oriented REST layer -- i.e. a REST endpoint that exposes domain
abstractions (Customer, Cart, things like that) rather than Neo4j
primitives directly (Node, Relationship, etc). This means that your
domain layer will be implemented in Java (see patterns for this on the
wiki) whereas your presentation layer and action control flow will be
implemented in PHP.

Definitely doable, but maybe not trivial if you don't have any
experience with service oriented architectures.

 Would the
 neo4j.py project allow the database to be used with one of the python web
 frameworks?

This question is more for Tobias, but I assume the answer would be yes. Tobias?

 There's a personal project I'm working on for the web and I'd
 really like to be able to use neo4j as the database. I'll learn as much as I
 have to so I can get this working.

Great -- let us know how it progresses and if you have any questions!


 There was also a message a little bit ago talking about having someone more
 unfamiliar with neo4j read new documentation to see if it's clear and
 understandable. I might be a good subject for that since all of this is new
 to me, I'll offer comments on everything I read :)

Fantastic! Would be really appreciated. Please start at

   http://wiki.neo4j.org/content/IMDB_Example

and take it from there.

Cheers,

-- 
Emil Eifrém, CEO [EMAIL PROTECTED]
Neo Technology, www.neotechnology.com
Cell: +46 733 462 271 | US: 206 403 8808
___
Neo mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo] Object binding using annotations?

2008-08-13 Thread Emil Eifrem
On Wed, Aug 13, 2008 at 10:54 AM, Peter Neubauer
[EMAIL PROTECTED] wrote:
 Wow,
 this sounds cool, need to check that out. It might well be one more
 very interesting way to harness DDD with Neo ... feel free to share
 any public info on this here!

+1 on that. Sounds very interesting!

Cheers,

-- 
Emil Eifrém, CEO [EMAIL PROTECTED]
Neo Technology, www.neotechnology.com
Cell: +46 733 462 271 | US: 206 403 8808
___
Neo mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo] Linked's cloud

2008-06-07 Thread Emil Eifrem
On Fri, Jun 6, 2008 at 4:55 AM, Bong Gavin [EMAIL PROTECTED] wrote:
 # The Cloud is a server that caches the entire LinkedIn network graph in 
 memory.
 # Network size: 22M nodes, 120M edges.
 # Requires 12 GB RAM.
 # There are 40 instances in production

 Something neo4j is capable of ?

Absolutely. I'd say this is a very good use case for Neo. Why? Why not
simply cache the entire graph in RAM?

Well, that's an option for smaller graphs. So if you have a graph that
could possibly fit in RAM, what's the benefit of modeling it in Neo?
My take:

   o Your graph will be persistent (obviously).
   o Your graph will be transactional (which is really hairy to do
in-memory, just ask the Software Transactional Memory people -- this
also takes care of concurrent updates and all that).
   o Your graph will be scalable (i.e. your system will keep working
even if your graph starts growing larger than available RAM).

And obviously, if you have 12G of RAM, you can always assign a lot of
that to the Neo JVM, and Neo will anyway keep as much of the graph as
possible in RAM in its caching subsystem (while maintaining
transactional semantics, concurrency protection and all those good
things).

So in conclusion and to answer your question: Yes. :)

Cheers,

-- 
Emil Eifrém, CEO [EMAIL PROTECTED]
Neo Technology, www.neotechnology.com
Cell: +46 733 462 271 | US: 206 403 8808
___
Neo mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo] Neoclipse relationship types

2008-06-05 Thread Emil Eifrem
On Thu, Jun 5, 2008 at 11:17 AM, Peter Neubauer
[EMAIL PROTECTED] wrote:
 Well,
 this sounds like we should take a look at the Meta package that wraps
 nodes and gives them mandatory and optional attributes, adding
 typing to the node space. Sadly there, is not much information on
 the Wiki on that yet, but the code is fully functional at
 https://trac.neo4j.org/browser/components/neo-meta,

Hey,

In a meeting, but there is some documentation about the structure at:

   http://components.neo4j.org/neo-meta/

as well as some javadocs at:

   http://components.neo4j.org/neo-meta/apidocs/

For some reasons the javadocs aren't yet linked in the maven site,
although they are automatically generated. We really need to clean up
the components site soon.

Cheers,

-- 
Emil Eifrém, CEO [EMAIL PROTECTED]
Neo Technology, www.neotechnology.com
Cell: +46 733 462 271 | US: 206 403 8808
___
Neo mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo] Neoclipse relationship types

2008-06-04 Thread Emil Eifrem
On Wed, Jun 4, 2008 at 9:25 PM, Peter Neubauer [EMAIL PROTECTED] wrote:
 I think we should get you committer rights to so we get more eyes on
 the code,
[snip]
 So, get the CLA in place and IMHO commits go over patches :)

All formalieties done and Anders now has commiter rights to neoclipse.
Peter H, I assume this is ok with you as well?

Cheers,

-- 
Emil Eifrém, CEO [EMAIL PROTECTED]
Neo Technology, www.neotechnology.com
Cell: +46 733 462 271 | US: 206 403 8808
___
Neo mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo] Mapping UUID to Neo node

2008-05-04 Thread Emil Eifrem
On Sun, May 4, 2008 at 6:48 PM, Philip Jägenstedt [EMAIL PROTECTED] wrote:
 Now that I've finally gotten around to adding this index, l have some 
 questions.

  First, it seems like IndexService and Index are used interchangably in
  your reply. IndexService doesn't have a getSingleNodeFor so it seems a
  getSingleNode with some constant key is what should be used. Is this
  correct?

This is correct. I messed up the name of the getSingleNode() method.
You should use IndexService and IndexService alone. An IndexService
can maintain multiple indexes (typically one per property key) whereas
the old Index only represents one particular index structure (~= for
one particular key). So write all your stuff against the IndexService
interface -- except of course the one place in your code when you new
up the particular IndexService implementation of your choice (e.g.
LuceneIndexService or NeoIndexService). This is done once, typically
in application initialization code.


  Second, in my case the index can't be done in the artist factory as
  the id is not know at that time. This would be the case for any
  optional attribute. Instead it is created in the setId method on the
  Artist class. This must be a very common scenario and I suppose that
  you've all though of good design patterns for this.
  (http://wiki.neo4j.org/content/Advanced_Design_Guide seems completely
  outdated so I'm ignoring that.) Basically I don't want to sprinkle
  new NeoIndexService(neo) throughout my code, but my puny Java brain
  has thought all afternoon without figuring out something that fits
  nicely with the niceness of http://wiki.neo4j.org/content/Design_Guide

It seems weird to me that an attribute named id would be optional,
but anywho, I get your point. Unfortunately, there's currently no way
you can get around having to manually let the IndexService know that
an indexed property has changed. In the future, we're going to enable
hooking an IndexService into the event framework and then
declaratively specify property keys that it should watch and reindex.

But for now, you're going to have to notify the IndexService (via the
index() method) that an attribute has changed. This shouldn't be too
invasive in your code, of course, since you probably don't index on a
lot of attributes and you hopefully mutate those few attributes in a
single, well-defined place. In your case it's probably just going to
affect the setId() method, right?

You wouldn't sprinkle new NeoIndexService(neo) in there though, as
you wrote in your mail. Rather than instantiating a bunch of indexes,
you'd get a reference to the one instance of IndexService that you've
initialized in your app startup code.

How do you get access to this instance? Ah, dependency resolution.
Without theoretizing too much, there are roughly three ways you can go
about this:

   1. Access it through a singleton. This was the de-facto Right
Solution(tm) of the mid 90s, inspired by the GoF Design Patterns book
(p127). I.e. in a class, declare a public static IndexService
getIndexService() and statically invoke it from whenever you need an
IndexService, for example in your Arist.setId() method.

   2. Well, then after a while the software development community
decided that a) Singleton Was Broken for a component-oriented and
unit-tested world and b) that dependency injection (aka inversion of
control) was the right way to go. Lots have been written about this
[1] but if you want to do it manually, you simply declare an
IndexService parameter in the constructor of every class where you
need to index stuff and then use that instance. For example:

--- 8 ---
public class Artist extends AbstractMusicBrainzEntity
{
   private final Node underlyingNode;
   private final IndexService indexService;

   public Artist( Node underlyingNode, IndexService indexService )
   {
  this.underlyingNode = underlyingNode;
  this.indexService = indexService;
   }

   public void setUuid( long uuid )
   {
  Transaction tx = neo.beginTx();
  try
  {
 underlyingNode.setProperty( PropertyKeys.UUID, uuid );
 indexService.indexService( underlyingNode, PropertyKeys.UUID, uuid );
 tx.success();
  }
  finally
  {
  tx.finish();
  }
   }
}
--- 8 ---

   3. Instead of manually wiring your components and entities
together, you could use a DI framework or container like Spring, or
PicoContainer or Guice. Actual syntax depends on the framework, but it
could look something like this:

--- 8 ---
public class Artist extends AbstractMusicBrainzEntity
{
   @Autowired
   private IndexService indexService;
   ...

   @Transactional
   public void setUuid( long uuid )
   {
  underlyingNode.setProperty( PropertyKeys.UUID, uuid );
  indexService.indexService( underlyingNode, PropertyKeys.UUID, uuid );
   }
}
--- 8 ---

1] This is probably not the best introduction today (it's really
showing signs of its age)... but the seminal article that coined the
term 

Re: [Neo] Does RelationshipType enum need to be unique?

2008-05-03 Thread Emil Eifrem
Hi Philip,

So from a Java perspective, your two Enums are definitely different
types and there's no interoperability between them whatsoever. But Neo
ignores that. For Neo, the *name* of a relationship type (as defined
by the Stirng name() method in the RelationshipType interface) is the
unique identifier of a relationship type. From the API spec:

   The name uniquely identifies a relationship type, i.e. two
different RelationshipType implementations with different object
identifies (and possibly even different classes) are semantically
equivalent if they have equal names.

   
(http://api.neo4j.org/current/org/neo4j/api/core/RelationshipType.html#name())

We chose this -- despite some drawbacks, like potential confusion in
equals() comparisons [see javadocs for elaboration] -- so that it
would be easy to refactor relationship type enums for example as
outlined in your mail.

Btw, the reason you don't usually think of the name() method of a
RelationshipType is that it's implicitly defined by the Enum class
(it's actually synthesized by the Java5 compiler to return the name of
the constant field in your enum). That's why it's neat to define
reltypes through enums.

So the short answer is: Neo will treat
MyRelationshipTypes.CONTAINED_IN as an equal() and same type as
MomsRelationshipTypes.CONTAINED_IN.

Hope that helps!

Cheers,

-- 
Emil Eifrém, CEO [EMAIL PROTECTED]
Neo Technology, www.neotechnology.com
Cell: +46 733 462 271 | US: 206 403 8808
___
Neo mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo] Maturity of Python bindings?

2008-04-28 Thread Emil Eifrem
On Mon, Apr 28, 2008 at 11:16 AM, Philip Jägenstedt [EMAIL PROTECTED] wrote:
 While I've been keeping the Java door open (and gotten a bit enamoured
  with it) I am still interested. Maybe I'll even write some code in
  Python and some in Java, if that's possible... I'm guessing it's not
  possible for two programs to use the sasme datastore at the same time
  though, which could potentially be a problem.

Very true, you can't run two Neo instances (processes, JVMs, etc)
against the same data store.


  Also, I'm feeling slightly retarded this morning as I can't figure out
  a good place to put my RelationshipTypes enum in Java. Essentially it
  needs to be package global, so all I can think of is creating a silly
  little class like this:

  public class Mush {
 public static enum Types implements RelationshipType {
 MUSICBRAINZ,
 ARTISTS,
 ARTIST
 }
  }

You probably want to put it into a file RelTypes.java, which looks like:

   enum RelTypes implements RelationshipType
   {
  BLAH, BLAH 2
   }

Good luck!

Cheers,

-- 
Emil Eifrém, CEO [EMAIL PROTECTED]
Neo Technology, www.neotechnology.com
Cell: +46 733 462 271 | US: 206 403 8808
___
Neo mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo] EmbeddedNeo implements NeoService

2008-04-27 Thread Emil Eifrem
On Mon, Apr 28, 2008 at 1:47 AM, Philip Jägenstedt [EMAIL PROTECTED] wrote:
 I'm back with a more philosophical question.

Hey Philip,

I'm on a five minute break here so let me jump in real quick!


  http://wiki.neo4j.org/content/One_Minute_Guide_Complete_Code declares

  NeoService neo = new EmbeddedNeo(var/base);

  The super-awsome (really) http://wiki.neo4j.org/content/Design_Guide
  consistently uses EmbeddedNeo. When writing code, which ought I use?

You should absolutely use NeoService. We didn't have NeoService when
we first wrote the Design Guide and its showing more than a few signs
of its age. The only time you should directly refer to EmbeddedNeo is
once, when you invoke it's constructor to start Neo.

Cheers,

-- 
Emil Eifrém, CEO [EMAIL PROTECTED]
Neo Technology, www.neotechnology.com
Cell: +46 733 462 271 | US: 206 403 8808
___
Neo mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo] Re: Neo shell problems...

2008-04-27 Thread Emil Eifrem
On Sun, Apr 27, 2008 at 11:54 PM, Philip Jägenstedt [EMAIL PROTECTED] wrote:
  I don't know why. Again, my nodespace is ∅ so if there are some
  assumptions made that there will acutally be something there, it is
  not so.

Quick comment: Mattias (the brain behind the Neo shell) is super busy
right now and will then be on a plane for about 16 hours. But he'll
look into this as soon as he's back. There's for certain nothing in
Neo shell that assumes a non-empty node space though, so that's not
it.

Cheers,

-- 
Emil Eifrém, CEO [EMAIL PROTECTED]
Neo Technology, www.neotechnology.com
Cell: +46 733 462 271 | US: 206 403 8808
___
Neo mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo] Mapping UUID to Neo node

2008-04-27 Thread Emil Eifrem
On Mon, Apr 28, 2008 at 4:07 AM, Philip Jägenstedt [EMAIL PROTECTED] wrote:
 That sounds good, but no matter how I try I can't find a jar of
  neo-utils. I know everybody uses maven where things just float around
  in the sky and automagically appear at the right moment, but surely
  using maven isn't mandatory?

It surely isn't. We just haven't fixed all our infrastructure to
automatically produce artifacts and deploy them onto dist.neo4j.org.
If you want to manually emulate Maven, however, you can just point
your browser to http://m2.neo4j.org and click your way through. Not
pretty, but it works for now.

At some point though, just using Maven may be the easier way out.

Cheers,

-- 
Emil Eifrém, CEO [EMAIL PROTECTED]
Neo Technology, www.neotechnology.com
Cell: +46 733 462 271 | US: 206 403 8808
___
Neo mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo] Community building in the wiki!

2008-04-23 Thread Emil Eifrem
On Wed, Apr 23, 2008 at 7:46 PM, Philip Jägenstedt [EMAIL PROTECTED] wrote:
 Just kidding, it's just me. Since you do have a wiki, I'm leaving
  comments on some things on the Talk pages, so I hope that there is
  someone who actually checks these from time to time.

Hmm, to be perfectly honest: not really. I do have an RSS feed with
Wiki updates. But fragmenting our discussions into one more forum is
probably not for the best at the moment. How about keeping
wiki-related discussions on the mailing list and logging wiki-related
tasks as tickets on http://trac.neo4j.org (component
infrastructure)?

Cheers,

-- 
Emil Eifrém, CEO [EMAIL PROTECTED]
Neo Technology, www.neotechnology.com
Cell: +46 733 462 271 | US: 206 403 8808
___
Neo mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo] Neo Questions / Suggestions

2008-04-09 Thread Emil Eifrem
On Wed, Apr 9, 2008 at 1:26 PM, Peter Haensgen [EMAIL PROTECTED] wrote:
 Hi there,

  I have been experimenting with Neo in the last couple of days. I think
  it's a very interesting project!

  However, I would be happy if someone could help me with some questions
  that I have.

Hi Peter,

Great feedback!


  1.   Finding of Nodes

  When I create a node and do not connect it with the reference node
  (directly or indirectly) via a relationship, how can I find it again
  later, if I don't know its id? I currently see a danger of loosing
  disconnected nodes in the database.

  I think there should be some API method in the NeoService class, which
  allows to iterate over all existing nodes, e.g. something like:

  IterableNode getAllNodes();

  (This could also be useful to implement some garbage collection, which
  could drop all unreachable nodes.)

I agree, this is a useful method that we should add. Logged as ticket #36:

   https://trac.neo4j.org/ticket/36

  2.   Count of elements
[snip, see later in thread]

  3.   Common superclass Element

  I think it would be useful to have a common superclass for Node and
  Relationship (e.g. Nodes extends Element, Relationship extends Element),
  which declares the methods that both types have:

  getId, hasProperty, getProperty, setProperty, removeProperty etc.

  This way in some situations no distinct implementations for each kind of
  element would be needed to access its properties.

Yep, I agree, this is ticket #31:

   https://trac.neo4j.org/ticket/31


  4.   Multiple instances in one VM

  Are multiple instances of Neo in one VM supported (connected with
  different data directories)? I could imagine that there are problems of
  keeping things separated because of the static access to
  Transaction.begin()?

As pointed out by Peter, this has now been fixed in the latest snapshots.

On a related note, I'm not too happy about polluting a domain
interface like NeoService with system facilities like transactions. So
the beginTx() operation will probably be moved to a
NeoTransactionService factory later (which EmbeddedNeo in turn may
very well implement). The same goes for enableRemoteShell().


  5.   Documentation

  The Wiki contains some nice articles, but they are hard to find. I think
  they should be linked in a list of contents (e.g. on the main page)?

Ah, which articles in particular do you have in mind? Johan and I
wrote some initial drafts of improved documentation a while back but
we didn't add direct links to them because we felt they still needed
some cleaning up. Probably a mistake, now that it's turned out to take
a bit longer to get to that cleanup phase than we initially thought.
:)


  6.   Neo Console

  With the remote debugger, I can connect to a running Neo instance in
  order to inspect it. Can I also use it standalone (e.g. it should open a
  Neo instance itself?) This could be useful to inspect the results of
  some test case, after the test has already shut down.

Yes, you can but it's (currently) a bit messy: you need to have the
shell jar as well as Neo and JTA on the classpath. But then you can
point it to a local dir and browse away. Mattias (who hacked the code)
will add some documentation on the wiki about it tomorrow.

Cheers,

-- 
Emil Eifrém, CEO [EMAIL PROTECTED]
Neo Technology, www.neotechnology.com
Cell: +46 733 462 271 | US: 206 403 8808
___
Neo mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo] JTA dependency in Maven failing

2008-01-09 Thread Emil Eifrem
On 1/9/08, Jonas Bergvall [EMAIL PROTECTED] wrote:
 Hi all,

 When rebuilding my project on a clean machine I get an error saying it
 can't find the JTA version 1.0.1 dependency.
 In http://repo1.maven.org/maven2/javax/transaction/jta/ I only find
 1.0.1B, but Neo requires 1.0.1. But it looks like it's been this way
 for some time.
 Any idea why I get this problem?

Hmm, we just did some backend changes on the repo. I might have fixed
it now tho. Can you try again?

Cheers,

-- 
Emil Eifrém, CEO [EMAIL PROTECTED]
Neo Technology, www.neotechnology.com
Cell: +46 733 462 271 | US: 206 403 8808
___
Neo mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo] First external committer?

2007-11-21 Thread Emil Eifrem
On 11/21/07, Viktor Klang [EMAIL PROTECTED] wrote:
 Okay, now I've made the TraverseSpecification into a standalone class (One
 class, One file...)

 Now the syntax looks something like:

 for(Node node : orderByBreadth()
 .include(MyRelTypes.FOO)
 .include(MyRelTypes.BAR, Direction.BOTH)
 .untilEndOfNetwork()
 .returnAll()
 .traverse(root))
 {
 System.err.println(NodeName:  + node.getProperty(name));
 }

Looks nice. We can discuss the details more in, uh, detail, later,
when we can look at actual API.


And this is just the most simplified version, there is also:

orderBy(Order)
until(StopEvaluator)
returnAll(ReturnableEvaluator)
include(RelationshipType...)

Not sure what you mean with this syntax (RelationshipType...), but
just one point: one of the main drawbacks with the node.traverse(...)
API is that it uses an Object vararg to express a variable-length list
of reltype/direction pairs.

That design choice gives the obvious advantage of allowing a very nice
syntax for adding an arbitrary number of reltype/direction pairs which
works in a single-method (not fluent) world. The problem is that the
only common supertype of those two is Object and using Object varargs
is really a big no-no in most cases -- the main for us being that the
compiler won't warn you if you add only a reltype (without a
direction). Which really sucks.

At the end of the day, I decided that the benefits outweighed this
problem and went for it, hoping that IDEs would help us sort it out.
But if we make a fluent-style traverser config, then in my opinion, we
really should have the relationship specification methods use
reltype/direction pairs.

Don't know if that's what you meant. But just thought I'd point that out.

Cheers,

-- 
Emil Eifrém, CEO [EMAIL PROTECTED]
Neo Technology, www.neotechnology.com
Cell: +46 733 462 271 | US: 206 403 8808
___
Neo mailing list
User@lists.neo4j.org
http://lists.neo4j.org/mailman/listinfo/user


Re: [Neo] First external committer?

2007-11-21 Thread Emil Eifrem
On 11/21/07, Viktor Klang [EMAIL PROTECTED] wrote:
 Today, the traverser does not enforce a Direction when passed a
 RelationshipType[] and a Direction[]
 when they are both of the same length:

 consider:

 RelationshipType[] types = {FOO,BAR};
 Direction[] dirs = { null, INCOMING };

 node.traverse( types, dirs...) //This runs just fine.

 I decided not to break that in TraverseSpecification.

Ah. That's an API compliance bug. As per:

The variable-length argument list should be every other relationship
type and direction, starting with relationship type, e.g:

node.traverse( BREADTH_FIRST, stopEval, returnableEval, MyRels.REL1,
Direction.OUTGOING, MyRels.REL2, Direction.OUTGOING, MyRels.REL3,
Direction.BOTH, MyRels.REL4, Direction.INCOMING );

Unfortunately, the compiler cannot enforce this so an unchecked
exception is raised if the variable-length argument has a different
constitution.

   (from: 
http://api.neo4j.org/current/org/neo4j/api/core/Node.html#traverse(org.neo4j.api.core.Traverser.Order,%20org.neo4j.api.core.StopEvaluator,%20org.neo4j.api.core.ReturnableEvaluator,%20java.lang.Object...))

We already have a real value to denote ignore directions
(Direction.BOTH) so I think the specified behavior (rather than the
actual one) is the right way to go. Johan will track that down and
make sure it throws an IAE.

Cheers,

-- 
Emil Eifrém, CEO [EMAIL PROTECTED]
Neo Technology, www.neotechnology.com
Cell: +46 733 462 271 | US: 206 403 8808
___
Neo mailing list
User@lists.neo4j.org
http://lists.neo4j.org/mailman/listinfo/user


Re: [Neo] Re: [ticket] #13: EmbeddedNeo should implement a service interface

2007-11-06 Thread Emil Eifrem
On 11/6/07, Tobias Ivarsson [EMAIL PROTECTED] wrote:
 How does the time line look for this change?
 It would be nice to know when the api we are working with changes so that
 work can be planned accordingly.

Hi,

We'll get this into beta 6 which should be out this weekend.

Cheers,

-- 
Emil Eifrém, CEO [EMAIL PROTECTED]
Neo Persistence AB, www.neopersistence.com
Cell: +46 733 462 271 | US Cell: 206 403 8808
___
Neo mailing list
User@lists.neo4j.org
http://lists.neo4j.org/mailman/listinfo/user


Re: [Neo] Suggestions for a Design with Neo Guide

2007-07-31 Thread Emil Eifrem
On 7/31/07, Björn Granvik [EMAIL PROTECTED] wrote:
 Hi Klas,

 The topics below are very interesting! I'd love to read it :)

 But to me it looks like the first getting started with Neo chapters
 are missing.
 Are they excluded from this guide? Or can they be found somewhere
 else - a Getting started with Neo?

There's a Getting Started Guide on the wiki:

   http://wiki.neo4j.org/content/Getting_Started_Guide

... as well as the compressed one-minute version:

   http://wiki.neo4j.org/content/Getting_Started_In_One_Minute_Guide

Cheers,

-- 
Emil Eifrém, CEO [EMAIL PROTECTED]
Neo Persistence AB, www.neopersistence.com
Cell: +46 733 462 271 | US Cell: 206 403 8808
___
Neo mailing list
User@lists.neo4j.org
http://lists.neo4j.org/mailman/listinfo/user


Re: [Neo] Summary of topics for the design guide

2007-07-31 Thread Emil Eifrem
On 8/1/07, Björn Granvik [EMAIL PROTECTED] wrote:
 Hi,

 It sounds a bit like a poor-man's-meta model. Or am I barking up the
 wrong node tree here? :-)

Ah, yes, good call. The subreference nodes could sometimes be grouping
nodes by type. My example certainly implied so. And in those
situations it's a poor man's meta model. But that is definitely not
always the case: you can group nodes by a lot of other things. So the
subreference design pattern has value even when we have a meta model.
And conversely, the meta model will provide a lot of value other than
handing out references to all nodes of a certain type.

But more about a meta model for Neo later...

Cheers,

-- 
Emil Eifrém, CEO [EMAIL PROTECTED]
Neo Persistence AB, www.neopersistence.com
Cell: +46 733 462 271 | US Cell: 206 403 8808
___
Neo mailing list
User@lists.neo4j.org
http://lists.neo4j.org/mailman/listinfo/user


Re: [Neo] relationship.getOtherNode(localnode) returning null?

2007-06-21 Thread Emil Eifrem

On 6/20/07, Peter Neubauer [EMAIL PROTECTED] wrote:

Hi there,
not sure this is trivial but relationship.getOtherNode(localnode) is
giving me null in some cases. Can this occur and what is the reason
for it?


This should not happen. The API specs at

  
http://api.neo4j.org/1.0-b5/org/neo4j/api/core/Relationship.html#getOtherNode(org.neo4j.api.core.Node)

is very clear that the only thing that can be returned is the start or
end node of the relationship, or a runtime exception if the client
passes in a node that's not connected to either end of the
relationship. It should never return null.

So it's a bug. Not sure when the current implementation can
(erroneously) return null. Johan may be able to shed some light on
that?

Cheers,

--
Emil Eifrém, CEO [EMAIL PROTECTED]
Neo Persistence AB, www.neopersistence.com
Cell: +46 733 462 271 | US Cell: 206 403 8808
___
Neo mailing list
User@lists.neo4j.org
http://lists.neo4j.org/mailman/listinfo/user