Another Word For It Patrick Durusau on Topic Maps and Semantic Diversity

December 8, 2011

Multilingual Graph Traversals

Filed under: Gremlin,Groovy,Java,Scala — Patrick Durusau @ 8:00 pm

OK the real title is: JVM Language Implementations. 😉 I like mine better.

From the webpage:

Gremlin is a style of graph traversing that can be hosted in any number of languages. The benefit of this is that users can make use of the programming language they are most comfortable with and still be able to evaluate Gremlin-style traversals. This model is different than, lets say, using SQL in Java where the query is evaluated by passing a string representation of the query to the SQL engine. On the contrary, with native Gremlin support for other JVM languages, there is no string passing. Instead, simple method chaining in Gremlin’s fluent style. However, the drawback of this model is that for each JVM language, there are syntactic variations that must be accounted for.

The examples below demonstrate the same traversal in Groovy, Scala, and Java, respectively.

Seeing is believing.

No Comments

No comments yet.

RSS feed for comments on this post.

Sorry, the comment form is closed at this time.

Powered by WordPress