gremlin | Go graph database client for TinkerPop3 Gremlin Server | Graph Database library

 by   go-gremlin Go Version: Current License: MIT

kandi X-RAY | gremlin Summary

kandi X-RAY | gremlin Summary

gremlin is a Go library typically used in Database, Graph Database applications. gremlin has no bugs, it has no vulnerabilities, it has a Permissive License and it has low support. You can download it from GitHub.

Go graph database client for TinkerPop3 Gremlin Server
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              gremlin has a low active ecosystem.
              It has 96 star(s) with 50 fork(s). There are 6 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              There are 5 open issues and 3 have been closed. On average issues are closed in 141 days. There are 3 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of gremlin is current.

            kandi-Quality Quality

              gremlin has 0 bugs and 0 code smells.

            kandi-Security Security

              gremlin has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              gremlin code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              gremlin is licensed under the MIT License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              gremlin releases are not available. You will need to build from source code and install.
              Installation instructions are not available. Examples and code snippets are available.
              It has 330 lines of code, 20 functions and 4 files.
              It has low code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi has reviewed gremlin and discovered the below as its top functions. This is intended to give you an instant insight into gremlin implemented functionality, and help decide if they suit your requirements.
            • NewCluster initializes a cluster
            • CreateConnection creates a connection to all servers .
            • OptAuthEnv sets authentication information from environment variables .
            • Query creates a Request object .
            • SplitServers splits a connection string into a list of servers
            • GraphSONSerializer serializes the request to JSON
            • NewClient creates a new Client
            • NewAuthInfo returns AuthInfo struct
            • OptAuthUserPass is a functional option for AuthInfo .
            • NewFormattedReq creates a FormattedReq
            Get all kandi verified functions for this library.

            gremlin Key Features

            No Key Features are available at this moment for gremlin.

            gremlin Examples and Code Snippets

            No Code Snippets are available at this moment for gremlin.

            Community Discussions

            QUESTION

            TinkerPop Gremlin, how get child elements filtered and grouped
            Asked 2022-Feb-20 at 03:05

            I'm new to using Gremlin and I need help to set the best query to select unique and filtered results.

            Starting from a team I would get player (note: each player can play for more than one team) of each team connected by is_friends_with

            The result (I would like to get)

            ...

            ANSWER

            Answered 2022-Feb-19 at 17:17

            Here is one way to do it using group

            Source https://stackoverflow.com/questions/71178226

            QUESTION

            Gremlin: sorting nodes by weights provided by the client
            Asked 2021-Dec-10 at 23:48

            Hello dear gremlin jedi,

            I have a bunch of nodes with different labels in my graph:

            ...

            ANSWER

            Answered 2021-Dec-10 at 18:31

            You can try this approach, where in query you can map values to integer, and use simple order on those integers.

            Source https://stackoverflow.com/questions/70304381

            QUESTION

            Gremlin group all returned edges with its vertices
            Asked 2021-Nov-16 at 18:23

            I am a beginner in gremlin with Tinker pop. I have a graph where a cuisine has multiple inE("serves") from restaurants:

            From these restaurants, I want only two restaurants which have location "Karachi". These are:

            For this, I've written the query and it works fine:

            ...

            ANSWER

            Answered 2021-Nov-16 at 18:23

            You should look at using the project() step (documentation here) to get this sort of information. Without the steps to reproduce your graph, it is hard to give you the exact query, but it should look similar to the query below:

            Source https://stackoverflow.com/questions/69994189

            QUESTION

            Janusgraph Cache
            Asked 2021-Sep-12 at 08:46

            I was reading about Janusgraph Cache in Janusgraph documentation. I have few doubts Regarding the transaction cache. I'm using an embedded janusgrah server in my application.

            1. If I'm only doing a read query for eg. - g. V().has("name","ABC") using gremlin HTTP endpoint, so will this value be cached in transaction cache or database level cache? because here I'm not opening any transaction.
            2. If it is stored in the transaction cache, how updated values will be fetched for this vertex if I have multi-node deployment?
            ...

            ANSWER

            Answered 2021-Sep-12 at 08:46

            Regarding question 1:
            If not created explicitly, transactions are created automatically. From the JanusGraph reference docs:

            Every graph operation in JanusGraph occurs within the context of a transaction. According to the TinkerPop’s transactional specification, each thread opens its own transaction against the graph database with the first operation (i.e. retrieval or mutation) on the graph.

            A vertex retrieved during a transaction is stored in both the transaction cache and database cache. After closing the transaction the vertex is still in the database cache (but note that since janusgraph-0.5.x the database cache is disabled by default).

            Regarding question 2:
            Indeed, a JanusGraph instance cannot know about modifications to vertices in the transaction caches of other instances. Only after these transactions have been closed and persisted to the storage and index backends, other instances can read modified vertices from the the backends. This also means that caches in other JanusGraph instances can be out of date, so if you want to be sure that you have the latest data from the backends, you should start a new transaction and disable the database cache (default setting).

            Additional comments (added Sept 12):

            The vertex caches are private members of JanusGraph and nowhere exposed to the user (not even in the debug logging). Cache hits in a traversal are only visible from a fast (sub-millisecond) return time.

            If data consistency between transactions or janusgraph instances matters to you, you can take a look at:

            Source https://stackoverflow.com/questions/69040069

            QUESTION

            Neptune DB doesn't change property value to the previous value
            Asked 2021-Sep-03 at 03:38

            I have very weird issue with AWS Neptune DB. I can only change property to new value and can't use any of previous names.
            I'm using gremlin and node.js.
            That sounds so weird so let me to add some code:

            ...

            ANSWER

            Answered 2021-Sep-03 at 03:38

            Neptune by default uses Set cardinality. Each time you add a value you are expanding that Set as you are not explicitly using Cardinality.single. Moreover, elementMap will only return one element of a Set cardinality property. To see them all use valueMap instead.

            Source https://stackoverflow.com/questions/69039151

            QUESTION

            Does SPARQL-Gremlin plugin support Janusgraph?
            Asked 2021-Aug-26 at 13:47

            I'm trying to test if janusgraph could be queried with sparql. So, I found one of plug-in 'SPARQL-Gremlin' could do that. (At least, the doc said it is working.) However, when I followed the doc https://tinkerpop.apache.org/docs/current/reference/#sparql-gremlin I found that if current storage is TinkGraph, then the sparql could be run successfully. However, if I change storage solution to the remote(janusgraph), then I got error message. So, is there anyone who have been succeed based on this plugin and janusgraph?

            ...

            ANSWER

            Answered 2021-Aug-26 at 13:47

            The comment form HadoopMarc is the likely lead to solving your problem. You need to be sure sparql-gremlin is on your classpath for Gremlin Server when using this the way that you are in Gremlin Console. In other words, you are sending the Gremlin string of g = traversal(SparqlTraversalSource).withGraph(graph) to be executed on the server and the server doesn't know anything about SparqlTraversalSource if sparql-gremlin is not in its classpath.

            To get this working via Gremlin Console and :remote (i.e. sending scripts) I would do try the following:

            1. Get sparql-gremlin on your classpath for Gremlin Server (i.e. Janus Server). You can do that best with bin/gremlin-server.sh install org.apache.tinkerpop sparql-gremlin 3.4.12 (or whatever version you are using)
            2. Start the server with a graph configured for JanusGraph in the server YAML file
            3. Connect with Gremlin Console using :remote as you did in your example
            4. Test to see if Gremlin Server picked up the package by sending just submitting a script of SparqlTraversalSource which should return the classname.
            5. If the previous step worked you should be able to do: traversal(SparqlTraversalSource).withGraph(graph).sparql("SELECT ?....")

            If you have that all working then a next step might be to configure a special traversal source in the Gremlin Server initialization script that is already setup with the SparqlTraversalSource so that you can just reference it from your scripts directly.

            Source https://stackoverflow.com/questions/68905209

            QUESTION

            Add an edge failing after creating a vertex (Neptune InternalFailureException)
            Asked 2021-Aug-04 at 13:56

            I am trying to create a user vertex and a city vertex (if they do not already exist in the graph), and then add an edge between the two of them. When I execute the command in the same traversal, I run into this InternalFailureException from Neptune.

            ...

            ANSWER

            Answered 2021-Aug-04 at 13:56

            I will investigate further why you did not get a more useful error message but I can see that the Gremlin query will need to change. After a fold step any prior as labels are lost as fold reduces the traversers down to one. A fold is both a barrier and a map. You should be able to use store or aggregate(local) instead of as in this case where you have to use fold for each coalesce.

            Source https://stackoverflow.com/questions/68645933

            QUESTION

            Janus Graph backend cassandra vs Bigtable
            Asked 2021-Jun-10 at 19:37

            I am planning to use Janusgraph for building graph of different uses our team handles and I see that janus graph has option to use BigTable or Cassandra as storage backend. I am looking for any recommendation on which backend is more optimal/performant ( I am mainly talking about gremlin query performance on 2 hop neighbor of a node ) with JanusGraph.

            I understand that performance is pretty subjective and varies based on datasize/graph connectivity and use case so best approach will be to try out myself, which I am planning to do. But has anyone else has done similar performance comparison ? Is there any general recommendation about storage backend here ?

            ...

            ANSWER

            Answered 2021-Jun-10 at 18:14

            You're right in that performance is both:

            • subjective
            • depends largely on data size

            I can tell you that I have done this exercise as well. To that end, I think it's important to share this comparison from DB-Engines.com.

            In terms of performance, the biggest thing I'd be looking at is how each handles consistency. As a general rule, databases which enforce stronger levels of consistency typically have to sacrifice performance.

            • BigTable == strong-consistent
            • Cassandra == eventually consistent

            Other factors worth considering, are the fact that BigTable limits you to Google Cloud (GCP). And if you don't want to lose performance over the network, you'll also need to pay for more (Janus) instances on GCP for data locality.

            In terms of raw DB-Engine "score," Cassandra is currently at 114.112, while BigTable is at a paltry 3.582. These scores will change month-to-month, but in general this signifies that Cassandra has a much stronger community around it. Similarly, Cassandra has 18182 questions on this site, while BigTable only has 449. Bottom line, is that it'll be much easier to get support and answers to questions.

            Just based on the underlying strength of the community, Cassandra is the better option here.

            Having supported JanusGraph on Cassandra for the last few years, I can tell you that overall it's been solid. The difficulties tend to come into play with bulk data loading. But outside of that, things seem to run pretty well.

            Source https://stackoverflow.com/questions/67910867

            QUESTION

            Is there a way to reverse a list in Gremlin?
            Asked 2021-Apr-09 at 15:28

            Gremlin queries often work with or produce lists. Sometimes it is desirable to be able to reverse a list. Currently Gremlin does not have a reverse step so you cannot do something like:

            ...

            ANSWER

            Answered 2021-Apr-09 at 15:28

            It is possible to do this today using just existing Gremlin steps. The example below takes advantage of the index step to give each element of a list an index number. For example:

            Source https://stackoverflow.com/questions/67023983

            QUESTION

            Serializer for type org.janusgraph.graphdb.relations.RelationIdentifier not found
            Asked 2021-Apr-08 at 23:03

            Following error shows up in JanusGraph v0.5.3 server logs while retrieving edges from java client

            ...

            ANSWER

            Answered 2021-Apr-08 at 23:03

            I believe that some of the fixes that allow the IORegistry to hook the GraphBinary serializer have not yet been released although I do see the work on the main JanusGraph branch. [1] I was having the same problem you reported but was able to get things working using the GraphSONMessageSerialializerV3d0 serializer.

            [1] https://github.com/JanusGraph/janusgraph/commit/1cb4b6e849e3f9c2802722fe7f84c760cd471429

            This setup code works for me:

            Source https://stackoverflow.com/questions/66881082

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install gremlin

            You can download it from GitHub.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/go-gremlin/gremlin.git

          • CLI

            gh repo clone go-gremlin/gremlin

          • sshUrl

            git@github.com:go-gremlin/gremlin.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link