Re: node-neo4j 2.0

49 views
Skip to first unread message

Aseem Kishore

unread,
Aug 25, 2014, 1:11:45 AM8/25/14
to Winniehell, Node-Neo4j Discussion
(+node-neo4j google group. Thought you asked a great question and wanted to share my reply more broadly too.)

Hi Winnie,

I'm sorry for the delay! Work is really intense right now, as we at FiftyThree are approaching our biggest product launch to date — and something that's built on Neo4j. =)

I have *not* yet started writing node-neo4j 2.0, so a patch would definitely be welcome!

I wanted to say two caveats though:

1) The reason I haven't added labels yet is because even though Neo4j 2.0 provides a REST API to do so, in practice, I feel you're better served by setting labels directly when you create nodes — which can only be done through Cypher today. (And you can already do that with node-neo4j's existing Cypher support.) If you use its REST API instead, the label will get added as a separate transaction, plus add another network round-trip. Maybe that's okay for your use case.

2) Having transitioned our app to Neo4j 2.0, and fully embracing Cypher for everything now (it's very powerful), I'm personally reconsidering the role of a driver like node-neo4j. At this point, we're literally *only* using its Cypher functionality, nothing else. I think it would make a lot of sense to build a higher abstraction now, maybe something like Rails's ActiveRecord but tailored towards graphs/Neo4j/Cypher. We have been slowly thinking about this at FiftyThree and would love to spearhead this after our launch.

Happy either way to receive your patch and/or your thoughts. Good luck and thanks again for reaching out!

Cheers,
Aseem


On Fri, Aug 15, 2014 at 8:51 AM, Winniehell <g...@winniehell.de> wrote:
Hi Aseem!

Thank you for the node-neo4j package! I'm using it for a new project.

As some other people already mentioned, node labels are missing for me
as well and I am willing to provide you with a patch for it. Have you
already started rewriting the package for neo4j 2.0 or may I as well
write a pull request for the current version?

Winnie

Winniehell

unread,
Aug 31, 2014, 6:12:25 AM8/31/14
to Node-Neo4j Discussion, Aseem Kishore
Hi Aseem,

Thank you for the reply and the helpful input!

> I have *not* yet started writing node-neo4j 2.0, so a patch would
> definitely be welcome!
Happy to hear that as I have already forked and started on some
refactoring. ;-)

> 1) The reason I haven't added labels yet is because even though
> Neo4j 2.0 provides a REST API to do so, in practice, I feel you're
> better served by setting labels directly when you create nodes
Sounds reasonable. Yet I think a cypherless API eases the initial
playing-around-phase with Neo4j which I consider very valuable.

> 2) I think it would make a lot of sense to build a higher
> abstraction now
I like the idea. Nevertheless, without having any material numbers at
hand I am a bit frownish towards Cypher as interface protocol for higher
abstraction. In my opinion a binary protocol suits the needs better in
terms of performance. But maybe one can think about precompiling
parameterized querys in advance to cope with that issue. I have not had
a look at the documentation of Neo4j yet whether that is already
supported.

> Happy either way to receive your patch and/or your thoughts. Good
> luck and thanks again for reaching out!
As already mentioned, I forked the project and started by adding service
classes to separate functionality into the corresponding REST endpoints.
I also added new test suited because I like test driven development. :-)
It is not likely that I will catch up with all Neo4j 2.0 features any
time soon as I have very little time to spend on this.

Winnie
Reply all
Reply to author
Forward
0 new messages