Skip to content
aseemk edited this page Feb 22, 2013 · 11 revisions

This page will serve both a planning and an informational page.

v0.2

The current version of node-neo4j is pretty functional and feature-complete. You can do most things supported by the Neo4j REST API, including sending custom Cypher queries and Gremlin scripts. We've been using it in production for over a year, and it works just fine.

v1.0

But the API can definitely use an overhaul and a re-thinking; a version bump may be good for that. Here are some ideas and areas to consider:

  • Indexing. Should fully flesh out operations (like unindexing) and add first-class support for auto-indexes (currently, client code has to e.g. hardcode the node_auto_index name in queries), but should also centralize these operations. Maybe an Index class?

  • Node creation. GraphDatabase.createNode() should at least persist automatically now, but we may also want to add a getOrCreate() type of method tied to unique indexing and/or mutable Cypher's CREATE UNIQUE operation.

  • Batch API. We need to look more closely at how this works, but if possible, could we auto-support it for all operations done within a single Node event loop tick? That may not be a good idea though given that one failed request would cause the entire batch to fail, which would be unwanted for unrelated operations. But maybe we could support it explicitly e.g. via beginBatch()/endBatch() type methods. We might not be able to support having one operation depend on the outcome of another unless we really rethink the API to incorporate promises/futures.

  • Move to a load()/loaded API. Currently, Node and Relationship instances returned as part of Path instances aren't "loaded" -- we only know their endpoint URLs. We should consider shifting the API slightly to expose this notion formally of load()/loaded to go well with save().

  • Cypher DSL? We could streamline common use cases like fetching multiple nodes, fetching adjacent nodes, filtering, etc. But maybe we should just leave it alone and let clients write Cypher queries just the way they want?

  • Streaming support! Now that Neo4j can stream its responses, we should strongly consider adding support for clients to react to streams now too, e.g. for Cypher results.

Clone this wiki locally