简体   繁体   English

网络游戏平台的Node.js数据库

[英]Node.js database for web games platform

I'm building a web games platform/store with node.js and I've been doing research into ways to store the data for the games. 我正在使用node.js构建网络游戏平台/商店,并且一直在研究存储游戏数据的方法。 Game data will include basic information and a list of keywords. 游戏数据将包括基本信息和关键字列表。

I first looked into the differences between the MyISAM and InnoDB storage engines. 我首先研究了MyISAM和InnoDB存储引擎之间的区别。 InnoDB seems like the most suitable choice because I want operations to lock at row-level rather than table-level. InnoDB似乎是最合适的选择,因为我希望操作锁定在行级而不是表级。 However, I also found that FULLTEXT searching is only available for MyISAM tables. 但是,我还发现FULLTEXT搜索仅适用于MyISAM表。

My first question is this. 我的第一个问题是这个。 Is there a MySQL storage engine which suits my two requirements (the ability to operate on different rows concurrently, and the ability to search the table for specific keywords like on any store)? 是否有一个适合我两个要求的MySQL存储引擎(能够同时在不同行上进行操作以及能够在表中搜索特定关键字(例如在任何商店中)的功能)?

Additionally, if the answer to the first question is no, is there other database software (alternative to MySQL) which will meet my requirements and is supported, either out-of-the-box or with a plugin, on node.js? 另外,如果第一个问题的答案是否定的,那么是否有其他数据库软件(MySQL的替代产品)可以满足我的要求,并且在node.js上是现成的或通过插件受支持的?

Whatever I go with, it needs to perform reads fast as a large number of people could be accessing the same game at the same time (hence accessing the same row in the table). 无论我做什么,它都需要快速执行读取操作,因为许多人可能同时访问同一游戏(因此访问表中的同一行)。

I think you are optimizing a little prematurely. 我认为您正在过早优化。 Pick whichever database you want and then just make sure to create an abstracted database layer so that you can swap things out later without too much trouble when/if it becomes necessary. 选择您想要的任何数据库,然后确保创建一个抽象的数据库层,以便以后在必要时/在无需过多麻烦的情况下进行交换。

Unless your web games platform gets super popular super quickly (in which case good for you! that's a good problem to have), pretty much any database will meet your needs. 除非您的网络游戏平台迅速变得超级流行(在这种情况下对您有好处!这是个好问题),否则几乎所有数据库都可以满足您的需求。 And when it starts to be a problem you'll have a much better idea of where the bottle necks are and what your access patterns look like. 当开始出现问题时,您将对瓶颈在哪里以及访问方式的外观有了更好的了解。

Much more important to just start building since nobody can use it until you do :) 刚开始构建更为重要,因为除非您这样做,否则没人可以使用它:)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM