我可以在我的应用程序运行时在内存中创建一个大型的javascript集合,而不是使用像Redis,甚至LokiJS(看起来很棒)之类的东西,而是查询它?
答案 0 :(得分:0)
我有一个使用socket.io的确切模式的应用程序。
Bellow,我已将我的socket.io代码翻译为使用HTTP请求。
在服务器上,您可以执行以下操作:
, but we can create custom activityIndicator with the help of
他们,
var players = []; //This will be used to store in-memory players.
看看这个例子: http://agar.io/
这是一款非常受欢迎的游戏。现在,他们为什么要在数据库中存储您的位置,分数或名字?这将是非常昂贵的。