We're updating the issue view to help you get more done. 

Provide a fluent API for DSE Graph

Description

Offering a fluent API for DSE Graph would provide an improved and less error-prone alternative to the string-based queries. In strongly-typed languages, this will also have the benefit of the additional compile time checks.

Currently nearly all of the pure TinkerPop drivers use a String based approach. However in the world of Titan, there is the remote server mode that gives the client access to the Graph object. From a programmatic standpoint, it's perfect because it gives full access to the Graph. However this translates into a much less efficient approach because all of the queries to the underlying data store have to be issued from the remote endpoint. It's also based on a chatty protocol. So it's not the best model in terms of implementation. There is a subtle nuance of remote server mode being able to construct the object and therefore removing the overhead of parsing and interpreting the query, but it's assumed that the network overhead previously mentioned will outweigh the cost of parsing/interpreting. Also in a future release, there will also be which will allow for more intelligent query routing with the end goal of prepared graph statements similar to prepared statements in an RDBMS or Cassandra - so you only have to pay the cost of parse/interpret once for those queries.

In more recent versions of TinkerPop, there is something called the RemoteGraph interface that gives access to a Graph object for traversals. This could be the foundation of a much more efficient fluent api for Graph. Combine that with fluent methods for mutations.

So in essence, this would be a fluent Java API that is exactly the same as the Graph methods for traversals. That serializes down into a String to be sent to the server. The server parses the Gremlin String, does whatever optimizations it can, then send the results back to the client to be deserialized and used.

This would be nice for Java but also for other languages that want the same feature set and don't want to embed Groovy/Gremlin strings into their python, node, C#, etc. code. This is where TINKERPOP-1278 would come in. This ticket creates a way to do an idiomatic fluent api for various languages and includes a way to do the serialization to and from the gremlin server(s). Once that is done, Java as well as any other language can have the fluent api as well as an efficient protocol for communication with the gremlin server(s).

Environment

None

Pull Requests

None

Status

Assignee

Kevin Gallardo

Reporter

Jeremy Hanna

Labels

None

PM Priority

None

Reproduced in

None

External issue ID

None

External issue ID

None

External issue ID

None

External issue ID

None

External issue ID

None

External issue ID

None

Doc Impact

None

Reviewer

None

Size

None

Components

Sprint

Fix versions

Priority

Major