MongoDB + Neo4J vs OrientDB vs ArangoDB

27,818

Solution 1

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.

Solution 2

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.

Solution 3

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 :)

Share:
27,818
projectUnduli
Author by

projectUnduli

Updated on April 19, 2020

Comments

  • projectUnduli
    projectUnduli about 4 years

    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
    projectUnduli over 9 years
    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
  • mchacki
    mchacki over 9 years
    In addition in ArangoDB a shortest path implementation based on Dijkstra is already available in the query language.
  • projectUnduli
    projectUnduli over 9 years
    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.
  • Lvca
    Lvca over 9 years
    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.
  • Greg McCarvell
    Greg McCarvell over 9 years
    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.
  • Robin479
    Robin479 about 9 years
    I shall point out to everyone, that "@Luca is the Founder and CEO of Orient Technologies, the company behind #OrientDB." (see profile).
  • Ravinder Payal
    Ravinder Payal almost 8 years
    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 github.com/ravinderpayal/OrientDB-PHP
  • Lvca
    Lvca almost 8 years
    @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
    Lvca almost 8 years
    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 ;-)
  • Ravinder Payal
    Ravinder Payal almost 8 years
    Ok i will try give it a look again
  • ThePhysicist
    ThePhysicist over 7 years
    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.
  • Lvca
    Lvca over 7 years
    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 (rethinkdb.com/blog/rethinkdb-shutdown).
  • ramigg
    ramigg about 7 years
    Comparing documentation I like arangodb much more than orientdb - @Luca - please consider major improvement.