Submitting DSE Graph queries with the DataStax drivers
The DataStax drivers expose the String API and Fluent API for executing DSE Graph traversals.
Graph use cases are characterized by highly connected data. Traversing these connections is essential for solving modern fraud detection and personalization use cases. To address the emerging demand of the Graph database, DataStax invests heavily into the Apache TinkerPop graph computing framework that leverages Gremlin as its property graph query language and core API. The DataStax drivers expose several interfaces for executing DSE Graph traversals:
-
Fluent API (analogous to TinkerPop Bytecode API)
-
String API (analogous to TinkerPop Script API)
-
remote traversal sources for full compatibility with TinkerPop’s execution model
DataStax recommendes Fluent API as the interface for graph traversals.
Fluent API
The DataStax drivers Graph Fluent API leverages TinkerPop’s Gremlin Language Variants and allows developers to programmatically construct Gremlin traversals and execute the compiled bytecode through a DSE session, similar to standard CQL queries. This interface is recommended for all new DSE Graph applications.
C/C++ [1] |
PHP [1] |
Ruby (not supported) |
Remote traversal source
The DataStax drivers allow a TinkerPop GraphTraversalSource
to be remotely connected to DSE Graph.
This source lends full compatibility with TinkerPop types and uses an implicit execution model through the TinkerPop terminal steps.
The results for a |
C/C++ [1] |
PHP [1] |
Ruby [1] |
Domain Specific Languages
Domain Specific Languages (DSLs) simplify code and provide concise APIs for DSE Graph applications. DSLs allow the developer to abstract the underlying Gremlin code that is traversing the DSE property graph into usable methods that are tailored to the application.
C/C++ [1] |
Node.js [1] |
PHP [1] |
Ruby [1] |
User-defined IDs
Partition and clustering keys in DSE Core extend to DSE Graph. Use partition and clustering keys when creating vertex labels. Vertex labels more effectively distribute the data throughout the cluster and gives the user control over where the data is distributed.