Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

【Question】What is the difference between tinkerpop/gremlin-go and gremtune #21

Open
shcw opened this issue Nov 21, 2022 · 2 comments

Comments

@shcw
Copy link

shcw commented Nov 21, 2022

my first exposure to graph databases

pls allow me to ask a newbie question

https://github.com/apache/tinkerpop/blob/master/gremlin-go/README.md and https://github.com/schwartzmx/gremtune

what is the difference between them?

Does gremlin-go not support neptune ?

@kamruljpi
Copy link

Gremlin Go is support Neptune. you can check the below code:

package main

import (
	"crypto/tls"
	"fmt"

	gremlingo "github.com/apache/tinkerpop/gremlin-go/v3/driver"
)

func main() {
	driverRemoteConnection, err := gremlingo.NewDriverRemoteConnection("wss://YOUR_NEPTUNE_ENDPOINT_REPLACE_HERE:8182/gremlin",
		func(settings *gremlingo.DriverRemoteConnectionSettings) {
			settings.TraversalSource = "g"
			settings.TlsConfig = &tls.Config{InsecureSkipVerify: true}
		})
	if err != nil {
		fmt.Println(err)
		return
	}
	g := gremlingo.Traversal_().WithRemote(driverRemoteConnection)

	promise := g.AddV("users").Property("name", "kamruzzaman").Iterate()

	err = <-promise
	if err != nil {
		fmt.Println(err)
	 	return
	}

	result, err := g.V().HasLabel("users").Values("name").ToList()
	if err != nil {
		fmt.Println(err)
		return
	}
	for _, r := range result {
		fmt.Println("######################################################")
		fmt.Printf("name: %+v", r.GetString())
		fmt.Println("######################################################")
	}
}

@kamruljpi
Copy link

what is the difference between them?
gremlin-go is like orm so you have to use their function to execute a gremlin query and gremtune you can execute the raw query. this is the basic difference as per as I know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants