


Given the "people discussing content" graph structure, a Gremlin novice could immediately begin to navigate the graph. Traversing Discussions in Graph Terminology A person writes a post which may be in reference to a different post that was written earlier. One of the interesting properties of Gremlin is that it allows programmers to extend upon the language for even greater programmatic expressiveness, not just within graphs, but within the domain that the graph itself resides.Īn important aspect to Pearson’s graph is the notion of "people discussing content." For purpose of the upcoming examples, think of "content" as an online discussion forum, with instructor assigned topics for students to share discourse and open debate. It provides for an intuitive way to not only think in terms of a graph, but to program in terms of one as well. Gremlin is a Groovy-based DSL for traversing property graphs and has applicability in the areas of graph query, analysis, and manipulation. Together these components form a coarsely-grained API which helps bring general accessibility to complex graph traversals. The OpenClass DSL defines the graph schema, extends the Gremlin graph traversal language into the language of education, provides standalone functions that operate over these extensions, and exposes algorithms that are developed from those extensions and functions. Engineers and analysts can then ask questions of the graph in their educational domain language, as opposed to translating those familiar terms into the language of vertices and edges. lines, relationships), so in essence, the domain model embeds conceptual meaning into graph elements.Īt Pearson, the OpenClass domain model is extended into a programmatic construct, a DSL based on Gremlin, which abstracts away the language of the graph. When thinking in graph terminology, these “conceptual entity and relationship types” are expressed as vertices (e.g. For example, the graph modeled students enrolling in courses, people discussing content, content referencing concepts and other entities relating to each other in different ways. It described the educational domain space and provided a high-level explanation of some of the conceptual entity and relationship types in the graph. Pearson’s OpenClass Education-based DSLĪn earlier Aurelius blog post entitled " Educating the Planet with Pearson," spoke of the OpenClass platform and Titan’s role in Pearson’s goal of "providing an education to anyone, anywhere on the planet". Please see Gremlin DSLs in Java with DSE Graph for more details. A newer post has been written that is focused on TinkerPop 3.x and introduces a revised development pattern.

IMPORTANT: This blog post is written with TinkerPop 2.x in mind. DSLs also have the benefit of making it possible for non-programmers to “speak” in the same language as their programming counterparts, thus lowering technical communication barriers. It enables the developer to gain greater productivity by hiding low-level programming constructs in favor of higher level ones that better link to the elements of the domain itself.
#Run space gremlin as root code#
Domain Specific Languages (DSLs) provide a way for programmers to increase the expressivity of their code within a specific domain.
