MongoDB + Neo4J vs OrientDB vs ArangoDB

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/26704134/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-08 20:11:02  来源:igfitidea点击:

MongoDB + Neo4J vs OrientDB vs ArangoDB

mongodbneo4jdijkstraorientdbarangodb

提问by projectUnduli

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.

我目前正处于 MMO 浏览器游戏的设计阶段,游戏将包括一些实时位置的瓷砖地图(因此每个单元格的瓷砖数据)和通用世界地图。我更喜欢将 MongoDB 用于持久数据世界的游戏引擎。

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.

我还将实现一个运输模拟(我将在下面详细解释),它基本上是一个 Dijkstra 模块,我决定使用图形数据库,希望它能让事情变得更容易,发现 Neo4j,因为它非常流行。

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.

我对 MongoDB + Neo4J 设置很满意,但后来注意到 OrientDB ,它显然既像 MongoDB 又像 Neo4J(两全其美?),它们甚至有 MongoDB 和 Neo4J 的 VS 页面。

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.

重点是,我听说过一些关于 MongoDB 丢失数据的恐怖故事(虽然不确定它仍然会丢失),但我没有这样的奢侈。对于 Neo4J,我不太喜欢每年 12K 的“启动友好”成本,尽管我可能不会拥有数百万个顶点的 DB。OrientDB 似乎是一个可行的选择,因为也可能有一些机会使用一种数据库解决方案。

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.

在这种情况下,一个合乎逻辑的举动可能是跳到 OrientDB,但它有一个小社区,tbh 没有找到太多关于它的评论,MongoDB 和 Neo4J 是广泛使用的流行工具,我担心 OrientDB 是否是一次冒险。

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

我的第一个问题是您是否对这些数据库有任何经验/意见。

And second questionwould 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.

第二个问题是其图形数据库是一个航运仿真更好。使用的数据库预计会计算从任何顶点到任何顶点的最便宜的路线并遍历它(经典的 Dijkstra)。但还必须根据“B 国对 A 国实施禁运,因此来自 A 国的任何物品无法通过 B,XYZ 地区发生洪水,因此无法进行陆路运输”等情况更改权重。还有该数据库预计缓存结果。我期望不超过 1000 个顶点但有很多边。

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.

PS:我在标题中添加了 ArangoDB,但是 tbh,没有太多机会看一看。



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.

2016 年 4 月 18 日后期编辑:在评估对我的问题和开发策略的回应后,我决定使用 ArangoDB 作为他们的路线图对我来说更有希望,因为他们显然没有尝试添加大量半成品的炒作功能。

采纳答案by Lvca

Disclaimer: I am the author and owner of OrientDB.

免责声明:我是 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.

作为开发人员,总的来说,我不喜欢那些隐藏成本并让你暂时使用他们的技术的公司,一旦你掌握了它,就开始要钱。实际上,一旦您花费数月时间开发使用非标准语言或 API 的应用程序,您就搞砸了:支付或迁移应用程序的成本很高。

You know, OrientDBis FREEfor 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.

您知道,OrientDB免费用于任何用途,甚至是商业用途。此外,OrientDB 支持 SQL(带有扩展)等标准,主要的 Java API 是 TinkerPop 蓝图,图形数据库的“JDBC”标准。此外 OrientDB 还支持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.

OrientDB 项目每天都在增加新的贡献者和用户。社区组(免费渠道寻求支持)是GraphDB 市场上最活跃的社区

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.

如果您对 GraphDB 的使用有疑问,我的建议是让什么更接近您的需求,然后尽可能多地使用标准。通过这种方式,最终的切换将具有较低的影响。

回答by Max Neunh?ffer

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.

听起来好像您的用例正是 ArangoDB 的设计目的:您似乎在同一个应用程序中需要不同的数据模型(文档和图形),甚至可能希望将它们混合在一个查询中。这就是 ArangoDB 的多模型数据库大放异彩的地方。

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.

如果到目前为止 MongoDB 为您提供了良好的服务,那么您会立即对 ArangoDB 感到满意,因为它的外观和感觉非常相似。此外,您可以通过将顶点存储在一个(或多个)集合中并将边存储在一个或多个所谓的“边集合”中来对图形进行建模。这意味着各个边本身只是文档,可以保存任意 JSON 数据。然后数据库提供遍历,可使用 JavaScript 进行自定义以满足您可能有的任何需求。

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.

ArangoDB 数据库在 Apache 2 许可下获得许可,社区和专业支持随时可用。

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

如果您有任何更具体的问题,请随时在 google group 中提问

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

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

or contact

或联系

hackers (at) arangodb.org

黑客 (at) arangodb.org

directly.

直接地。

回答by Michael Hunger

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.

Neo4j 的定价其实是相当灵活的,所以不要被网站上的价格所迷惑。您也可以长期使用社区版或个人版。

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

Neo4j 社区非常活跃和乐于助人,可以快速为您的问题提供支持和帮助。我认为这是除了性能和便利之外的最大优势。通常使用图形模型

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.

Neo4j 正是被世界上最大的物流公司之一用于这种路线计算场景,它在全国范围内每秒路由多达 4000 个包裹。

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

它被用于其他游戏引擎,例如GameSys中的游戏经济模拟和另一个用于路由的引擎(不是在地球坐标中,而是在使用 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 :)

知道 Emil(Neo4j 的创始人之一)和我都是多用户地下城 (MUD) 的老玩家,这可能会有所帮助,所以这绝对是我们心中的一个用例:)