channel-api

App Engine Python Modules and channel service

五迷三道 提交于 2019-12-05 17:49:17
问题 I am using App Engine Modules in my python project. (https://developers.google.com/appengine/docs/python/modules/#Python_Background_threads) I am also using channels in m project: https://developers.google.com/appengine/docs/python/channel/ I want to direct the connected/disconnected post messages ('/_ah/channel/connected/', '/_ah/channel/disconnected/') to my api module. Right now I can't get them to show up in any module (default or api) app.yaml api_version: 1 application: integrate

Force Channel API to poll

坚强是说给别人听的谎言 提交于 2019-12-05 07:02:53
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: The

HTTP Get with 204 No Content: Is that normal

▼魔方 西西 提交于 2019-12-03 05:30:42
问题 Is it a normal occurrence for an HTTP GET Request to have a response with status code 204 - No Content ? Like, is this semantically correct with respect to what an HTTP GET is supposed to accomplish? I know that a 204 - No Content is okay for an HTTP POST Request . For GET request, if no data is to be sent back, is the 204 status code appropriate? Should I use 404, or just stick to 200 for success but have an empty response? The use case for this question is a Java application that I am

Best Method of Channel Pooling in Google App Engine

扶醉桌前 提交于 2019-12-03 03:43:57
问题 It seems the only way to make the GAE Channel API financially viable is to implement some kind of pooling mechanism (one of the senior app engine product managers even told me this when I emailed them about the exorbitant price) to reuse channels that have not yet expired. I've been brainstorming ways (places) to implement a channel pool, but each method I think of has some pretty serious drawbacks. Static memory of a Servlet -- Good, but will drop quite a bit of open channels when a new VM

Google App Engine Channel API

此生再无相见时 提交于 2019-12-02 21:13:33
I am trying to learn GAE's channel API (using Java), but I cannot figure out where to start from. I went through Channel API Overview (Java) but the code posted there wasn't complete for brevity purposes. And since I m newbie, it would be very helpful if complete example code is available. Thanks, Shrey Jon Newmuis The code in the Channel API Overview that you've linked to is pretty complete, it's just a bit all over the place. I will admit, once you understand it, I feel like it's much simpler than how they've made it seem, but I'm glad they erred on the side of providing too much information

Implement Comet / Server push in Google App Engine in Python

好久不见. 提交于 2019-12-02 20:23:27
How can I implement Comet / Server push in Google App Engine in Python? Moishe Lettvin We just announced the Channel API to do comet push with App Engine apps: http://googleappengine.blogspot.com/2010/05/app-engine-at-google-io-2010.html If you're at Google IO, I'll be talking about this at 1pm tomorrow (on the APIs track): http://code.google.com/events/io/2010/sessions/building-real-time-apps-app-engine-feed-api.html Here's the YouTube video of the session: http://www.youtube.com/watch?v=oMXe-xK0BWA Hopefully last update! This is now released: code.google.com/appengine/docs/python/channel At

Best Method of Channel Pooling in Google App Engine

你说的曾经没有我的故事 提交于 2019-12-02 15:59:06
It seems the only way to make the GAE Channel API financially viable is to implement some kind of pooling mechanism (one of the senior app engine product managers even told me this when I emailed them about the exorbitant price) to reuse channels that have not yet expired. I've been brainstorming ways (places) to implement a channel pool, but each method I think of has some pretty serious drawbacks. Static memory of a Servlet -- Good, but will drop quite a bit of open channels when a new VM instance opens and/or a client gets passed from one VM to another. Memcache -- At least the memory is

AppEngine Channel API - Best way to check if a channel is still open (server side)

生来就可爱ヽ(ⅴ<●) 提交于 2019-11-30 07:24:00
I have built a social network/dating type application on the AppEngine and am currently in the process of adding a chat built on top of the Channel API. However, the problem that I have is that users may reload or navigate to new pages while the chat is going on (as they can in Facebook). This means that the server doesn't easily know if it should generate a new channel ID token for a given client, or if a given client has already been assigned a channel token. It would be extremely useful if there were a way to check (server side) if a particular client already has a channel open. For example

AppEngine Channel API - Best way to check if a channel is still open (server side)

廉价感情. 提交于 2019-11-29 09:36:42
问题 I have built a social network/dating type application on the AppEngine and am currently in the process of adding a chat built on top of the Channel API. However, the problem that I have is that users may reload or navigate to new pages while the chat is going on (as they can in Facebook). This means that the server doesn't easily know if it should generate a new channel ID token for a given client, or if a given client has already been assigned a channel token. It would be extremely useful if

unable to create new channel in javascript of channel API

╄→гoц情女王★ 提交于 2019-11-26 23:41:04
问题 Here is my python file import os from google.appengine.api import channel from google.appengine.ext import webapp from google.appengine.ext.webapp import template from google.appengine.ext.webapp.util import run_wsgi_app import logging token = 'default' class SendMessage(webapp.RequestHandler): def post(self): logging.info('Sending messgae with tokens : ' + token) channel.send_message(token,'Hello from the server') class MainPage(webapp.RequestHandler): def get(self): global token token =