我如何在GAE之上运行WebSocket服务器? [英] How can I run a WebSocket server on top of GAE?

查看:92
本文介绍了我如何在GAE之上运行WebSocket服务器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在Google App Engine上运行WebSocket服务器?可能吗?是否有可能?

解决方案

是否可能?



No。



现在你不能这样做,因为GAE不允许通用的入站套接字连接。每个请求也被限制为30秒,但这可以通过自动重新连接和会话跟踪轻松解决。

可以吗?



可能。



Google一直是WebSockets标准中最大的(主要)推动者之一。如果他们不在未来的某个时候将其支持推向GAE,我会感到惊讶。请注意,WebSockets草案标准仍然不变,所以Google可能会犹豫在标准更加稳固之前添加支持。



以下是GAE上WebSockets支持的错误: http://code.google.com/p/googleappengine/issues/详细信息?id = 2535



请注意,Google员工表示不在路线图上,但他们知道这很有用。这就像你从谷歌获得有关尚未公布的功能的正面答案。我建议您将该语音添加到该错误中,以支持WebSocket支持。它也不会受到伤害。



此外,根据您的应用程序,您可能会考虑很快将支持GAE的Channel API:





编辑(2015):Channels API为(现在已经有一段时间了)。


How can I run a WebSocket server on top of Google App Engine? Is it possible? Will it be possible?

解决方案

Is it possible?

No.

You can't right now because GAE doesn't allow generic inbound socket connections. Each request is also limited to 30 seconds but this could easily be worked around with automatic reconnection and session tracking.

Will it be possible?

Probably.

Google has been one of the biggest (main) promoters of the WebSockets standard. I would be surprised if they don't push support for it into GAE at some point in the future. Note that the WebSockets draft standard is still in flux so Google might be hesitant to add support before the standard is more solid.

Here is the bug for WebSockets support on GAE: http://code.google.com/p/googleappengine/issues/detail?id=2535

Note that a google employee indicates it's not on the roadmap but that they know it would be useful. That's about as positive an answer as you get from google about features that have not been announced. I recommend adding your voice to that bug in favor of WebSocket support. It can't hurt.

Also, depending on your application, you may consider the Channel API which will likely have GAE support soon:

EDIT (2015): the Channels API is available now (it has been for a while).

这篇关于我如何在GAE之上运行WebSocket服务器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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