Ask HN: If you've used a graph database, would you use it again?
1–10 of 84 posts
Re: Ask HN: If you've used a graph database, would you use it again?
#2I liked Neo4j quite a bit, it could handle all the sensor/IoT data we could throw at it. Back then it had (and I'm sure still does) a beautiful interactive data visualization dashboard, great Cypher tutorials, and more.
Neo4j is a good database. I went to write a database driver for it, and found it extraordinarily difficult. I knew it would take at least a month of work to build.
At the same time really cool tools like Firebase were becoming popular, and Multi-Master database architecture with Cassandra and Riak were showcasing what high availability could do.
So I decided, rather than implementing the Neo4j driver, which I knew was bound to Neo4j's Master-Slave architecture, I would rather switch to Firebase or build my own mashup of all the tools I wanted:
- Firebase (realtime)
- Neo4j (graphs)
- Cassandra (multi-master / P2P)
- CouchDB (offline-first)
I spent a few weeks building a prototype and submitted it to HackerNews in early 2014. It was a huge success.
Since then, we've gotten 7.5K+ stars (https://github.com/amark/gun), raised venture capital money, and introduced decentralized cryptographically secure user blockchains, and a ton more.
Graph databases, to me, are so compelling, I have not only "used them again" but spent the last 3.5+ years of my life dedicated to building, improving, and making them more awesome.
I certainly hope others try them, even if it isn't GUN. They're worth a shot, but aren't a silver bullet, so use them where it makes sense.
Re: Ask HN: If you've used a graph database, would you use it again?
#3Consider the following case:
Client A issues a query -- starting from a vertex, conduct bounded closure search, giving every visited vertex a mark (coloring, or lexical flag, whatever you would expect from a graph algorithm)
Client B issues a query -- clearing any marks applied to a particular vertex, which happens to be one of the visited vertex of Client A's query.
Now, race condition aside, let's assume we first process query A then B. Would we allow query B to succeed? It is clearly possible for query B to break the semantic of query A, for example, query A goes through a bridge and then query B cuts the bridge, so the connectivity information is lost.
Of course we could say that such query A should be a part of a transaction, and isolation can be more strictly enforced -- but again, to what degree? Poor locality will cause the transactions to be interconnected with each other. How does a graph database determine what is the true purpose of the algorithm under each query? What does it guarantee?
Many graph databases now claims ACID, but what do they really mean?
Is it just a fancy query language over a traditional data model? Say, you could also build graph queries for a SQL database -- what does a graph database provide that such graph-over-SQL cannot?
p.s. I work on Microsoft Graph Engine: https://github.com/Microsoft/GraphEngine. We decide to build a modular graph processor rather than calling it a graph database, because we don't really know by default, what kind of semantics does a user want. With GraphEngine, you could plug in linear query languages likq Gremlin or GraphQL, you can also plug in SPARQL, or traditional relational model with strong guarantees, or down to bare-metal key-value store with atomicity and durability only. I do think that a graph data model is very helpful in many scenarios, but I think we really need to advance the research on the semantic of graph management.
Re: Ask HN: If you've used a graph database, would you use it again?
#4Our data set could have been handled fine with a relational database, honestly. However this was a rare case where over-engineering a problem and using the latest technology saved time.
Re: Ask HN: If you've used a graph database, would you use it again?
#5A month later we rewrote everything in SQL - the main drivers were:
- as we refined our model, we realized that a relational DB with a bunch of join tables was good enough
- our developers were more comfortable working with SQL
- it wasn't possible to run complicated queries involving both databases simultaneously
- the Rails ORM felt easier to use than the Neo4j Ruby APIs (though this was certainly a function of our own familiarity with Rails and relational databases in general)
- having the extra database complicated our codebase and complicated our deployment
There was nothing horrifying or surprising in our encounter with graph databases. It just felt like we just made the wrong initial architectural decision. We were still trying to define the problem and were trying to use something we didn't fully understand.
I'd hesitate to use graph dbs in the future unless I needed a high-performance app with a lot of data that only a graph could model well. Otherwise having two different types of databases is annoying.
Re: Ask HN: If you've used a graph database, would you use it again?
#6[1] https://www.facebook.com/notes/facebook-engineering/tao-the-...
Re: Ask HN: If you've used a graph database, would you use it again?
#7While a lot of the work I do is covered by NDA, one problem that I've applied it that I can talk about is analyzing basketball play-by-plays. I've spent some time talking to the analytics team at an NBA franchise, and it turns out doing interesting analytics on play-by-plays can be a surprisingly tough nut to crack. RDF was a great tool for tackling this. Here's the source (written in Scala), for anyone interested at having a look: https://github.com/andrewstellman/pbprdf
Re: Ask HN: If you've used a graph database, would you use it again?
#8I wrote a driver for MongoDB in 2010, but then moved onto Neo4j in late 2013. I liked Neo4j quite a bit, it could handle all the sensor/IoT data we could throw at it. Back then it had (and I'm sure still does) a beautiful interactive data visualization dashboard, great Cypher tutorials, and more. Neo4j is a good database. I went to write a database driver for it, and found it extraordinarily difficult. I knew it woul…
Re: Ask HN: If you've used a graph database, would you use it again?
#9I wrote a driver for MongoDB in 2010, but then moved onto Neo4j in late 2013. I liked Neo4j quite a bit, it could handle all the sensor/IoT data we could throw at it. Back then it had (and I'm sure still does) a beautiful interactive data visualization dashboard, great Cypher tutorials, and more. Neo4j is a good database. I went to write a database driver for it, and found it extraordinarily difficult. I knew it woul…
What’s gun, you mean gnu open source ?
Re: Ask HN: If you've used a graph database, would you use it again?
#10As for me, for decades I've wanted to be able to have everything stored on my computer represented as a graph. (Times have changed, so there's obviously a strong network-connected aspect now.)