How to connect to a remote Neo4j db using gremlin from java app?

285 views
Skip to first unread message

smita padhy

unread,
Aug 22, 2018, 6:18:43 AM8/22/18
to Gremlin-users
I need to connect to a remote db from my java app. How can this be achieved? Following works if i use embedded local db.

Configuration configuration = new BaseConfiguration();
    configuration.setProperty(Neo4JUrlConfigurationKey, config.getGRAPHDB_URI());
    configuration.setProperty(Neo4JUsernameConfigurationKey, config.getGRAPHDB_USERNAME());
    configuration.setProperty(Neo4JPasswordConfigurationKey, config.getGRAPHDB_PASSWORD());
   
    configuration.setProperty("gremlin.graph", "org.apache.tinkerpop.gremlin.neo4j.structure.Neo4jGraph");
    configuration.setProperty("gremlin.neo4j.directory", "/data/neo4j/");



   
    graph = GraphFactory.open( configuration);

Robert Dale

unread,
Aug 22, 2018, 11:56:42 AM8/22/18
to gremli...@googlegroups.com
Hello,

The TinkerPop Neo4j Gremlin graph implementation supports only embedded graphs or embedded with HA.  If you need to connect to a remote Neo4j instance, you'll have to use neo4j-gremlin-bolt.  It looked like you had some issues with that in another thread. Unfortunately, it wasn't developed here and I don't know much about it. You'll have to contact the author.

Robert Dale


--
You received this message because you are subscribed to the Google Groups "Gremlin-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gremlin-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gremlin-users/4b453161-6422-4829-91a1-aa6b2b331600%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

smita padhy

unread,
Aug 23, 2018, 12:33:25 AM8/23/18
to Gremlin-users
Thanks Robert. I will research more on neo4j-gremlin-bolt.
Reply all
Reply to author
Forward
0 new messages