You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tinkerpop.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2017/04/09 16:38:41 UTC

[jira] [Commented] (TINKERPOP-1552) C# Gremlin Language Variant

    [ https://issues.apache.org/jira/browse/TINKERPOP-1552?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15962184#comment-15962184 ] 

ASF GitHub Bot commented on TINKERPOP-1552:
-------------------------------------------

GitHub user FlorianHockmann opened a pull request:

    https://github.com/apache/tinkerpop/pull/600

    TINKERPOP-1552 Add Gremlin-CSharp and Gremlin-DotNet

    https://issues.apache.org/jira/browse/TINKERPOP-1552
    
    Organization of the C# project:
    - `Gremlin.CSharp` is the C# GLV, it is nearly completely auto generated (except for the `Graph` class)
    - `Gremlin.Net`: Contains the driver that is basically an extension of the [existing Gremlin.Net driver](https://github.com/FlorianHockmann/Gremlin.Net) and the structure API, including GraphSON writers and readers.
    - `Gremlin.Net.Process`: Driver independent implementation + interfaces of common functionality for .NET GLVs. Allows Gremlin-CSharp to be used together with another driver.
    
    So this organization makes it possible to use Gremlin-CSharp together with another driver and it also allows to reuse a big part of the functionality for another .NET GLV.
    
    One design decision I took: The method names comply with .NET conventions and therefore use pascal case, so `g.V().has('name','marko').next()` becomes `g.V().Has('name','marko').Next()`. This should make it feel very natural for any C# programmer to work with Gremlin-CSharp. An added benefit is that it avoids reversed keywords in C# like `in` or `as` that would require a special treatment otherwise.
    
    In general, Gremlin-CSharp is very close to Gremlin-Python. This also means that it is not type-safe, all steps simply expect a `params object[]`. It was very easy to generate Gremlin-CSharp this way but this should be improved in the future.
    
    In order to support building everything from Maven, I decided to use a Maven plugin that allows building of .NET Core projects: https://github.com/kaspersorensen/dotnet-maven-plugin
    This made it relatively simple to integrate the .NET projects into the regular build process.
    
    The documentation is hugely borrowed from that of Gremlin-Python. However, I couldn't really test the generation of the documentation as I already got errors with an unmodified version using the docker image. So it would be nice if someone could check whether the documentation is generated correctly with my changes.
    
    When you want to try out Gremlin-CSharp: You can build it on most modern operating systems, you only need a recent version of the [.NET Core SDK](https://www.microsoft.com/net/core). Alternatively, you can also use docker. I added the necessary steps to install .NET Core to the `Dockerfile`.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/FlorianHockmann/tinkerpop TINKERPOP-1552

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/tinkerpop/pull/600.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #600
    
----
commit 63410fed9ce642542bc4e0c10966989bacac2a30
Author: Florian Hockmann <fh...@florian-hockmann.de>
Date:   2017-04-06T17:02:23Z

    Add Gremlin-CSharp and Gremlin-DotNet
    
    This adds Gremlin-CSharp (a C# GLV), together with a .NET driver. The
    driver is based on Gremlin.Net
    (https://github.com/FlorianHockmann/Gremlin.Net) with added support for
    GLVs and Gremlin-CSharp is auto generated, very similar to
    Gremlin-Python.
    This should fix TINKERPOP-1552.

----


> C# Gremlin Language Variant
> ---------------------------
>
>                 Key: TINKERPOP-1552
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP-1552
>             Project: TinkerPop
>          Issue Type: Improvement
>          Components: language-variant
>    Affects Versions: 3.2.3
>            Reporter: Jorge Bay
>
> It would be nice to have a C# GLV that runs under .NET Framework 4.5+ and .NET Core.
> The maven build could use the Exec Maven Plugin to exec .NET Core's [dotnet test|https://www.microsoft.com/net/core#macos] command.
> Some requirements, from the mailing list (edited):
> {quote}
> 1. The GLV should keep in line with class/method names of the java API
> where possible to ensure consistency of feel across languages.
> 2. There needs to be adequate tests (we're still discussing the approach to
> testing GLVs and i think that needs to be tackled sooner than later as more
> GLVs start to come in). Those tests should produce xunit style output
> unless there is some good reason not to.
> 3. There needs to be adequate documentation (e.g. Reference docs)
> 4. The build/deploy process needs to be bound to maven which might be one of the trickier bits to deal with.
> {quote}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)