GAE Go和长轮询?

huangapple go评论90阅读模式
英文:

GAE Go and long polling?

问题

在Google App Engine上实现长轮询的高效方法是什么?我找到了这个代码,但它是为非GAE应用程序设计的(使用通道和goroutine,据我所知,这不是GAE的最佳选择)。

编辑:

我特别需要为一个我无法控制的应用程序实现长轮询(参见这个参考),因此使用Channel API作为轮询的替代方法是不可行的。

英文:

What is an efficient way of implementing long polling in Golang on Google App Engine? I came across this code, but it was made for a non-GAE application (uses channels and goroutines, which as far as I know aren't the best for GAE).

EDIT:

I specifically need to implement long polling for an application I don't control (see this reference), thus the use of Channel API as a substitution for polling will not do.

答案1

得分: 2

前端实例对于HTTP请求有一个60秒的请求截止时间。您可以尝试使用后端实现长轮询,因为它们不受相同的限制(无限期截止时间)。

英文:

Frontend instance are subject to a 60s request deadline for http request.

You can try implementing long polling using Backends as they don't suffer the same limitation (infinite deadline).

答案2

得分: 0

你想要使用Channel API

英文:

You want to use the Channel API.

huangapple
  • 本文由 发表于 2012年4月14日 08:15:28
  • 转载请务必保留本文链接:https://go.coder-hub.com/10149881.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定