Search code examples
javagremlintinkerpop3amazon-neptune

In Gremlin, is it possible to split remote/local traversal?


As Gremlin currently does not support case-insensitive predicates, I would like to experiment with the performance of running part of my traversal on a remote (in this case, Neptune) that does not support lambda steps, then "transferring" the remainder of the traversal to run locally. Is this possible at all? If so, how do I express "perform this part on the remote, then slurp and run locally"?


Solution

  • If you are using the Java Gremlin client then any subgraph you return using the Gremlin subgraph step will be returned as a TinkerGraph object. You can then create a new graph traversal source for that graph and process it locally. I have done this myself in the past when I wanted to cache parts of my graph in local memory.

    As an alternative, Neptune does support using an Elastic Search cluster to help with full text search type queries.