强制通道API进行轮询

强制通道API进行轮询

本文介绍了强制通道API进行轮询的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

希望Moishe看到这一点:在开发模式中,频道api客户端(javascript)采取轮询......并使用非常快的轮询速率。在我周围发现后,我发现如果我设置

  goog.appengine.Socket.POLLING_TIMEOUT_MS = interval; 

我可以控制投票率。我想知道的是:




  • 我如何知道客户端是否会在生产中进入轮询模式?

  • 是否可以强制客户端进入轮询模式?

  • 如果我的应用达到频道配额,会发生什么情况? / _ah / channel / endpoint会完全停止工作吗?或者它会求助于投票?



- 谢谢

解决方案

答案:


  1. 客户端永远不会进入生产中的轮询模式。

  2. 见上面


  3. 调用create_channel ()会失败,你将无法获得更多的令牌。现有的令牌(以及频道)在超时之前一直有效。


希望有所帮助!



-Moishe


Hopefully Moishe sees this: in development mode, the channel api client (javascript) resorts to polling... and uses a very fast polling rate. After poking around I found that if I set

goog.appengine.Socket.POLLING_TIMEOUT_MS = interval;

I can control the polling rate. What I'm wondering is:

  • How do I know if/when the client is going to go into "poll mode" in production?
  • Is it possible to force the client into "poll mode"?
  • What happens if I reach the channel quota for my app? will the /_ah/channel/ endpoint just stop working altogether? or will it resort to polling?

-Thank you

解决方案

Answers:

  1. The client will never go into polling mode in production. The implementation is completely different in prod.

  2. See above

  3. The call to create_channel() will fail and you won't be able to get any more tokens. Existing tokens (and hence channels) will work until they time out.

Hope that helps!

-Moishe

这篇关于强制通道API进行轮询的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-03 18:52