The diagram is excellent. Nice to see that we have the separate modules
approach in place for each GLV - very nice direction.
I like this idea:
> 1. bin/gremlin.sh —language gremlin-python
it would be nice to have a universal gremlin console though it may mean a
departure from the dependence on groovysh to do so. I'd have to think about
that one - it might not be as easy as just "swapping out the scriptengine".
On Wed, Jun 22, 2016 at 4:56 PM, Marko Rodriguez
wrote:
> Hello,
>
> I created gremlin-python/ package and killed gremlin-variant/ package.
> Thus, the links I provided in the email earlier this morning are busted.
> You can move around from here to re-find the references.
>
> https://github.com/apache/tinkerpop/tree/TINKERPOP-1278/gremlin-python/src/main
> <
> https://github.com/apache/tinkerpop/tree/TINKERPOP-1278/gremlin-python/src/main
> >
>
> Thanks,
> Marko.
>
> http://markorodriguez.com
>
>
>
> > On Jun 22, 2016, at 7:36 AM, Marko Rodriguez
> wrote:
> >
> > Hello,
> >
> > I have been working on TINKERPOP-1278 for a couple of weeks now and here
> is where my thoughts are going.
> >
> > First, a review of the concepts.
> >
> > 1. Apache TinkerPop is a JVM-based graph computing framework.
> > 2. Gremlin can be embedded/represented in any programming language
> that supports function composition and function nesting.
> > - Every programming language supports these two constructs.
> > 3. There are two ways in which XXX language can work with Apache
> TinkerPop.
> > a.) XXXScriptEngine can directly use TinkerPop classes.
> > b.) XXX “mocks” of TinkerPop’s Traversal and
> RemoteConnection in the respective language.
> > 4. The language that is representing/hosting Gremlin is called the
> “source language.”
> > 5. The language that the Gremlin traversal will ultimately be
> executed on in the JVM is called the “target language.”
> > 6. It is the responsibility of a Translator to translate the
> source language into the target language.
> >
> https://github.com/apache/tinkerpop/blob/TINKERPOP-1278/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/util/Translator.java
> <
> https://github.com/apache/tinkerpop/blob/TINKERPOP-1278/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/util/Translator.java
> >
> > - getAlias() is function naming.
> > - addStep(), addSpawnStep(), addSource() is
> function composition.
> > - getAnonymousTraversalTranslator() is function
> nesting.
> > - getSourceLanguage() and getTargetLanguage() is
> translator metadata.
> > 7. It is possible/reasonable for both source and target languages
> to be on the JVM.
> > - For example, Gremlin-Java translating to Gremlin-Groovy
> so it can avoid the complications of serialization and support remote
> lambda execution.
> >
> https://github.com/apache/tinkerpop/blob/TINKERPOP-1278/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/GroovyTranslator.java#L58-L66
> <
> https://github.com/apache/tinkerpop/blob/TINKERPOP-1278/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/GroovyTranslator.java#L58-L66
> >
> >
> > From this foundation, we should work towards the following:
> >
> > 1. bin/gremlin.sh —language gremlin-python
> > - this will load up a GremlinConsole where a
> GremlinJythonScriptEngine is used to read and return results.
> > - same gremlin> and ==> look-and-feel, but now its Python,
> not Groovy that is the scripting language.
> > - In this way, Python people can work with TinkerPop and
> NEVER leave Python.
> > 2. Moving forward, we then have gremlin-jruby and respective
> GremlinJRubyScriptEngine.
> > - In this way, Ruby people can work with TinkerPop and
> NEVER leave Ruby.
> > 3. Unlike Groovy, Python and Ruby have representations outside of
> the JVM and thus, need VM agnostic code (i.e. they can’t just “new
> GraphTraversal”).
> > - PythonGraphTraversal (which is NOT just GraphTraversal
> used by Gremlin-Jython on the JVM).
> >
> https://github.com/apache/tinkerpop/blob/TINKERPOP-1278/gremlin-variant/src/main/jython/gremlin_python/gremlin_python.py
> <
> https://github.com/apache/tinkerpop/blob/TINKERPOP-1278/gremlin-variant/src/main/jython/gremlin_python/gremlin_python.py
> >
> > - It is simple to auto generate XXX
> language “mocks” using reflection.
> >
> https://github.com/apache/tinkerpop/blob/TINKERPOP-1278/gremlin-variant/src/main/groovy/org/apache/tinkerpop/gremlin/python/GremlinPythonGenerator.groovy
> <
> https://github.com/apache/tinkerpop/blob/TINKERPOP-1278/gremlin-variant/src/main/groovy/org/apache/tinkerpop/gremlin/python/GremlinPythonGenerator.groovy
> >
> > -