Tinkerpop embedded implementation for production

Viewed 153

I've got a use case where I wouldn't need a full-blown features of a graph db. I would already receive a network (connected nodes and edges) from a datasource and all I'd have to do is to apply a few graph operations on it (eg: Shortest Path between 2 nodes, Discover relationships etc). The network size isn't huge (max 200 nodes). I was wondering if I can use an embedded Tinkerpop for this? Anything I should watch out for? This is a production application and will be used in a highly multithreaded context etc etc.

1 Answers

When you say "emebedded TinkerPop" I assume that you mean the in-memory graph database that it provides called "TinkerGraph". If that is correct, then I would say that it can be used for the kind of use case that you describe. If you have a small graph that fits in-memory and you don't need any bells and whistles, it should be a good fit and likely the best choice of any TinkerPop-enabled graph.

The only thing you should be aware of is that TinkerGraph is not thread-safe for mutations. You don't want to have multiple threads mutating the graph at the same time. For the graph size you describe, it sounds as though it should be cheap to clone copies of the graph to share among threads if you need to.

Related