Farmville等在线游戏使用哪个数据库? [英] What database do online games like Farmville use?

查看:59
本文介绍了Farmville等在线游戏使用哪个数据库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

除图形功能外,在线游戏还应具有简单的关系数据库结构。我很好奇 Farmville MafiaWars 这样的在线游戏使用什么数据库?

Apart from graphical features, online games should have a simple Relational Database structure. I am curious what database do online games like Farmville and MafiaWars use?

将基于SQL的数据库用于这样频繁写入的程序是否可行?

如果没有,那么如何在这些游戏中存储用户的依赖关系?

Is it practical to use SQL based databases for such programs with such frequent writes ?
If not, how could one store the relational dependence of users in these games?

编辑:如所指出的,它们使用NOSQL数据库,例如 Couchbase 。 NOSQL快速且具有良好的并发性(这里确实需要);但是排序大小要大得多(由于键/值结构)。
1.它是否会减慢系统速度(因为我们需要从磁盘读取大型数据库文件)?
2.我们将非常有限,因为我们没有SQL的 JOIN 来连接不同的数据集。

As pointed, they use NOSQL databases like Couchbase. NOSQL is fast with good cuncurrency (which is really needed here); but the sotrage size is much larger (due to key/value structure). 1. Does't it slow down the system (as we need to read large database files from the disk)? 2. We will be very limited as we do not have SQL's JOIN to connected different sets of data.

推荐答案

回答您的编辑:

您可以使用非键值存储(例如MongoDB)来减小存储大小。这仍然有一些开销,但是比尝试维护键=值存储要少。

You can decrease storage size by using a non key=>value storage like MongoDB. This does still have some overhead but less than trying to maintain a key=>value store.

由于没有很多NoSQL产品是内存,因此它不会严重降低系统速度。映射,这意味着与SQL不同,它不会直接进入磁盘,而是进入fsync队列,然后在方便时写入磁盘。对于那些没有内存映射的NoSQL解决方案,它们具有非常快的读/写速度,通常是在两者之间进行权衡的情况。

It does not slow down the system terribly since quite a few NoSQL products are memory mapped which means that unlike SQL it doesn't go directly to disk but instead to a fsync queue that then writes to disk when it is convient to. For those NoSQL solutions which are not memory mapped they have extremely fast read/write speeds and it is normally a case of trade off between the two.

对于JOIN,它是一种以可以避免大型联接的方式安排架构的情况。使用小型联接进行联接时,具有分数记录的用户很好,但是聚合联接将是一个问题,您需要找到其他解决办法。各种NoSQL产品的许多用户组提供了许多解决方案。

As for JOINs, it is a case of arranging your schema in such a manner that you can avoid huge joins. Small joins to join say, a user with his score record are fine but aggregated joins will be a problem and you will need to find other ways around this. There are numerous solutions provided by many user groups of various NoSQL products.

这篇关于Farmville等在线游戏使用哪个数据库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