47

I am currently on design phase of a MMO browser game, game will include tilemaps for some real time locations (so tile data for each cell) and a general world map. Game engine I prefer uses MongoDB for persistent data world.

I will also implement a shipping simulation (which I will explain more below) which is basically a Dijkstra module, I had decided to use a graph database hoping it will make things easier, found Neo4j as it is quite popular.

I was happy with MongoDB + Neo4J setup but then noticed OrientDB , which apparently acts like both MongoDB and Neo4J (best of both worlds?), they even have VS pages for MongoDB and Neo4J.

Point is, I heard some horror stories of MongoDB losing data (though not sure it still does) and I don't have such luxury. And for Neo4J, I am not big fan of 12K€ per year "startup friendly" cost although I'll probably not have a DB of millions of vertexes. OrientDB seems a viable option as there may be also be some opportunities of using one database solution.

In that case, a logical move might be jumping to OrientDB but it has a small community and tbh didn't find much reviews about it, MongoDB and Neo4J are popular tools widely used, I have concerns if OrientDB is an adventure.

My first question would be if you have any experience/opinion regarding these databases.

And second question would be which Graph Database is better for a shipping simulation. Used Database is expected to calculate cheapest route from any vertex to any vertex and traverse it (classic Dijkstra). But also have to change weights depending on situations like "country B has embargo on country A so any item originating from country A can't pass through B, there is flood at region XYZ so no land transport is possible" etc. Also that database is expected to cache results. I expect no more than 1000 vertexes but many edges.

Thanks in advance and apologies in advance if questions are a bit ambiguous

PS : I added ArangoDB at title but tbh, hadn't much chance to take a look.


Late edit as of 18-Apr-2016 : After evaluating responses to my questions and development strategies, I decided to use ArangoDB as their roadmap is more promising for me as they apparently not trying to add tons of hype features that are half baked.

projectUnduli
  • 481
  • 1
  • 5
  • 5
  • You might also take a look at the JSON/REST backend of Structr (https://structr.org, it's also open source). It basically turns Neo4j into a document database. Disclaimer: I'm the initiator of the project. – Axel Morgner Nov 02 '14 at 22:00
  • 1
    What language(s) will you be working with? You should also consider the size of each database's community, how easily you'll be able to find compatible packages, the quality of documentation, and the maturity of drivers. MongoDB is mature in all aspects and Neo4j (which I use and highly recommend) is probably second. As Michael Hunger said, don't let the licensing page scare you. – subvertallchris Nov 03 '14 at 01:29
  • @subvertallchris : Current plan is to use node.js and laravel but may switch to a pure JS solution. – projectUnduli Nov 03 '14 at 08:59
  • It seems that the people answering this below are closely affiliated with either OrientDB, ArangoDB or Neo4j, so I would take their opinions with a grain of salt. Unfortunately it's quite difficult getting reliable and unbiased data on each system, in addition they are evolving rapidly. The only viable path I see is to build a proof-of-concept system with each of them and see if it fits your needs. – ThePhysicist Oct 09 '16 at 11:53

3 Answers3

43

Disclaimer: I am the author and owner of OrientDB.

As developer, in general, I don't like companies that hide costs and let you play with their technology for a while and as soon as you're tight with it, start asking for money. Actually once you invested months to develop your application that use a non standard language or API you're screwed up: pay or migrate the application with huge costs.

You know, OrientDB is FREE for any usage, even commercial. Furthermore OrientDB supports standards like SQL (with extensions) and the main Java API is the TinkerPop Blueprints, the "JDBC" standard for Graph Databases. Furthermore OrientDB supports also Gremlin.

The OrientDB project is growing every day with new contributors and users. The Community Group (Free channel to ask support) is the most active community in GraphDB market.

If you have doubts with the GraphDB to use, my suggestion is to get what is closer to your needs, but then use standards as more as you can. In this way an eventual switch would have a low impact.

meager
  • 209,754
  • 38
  • 307
  • 315
Lvca
  • 8,814
  • 2
  • 21
  • 25
  • Asking this question is to get what is closer to my needs, Luca. I hope you will shed more light if OrientDB fits better or not. – projectUnduli Nov 03 '14 at 18:19
  • 1
    With OrientDB you have both models, so you could model your data as a graph with complex types like with MongoDB. Most of the users take advantage of this hybrid model in OrientDB to have no compromises on domain complexity. Furthermore as soon as you need to scale up you can just add servers with zero configuration. – Lvca Nov 05 '14 at 21:50
  • 4
    To add to Lvca's thoughts, it seems a graph database is a natural for you. Don't be misled by provocative marketing, OrientDB is on a huge tear with many large companies evaluating and choosing it over other options in this realm. I am on the team and handle many of the customer enquiries. The last few months I've seen the largest tech companies have TEAMS of developers do extensive evaluations and choose OrientDB for graph needs. So it's an adventure because it's new to you, not because it's unproven or in any way sketchy. Let us know if you need help getting started. – Greg McCarvell Nov 05 '14 at 22:17
  • 41
    I shall point out to everyone, that "@Luca is the Founder and CEO of Orient Technologies, the company behind #OrientDB." (see profile). – Robin479 Apr 24 '15 at 14:18
  • I have no problem with @Lvca but I have problem with one thing in OrientDB that it doesn't support dynamic names for relationships - you have to define the list of possible relationship classes- and due to this I moved to Neo4j and got a free commercial license for our startup. Note:- I had even wrote a access layer for php and orientdb in php https://github.com/ravinderpayal/OrientDB-PHP – Ravinder Payal Jul 30 '16 at 19:34
  • @Ravinder with OrientDB, by default, edge labels are edge classes, so they have to be created in advance. It's just the name, they could be even empty as schema. If you need such dynamism, in OrientDB you could just set `graph.setUseClassForEdgeLabel(false)` and you have resolved all your problems. Did you already ask this on StackOverflow? Sorry if the team missed your question. – Lvca Jul 31 '16 at 20:49
  • Anyway, it's up to you if you want to go back to OrientDB, but if I was you I would have, at least, a contract with Neo4j to get to me a FREE commercial license for the next 10 years, otherwise the next year you're forced to pay a ridiculous amount of money to just use the product. And at that point the migration would be way more expensive ;-) – Lvca Jul 31 '16 at 20:49
  • 1
    Ok i will try give it a look again – Ravinder Payal Jul 31 '16 at 20:52
  • I find his rant a bit misleading, as OrientDB offers a commercial version as well, and even states that the OS version should be used only for "non-strategic projects that do not require support, constant tuning or professional tools". So it seems that OrientDB is doing exactly what @Lvca rants against, i.e. letting developers "play" with the OS version and then charge money for essential things like incremental backups. Personally, ArangoDB's approach of having a fully-featured OS version and charge for support seems more friendly to me. I have no relationship to any graph DB vendor btw. – ThePhysicist Oct 09 '16 at 11:47
  • The incremental backup is not available in most of the Open Source NoSQL products anyway. About the Community Edition (CE), well, there are thousands of projects in production with it. The CE itself has more features than any other NoSQL. You don't have to buy the Enterprise to go live with your project. But this is the OrientDB's business model. It's not easy to create a sustainable Open Source company. Every vendor has its own strategy. Will they be alive in 1 year or 2? Look at what happened to RethinkDB only a few days ago (https://rethinkdb.com/blog/rethinkdb-shutdown/). – Lvca Oct 11 '16 at 00:45
  • 3
    Comparing documentation I like arangodb much more than orientdb - @Luca - please consider major improvement. – ramigg May 10 '17 at 09:44
