I am trying to obtain Graph object using Tinkerpop3 in Java as client from already running TitanDB server (I do not want to create server).
In other words, I am trying to implement such function:
public Graph obtainGraph(String serverIp, String graphName);
I was trying to do it like here: AWS Lambda + Tinkerpop/Gremlin + TitanDB on EC2 + AWS DynamoDB in cloud
but as I understand, TitanFactory.open()
starts server, and I do not want to do this - I just want to connect to existing server.
Documentation as well as most materials in Internet use in-memory graphs for examples, and I cannot find one, that shows how to:
create new graph and save it on remote server
retrieve existing graph from remote server
update such remote Graph, so after adding/removing edges committing changes
delete whole graph
I do not want to do above stuff through Gremlin language (Strings), but through Java API (TinkerpopBlueprins).
This guy is getting close to what I need:
Add vertices to TitanDB Graph in Java
however, his method already takes Graph
as argument.
I have seen in many places in Internet, that GraphFactory.open() gets path to properties file, however I haven't seen example of content of such file, especially with TitanDB relevant data, so I would prefer to use Configuration
object.
Graph graph = GraphFactory.open(new BaseConfiguration())
says, that there is no gremlin.graph property.
Configuration configuration = new BaseConfiguration();
configuration.setProperty("gremlin.graph", "titan");
Graph graph = GraphFactory.open(configuration);
says GraphFactory
could not find [titan] - Ensure that the jar is in the classpath
Is there any statically typed builder with enums and constants, instead of Map<String, Object>
, that will tell me, what properties I have to provide and what is their type?
Is there any open source project, that uses Tinkerpop3 to connect as client to remote TitanDB server, that I could use as example?
I would like to see fully working example, instead of in-memory with external configuration.