问题描述
我正在开发一个游戏(像棋),每次移动都需要保存到数据库中。
因为这两个读取都很重要和写入速度快,而且我不需要复杂的查询,我可能会使用NoSQL解决方案。
哪一个?我在考虑MongoDB,但它的耐久性是一个问题吗?
如果一些游戏漫画家被破坏,这不是世界末日,但如果发生
感谢。
h2_lin>解决方案
我正在开发一个游戏(像棋),每次移动都需要保存到数据库中。
因为这两个读取都很重要和写入速度快,而且我不需要复杂的查询,我可能会使用NoSQL解决方案。
哪一个?我在考虑MongoDB,但它的耐久性是一个问题吗?
如果一些游戏漫画家被破坏,这不是世界末日,但如果发生
感谢。
上次我看一个象棋游戏,你需要每5分钟插入一次。您可以使用LDAP服务器。但是,我当然不知道你的用例。
Mongo-db优于文档类似的记录,你想要扩展信息随着时间的推移。它有一个很好的临时查询设施,并且相对较快,这意味着在同一台机器上的速度与mysql数据库一样快。
在第一个视图中,您的数据看起来是高度结构化的,因此文档的灵活性不会增加很多好处。
如果你有大量的记录(像许多x10 ^ 6),那么它将显示差异。
现在如果你想使用mongo-db,罚款,你可能不会失望,但我没有看到这里的令人信服的情况。
I'm working on a game (something like chess) where every move needs to be saved into a database per move.
Since it's very important that both reads and writes are fast, and I don't need complex queries, I'm probably going to go with a NoSQL solution.
Which one though? I'm thinking about MongoDB but will its durability be an issue?
It's not the end of the world if some game movelists are corrupted, but would be problematic if it occurs too often.
Suggestions?
Thanks.
Last time I looked at a chess game you would need about 1 insert every 5 minutes. You could use LDAP server for that. But of course I do not know your use-case.
Mongo-db excels for document like records where you would want to extend the information over time. It has a nice ad-hoc query facility and is relatively speedy, which means about as fast as mysql database on the same machine.
In first view your data looks to be highly structured so the document flexibility will not add a lot of benefits.
If you have a huge number of records (like in many x10^6) then it will show the difference.
Now if you want to use mongo-db, fine, you probably won't be dissappointed, but I see no compelling case here.
这篇关于数据库选择游戏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!