Question

I would like to ask what is best choice for multigraph (SparseMultigraph class in jung library) persisting. Vertices in multigraph represent user accounts and edges various user messages and keywords with score. I have no experience with NoSQL. Is MongoDB appropriate or should I use graph database? Please also write cons and pros. Thank you.

Was it helpful?

Solution

It sounds like you've already decided that a graph based structure is right for you, since you're asking how to persist data from jung that's already in a graph. It would seem that dumping it to over to Mongo (or any other non-graph structure) would introduce an unnecessary mismatch between how you are working with the data and how you are storing it.

Consider looking at TinkerPop which is a suite of open source products for graph technology. The most immediate thing to look at would be Blueprints which provides for a common layer of interaction (think JDBC) over many different data stores (e.g. Neo4j, OrientDB, Titan, etc.), allowing you to try the different databases to find the one that's right for you. Each underlying store has its own strengths, weaknesses, licenses, etc., so you really need to do some research before making a choice. The key is that TinkerPop helps alleviate vendor lock-in and therefore gives you some ability to maneuver if you need to.

It should also be noted that Blueprints has JUNG integration which you can read more about here. It's an older feature of Blueprints for working with JUNG algorithms over Blueprints-enabled graphs. It might be of interest to you.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top