Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
799 views
in Technique[技术] by (71.8m points)

graph - How to initialize database name using gremlin? And save it?

On the SQL Server side there is the query: CREATE DATABASE name

What about the gremlin?

I have started gremlin and every time I open my laptop, run data, it loses all data. I have to recreate the data. How do I create a database and every time I run it, my data remains. Sorry for my English not good

question from:https://stackoverflow.com/questions/65937676/how-to-initialize-database-name-using-gremlin-and-save-it

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

In your comments you mentioned you were using "tinkerpop" as your graph database. TinkerPop by itself isn't a graph database. I'll assume you meant TinkerPop's graph database implementation TinkerGraph. It makes sense that your data is lost if using TinkerGraph because it is a in-memory graph database. You can persist that data if you like but you have to tell TinkerGraph to do so.

You will need to add gremlin.tinkergraph.graphLocation and gremlin.tinkergraph.graphFormat configurations to TinkerGraph. I assume you are using Gremlin Server since you use .NET so you likely just need to add those settings to the conf/tinkergraph-empty.properties file (assuming you've left the default file naming and out-of-box configuration).

That said, TinkerGraph is really meant to be an in-memory graph. Persisting data to disk is a bit of a convenience for users and not meant for high transaction use cases. You should consider other TinkerPop-enabled graph databases to configure in Gremlin Server for those situations (like JanusGraph) or perhaps use a service like Amazon Neptune. The fully listing of available graphs you can use with TinkerPop can be found on the TinkerPop project home page.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...