谷歌应用引擎

发布于 2024-11-04 19:24:23 字数 231 浏览 0 评论 0原文

  1. 我想知道像packman这样的游戏的网络服务器游戏是否可以轻松地在google应用引擎上举行?在响应速度方面。 我想设置一个服务器来管理将举行比赛的游戏桌。 每桌只能有两个玩家。

  2. 我不明白我是否可以将 java applet 上传到 GAE 以及我是如何这样做的。

  3. 关于其他适合实时动作游戏的免费服务器还有什么建议吗?

谢谢

  1. I would like to know whether a net server game for a game like packman can be held on google application engine easily? In terms of response speed.
    I want to set a server which can manage the game tables in which the games will be held.
    Each table will have two players only.

  2. I don't understand if I can upload a java applet to GAE and how I'm doing so.

  3. Any other suggestions about other free servers which can be suitable for a real time action games?

Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

爱的那么颓废 2024-11-11 19:24:23
  1. GAE 仅支持短期连接(最长约 30 秒)。这意味着您无法在客户端和 GAE 服务器之间打开永久连接。这有效地防止了从服务器到客户端的推送通知,而这在大多数游戏设置中都是必需的。

  2. 为了缓解这一限制,Google 引入了Channel API,使您能够将消息从服​​务器推送到客户端。不过,您需要在客户端上使用他们的 JavaScript 库边。您可以编写一个小程序来调用 javascript 来访问此库,但这可能有点混乱。

总而言之,由于这些限制,GAE 可能无法满足您的需求。

更新

GAE 不适合用户之间实时通信的另一个原因是:Google 选择的任何服务器都可以处理对 GAE 应用的客户端请求。两个进行通信的用户可以连接到两个不同的服务器,甚至可以连接到不同的数据中心(甚至可能位于不同的大陆)。要在它们之间传递数据,您需要将所有消息存储到数据存储(速度较慢)或内存缓存(不可靠且可能较慢,因为它需要在服务器/数据中心之间传播)。

  1. GAE supports only short-lived connections (about 30sec max). Which means you can not have a permanent connection open between your client and GAE server. This effectively prevents push notifications from server to client, which are needed in most gaming setups.

  2. To alleviate this limitation, Google introduced Channel API which enables you to push messages from server to client. However you need to use their javascript library on the client side. You could write an applet which calls javascript to access this library but this could be a bit of a kludge.

All-in-all, due to this limitations, GAE could prove not to be the right fit for your needs.

Update:

There is another reason why GAE is not fit for real-time communication between users: a client request to GAE app can be served by any server that Google chooses. Two users communicating could be connected to two different servers, even in different data centers (maybe even on different continents). To pass data between them you'd need to store all messages to datastore (slow) or to memcache (unreliable and possibly slow because it would need to propagate between servers/datacenters).

摘星┃星的人 2024-11-11 19:24:23
  1. 您可以使用永久后端快速响应并突破30个响应限制。您可以手动定义后端实例。如果您将其设置为永久 - 它始终会打开。您可以使用自己的内存缓存实现来快速存储数据。不确定,但也许数据存储的性能适合您。
    如果数据存储正常并且您没有可能需要超过 30 秒的请求 - 使用具有高性能设置的前端。
  2. 是的,您可以上传小程序。只需将其放在 war 文件夹中的某个位置并从 jsp/html 中引用它即可
  3. 好吧,如果您需要 java,可以免费启动您的项目 - 我不知道 GAE 的替代品
  1. You can use permanent backend for fast responces and break through 30 response limitation. You manually can define instances of backends. If you set it to be permanent - it is always will be on. And you can use your own implementation of in memory cache for fast data storing. Not sure, but maybe performance of data store will be ok for you.
    If DataStore ok and you don't have requests that can take more than 30 seconds - use fronend with high performance settings.
  2. Yes you can upload applet. Just put it somewhere in war folder and make reference to it from your jsp/html
  3. Well, if you need java, free for startup your project - I don't know alternatives to GAE
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文