Is long polling possible in Google App Engine?

后端 未结 3 1825
面向向阳花
面向向阳花 2020-12-31 17:49

I need to make application that needs to poll server often, but GAE has limitations on requests, so making a lot of requests could be very costly. Is it possible to use long

3条回答
  •  [愿得一人]
    2020-12-31 18:25

    Google AppEngine has a new feature Channel API, with that you have a possibility to build a good realtime application.

    Another solution is to use a third part comet server like mochiweb or twisted with a iframe pattern.

    Client1, waiting a event:

    client1 --Iframe Pattern--> Erlang/Mochiweb(HttpLongPolling):
    

    Client2, sending a message:

    client2 --XhrIo--> AppEngine --UrlFetch--> Erlang/Mochiweb
    

    To use mochiweb with comet pattern, Richard Jones has written a good topic (on google: Richard Jones A Million-user Comet Application).

提交回复
热议问题