by motohagiography · 8y ago · 0 comments
The reason I use a graph is for consistency from my product level business logic to my implementation.
Basically, to solve my problem, I started with a set of english statements, which yielded a grammar, that I described as "objects and morphisms," (things and relationships) then implemented it in a graph - put a front end on it and built a product.
Graphs provide coherence to my problem. Could an RDBMS do this? Yes, but not without a complex intermediate query layer. I think of using a graph as analogous to specifying your problem in terms of a functional language instead of imperatively. The reason to do that is because your product is the result of maintaining consistency of an abstraction, like a DSL or a game, instead of just retrieving stored values, documents and their variations.
It's disruptive to a lot of orgs as well, since there is a lot of sunk cost in RDBMS experience, so I think the applications are all net new projects. I don't foresee anyone migrating to one, but I do see a point where majority of new products use one.
We absolutely wouldn't be where we are without our community. From drivers and tooling to the huge amounts of support and goodwill that we see, it's a wonderful ecosystem to be a part of.
Once I learned Cypher and some common graph data modeling constructs, I found I could build more complex applications faster using Neo4j, largely because I found the graph model of my project's domain more intuitive and easier to work with than a relational database model.
Similarly, building and using GraphQL APIs has been a huge productivity win once I figured out how to build GraphQL services.
Of course, when used together, Neo4j and GraphQL have some great synergies, since it's graph all the way down ;-)
It's also worth pointing out that Neo4j has some great GraphQL integrations [1].
Lessons learned for me:
- start with very small datasets (mine was 10k nodes/40k edges/5 types and that still sent it to the moon in many cases)
- get to know the query planner right away
Cypher seems to reward a more deliberate and iterative approach to learning it rather than the ol' grip it and rip it. Once I settled down a bit it came together quite nicely.
Thank you for your insights.