I am trying to get a Graph object using Tinkerpop3 in Java as a client from an already running TitanDB server (I don't want to create a server).
In other words, I'm trying to implement a function like this: public Graph getGraph (String serverIp, String graphName);
I tried to do it like here: AWS Lambda + Tinkerpop / Gremlin + TitanDB on EC2 + AWS DynamoDB in the cloud
but, as I understand it, TitanFactory.open () starts the server, and I do not want to do this - I just want to connect to an existing server.
The documentation, as well as most of the materials on the Internet, use in-memory graphics for examples, and I cannot find it, which shows how:
create a new chart and save it on a remote server
get an existing graph from a remote server
update such a deleted chart, so after adding / removing edges making changes
delete the whole chart
I do not want to do the above material through the Gremlin language (Strings), but through the Java API (TinkerpopBlueprins). This guy comes close to what I need: Add vertices to TitanDB Graph in Java however his method already accepts Graph as an argument.
I have seen in many places on the Internet that GraphFactory.open () gets the path to the properties file, however I have not seen an example of the contents of such a file, especially with the corresponding TitanDB data, so I would prefer to use the configuration object.
Graph graph = GraphFactory.open (new BaseConfiguration ())
says there is no gremlin.graph property.
Configuration Configuration = new BaseConfiguration (); configuration.setProperty ("gremlin.graph", "titan");
Graph graph = GraphFactory.open (configuration);
says GraphFactory could not be found [titan] - make sure jar is in classpath
Is there any statically typed builder with enumerations and constants instead of Map that will tell me which properties I should provide and what their type is? Is there any open source project that uses Tinkerpop3 to connect as a client to a remote TitanDB server that I could use as an example?
I would like to see a fully working example, and not in memory with an external configuration.