41

It sounds as if your use case is exactly what ArangoDB is designed for: you seem to need different data models (documents and graphs) in the same application and might even want to mix them in a single query. This is where a multi-model database as ArangoDB shines.

If MongoDB has served you well so far, then you will immediately feel comfortable with ArangoDB, since it is very similar in look and feel. Additionally, you can model graphs by storing your vertices in one (or multiple) collections, and your edges in one or more so-called "edge-collections". This means that individual edges are simply documents in their own right and can hold arbitrary JSON data. The database then offers traversals, customizable with JavaScript to match any needs you might have.

For your variations of the queries, you could for example add attributes about these embargos to your vertices and program the queries/traversals to take these into account.

The ArangoDB database is licensed under the Apache 2 license, and community as well as professional support is readily available.

If you have any more specific questions do not hesitate to ask in the google group

https://groups.google.com/forum/#!forum/arangodb

or contact

hackers (at) arangodb.org

directly.

Max Neunhöffer
  • 1,312
  • 8
  • 7
  • 1
    In addition in ArangoDB a shortest path implementation based on Dijkstra is already available in the query language. – mchacki Nov 02 '14 at 23:52
14

Neo4j's pricing is actually quite flexible, so don't be put away by the prices on the website. You can also get started with the community edition or personal edition for a long time.

The Neo4j community is very active and helpful and quickly provide support and help for your questions. I think that's the biggest plus besides performance and convenience. I n general using a graph model

Regarding your use-case:

Neo4j is used exactly for this route calculation scenario by one of the largest logistic companies in the world where it routes up to 4000 packages per second across the country.

And it is used in other game engines, like here at GameSys for game economy simulation and in another one for the routing (not in earth coordinates but in game-world-coordinates using Neo4j-Spatial).

I'm curious why you have only that few nodes? Are those like transport portals? I wonder where you store the details and the dynamics about the routes (like the criteria you mentioned) are they coming from the outside - in memory state of the game engine?

You should probably share some more details about your model and the concrete use-case.

And it might help to know that both Emil, one of the founders of Neo4j and I are old time players of multi user dungeons (MUDs), so it is definitely a use-case close to our heart :)

Michael Hunger
  • 39,665
  • 3
  • 48
  • 74
  • Hi, They're exactly transport portals (seaport, airport, rail station etc in that case) as you mentioned , thought it would be out of hand if goes deeper (or wouldn't it be?). And for data regarding "embargo, disasters, war etc" , I am ok with any options (my initial idea to keep them in graph database though). Thanks for reply, btw – projectUnduli Nov 02 '14 at 21:13