3 ms·
this is interesting, but how do you do the actual graph queries ? The ones built on Cassandra do this using Spark and neo4j has a built in engine (Gremlin). An
by sandGorgon 8y ago
this is interesting, but how do you do the actual graph queries ?
The ones built on Cassandra do this using Spark and neo4j has a built in engine (Gremlin). Any examples of how you map graph queries to relational table structures ? Especially the ones that need traversal
- hugofirth 8y agoJust as a minor correction: Neo4j does have a built in query engine, but it is for the declarative query language Cypher, not the graph traversal framework Gremlin. Using spark as the example, think spark-sql vs operating over RDDs
- sandGorgon 8y agoyou are right - i wanted to write Cypher. Gremlin is for tinkerpop. But the question still stands - how does the query engine here work ? at the end of the day, its still a relational system.
- frew 8y ago(I'm the author of the post - just woke up and saw this discussion. Hi!) Will put together a follow-up with some more information, but in summary: * yeah, no built-ins for graph operations in Spanner other than relational SQL for standard joins * the key thing that make this work are the ability to easily construct global indexes that aren't sharded by the primary key and reasonably fast joins between them * it's also helpful that Spanner does a reasonable job of parallelizing queries (e.g. a lot of times we'll get a 15x increase in speed vs. a sequential plan) * we then do the fan-out across the graph in our Java Spanner client - each distributed SQL index read takes ~10 ms so we can do multiple round trips of graph traversal in the client
- sandGorgon 8y agoWould love to know more details about the graph traversal/fanout part. This is the stuff that most of us go to spark for, so would love to know how spanner makes this easier.