Re: [google-appengine] Channel API outside browsers

2010-12-03 Thread Tim Meadowcroft
On Wednesday, November 3, 2010 4:20:19 AM UTC, Robert Kluin wrote:Have
you look at the communications at all? I the javascript file is
included in the SDK. It is a little heavy, but you could probably
use firebug (or chrome/safari dev console) to figure out what is going
on.
http://code.google.com/p/googleappengine/source/browse/trunk/python/google/appengine/tools/dev-channel-js.js






The SDK code uses a DevChannel implementation


goog.exportSymbol(goog.appengine.Channel, goog.appengine.DevChannel);


which is NOT doing COMET or similar, it simply polls a special page
(/dev) once a second or so.


But running against the real production AppEngine, /_ah/channel/jsapi
returns a 302 redirect to


http://talkgadget.google.com/talkgadget/channel.js


That code is minified and so not so easy to examine, but I expect the
Channel object implemented there does proper COMET style long queries -
you could watch what happens from the browser and see what's sent back
and forth, but looking at the (current) SDK may help you understand the
API calls but won't show you anything about how it's implemented in
production.


--
Tim

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appeng...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



Re: [google-appengine] Channel API outside browsers

2010-12-03 Thread Tim Meadowcroft
On Wednesday, November 3, 2010 4:20:19 AM UTC, Robert Kluin wrote:Have
you look at the communications at all? I the javascript file is
included in the SDK. It is a little heavy, but you could probably
use firebug (or chrome/safari dev console) to figure out what is going
on.
http://code.google.com/p/googleappengine/source/browse/trunk/python/google/appengine/tools/dev-channel-js.js






The SDK code uses a DevChannel implementation


goog.exportSymbol(goog.appengine.Channel, goog.appengine.DevChannel);


which is NOT doing COMET or similar, it simply polls a special page
(/dev) once a second or so.


But running against the real production AppEngine, /_ah/channel/jsapi
returns a 302 redirect to


http://talkgadget.google.com/talkgadget/channel.js


That code is minified and so not so easy to examine, but I expect the
Channel object implemented there does proper COMET style long queries -
you could watch what happens from the browser and see what's sent back
and forth, but looking at the (current) SDK may help you understand the
API calls but won't show you anything about how it's implemented in
production.


--
Tim

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appeng...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



Re: [google-appengine] Channel API outside browsers

2010-11-03 Thread Peter Petrov
It will let you simplify _when_ you run inside a web browser. That's what
the Channel API is designed for. For pushing data to other types of clients
(automated services, bots, etc.) there already exist good solutions - XMPP,
PubSubHubbub, plain HTTP POSTs.

When you run in a browser, the complexity is hidden in the Channel API
javascript. Only a simplistic interface similar to WebSockets is exposed to
you as developer. But the complexity hidden underneath in the Channel API
client library is pretty big:

- first, there is HTTP long-polling used to emulate a persistent connection
- second, an undocumented protocol is used to frame the separate messages;
it's probably ProtocolBuffers-based
- third, an invisible Iframe together with a Closure XPC channel is used to
bypass the same-origin javascript policy


The last one is not necessary if you create an out-of-browser client. But
the first two are complex enough (primarily the first one). Considering that
you have other (good) options, it would be quite crazy to go down that road.

On Wed, Nov 3, 2010 at 6:37 AM, Robert Kluin robert.kl...@gmail.com wrote:

 Are the data-exchanges overly complicated?

 I have used XMPP for an app, I was hoping the channel API would let me
 simplify.



 Robert





 On Wed, Nov 3, 2010 at 00:29, Peter Petrov onest...@gmail.com wrote:
  Forget about emulating it outside of a browser. Your best bet is using a
  separate mechanism for sending messages to non-browser clients - for
 example
  make a HTTP postback, or send a XMPP message.
 
  On Wed, Nov 3, 2010 at 6:20 AM, Robert Kluin robert.kl...@gmail.com
 wrote:
 
  Have you look at the communications at all?  I the javascript file is
  included in the SDK.  It is a little heavy, but you could probably
  use firebug (or chrome/safari dev console) to figure out what is going
  on.
 
 
 
 http://code.google.com/p/googleappengine/source/browse/trunk/python/google/appengine/tools/dev-channel-js.js
 
 
 
 
  Robert
 
 
 
 
 
 
  On Tue, Nov 2, 2010 at 08:41, Tomas Alaeus tala...@gmail.com wrote:
   I for one thought directly of games when I heard that the Channel API
   were coming to AppEngine. However, all discussions and articles only
   mentions a Javascript client running in a web browser. Will it come
   ports to other languages as well? Maybe the actual communication is so
   simple that it is trivial to do oneself (considering that the API is
   somewhat similar to websockets if I understood it correctly)?
  
   Thanks, Tomas
  
   --
   You received this message because you are subscribed to the Google
   Groups Google App Engine group.
   To post to this group, send email to
 google-appeng...@googlegroups.com.
   To unsubscribe from this group, send email to
   google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com
 .
   For more options, visit this group at
   http://groups.google.com/group/google-appengine?hl=en.
  
  
 
  --
  You received this message because you are subscribed to the Google
 Groups
  Google App Engine group.
  To post to this group, send email to google-appeng...@googlegroups.com.
  To unsubscribe from this group, send email to
  google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com
 .
  For more options, visit this group at
  http://groups.google.com/group/google-appengine?hl=en.
 
 
  --
  You received this message because you are subscribed to the Google Groups
  Google App Engine group.
  To post to this group, send email to google-appeng...@googlegroups.com.
  To unsubscribe from this group, send email to
  google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com
 .
  For more options, visit this group at
  http://groups.google.com/group/google-appengine?hl=en.
 

 --
 You received this message because you are subscribed to the Google Groups
 Google App Engine group.
 To post to this group, send email to google-appeng...@googlegroups.com.
 To unsubscribe from this group, send email to
 google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/google-appengine?hl=en.



-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appeng...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



[google-appengine] Channel API outside browsers

2010-11-02 Thread Tomas Alaeus
I for one thought directly of games when I heard that the Channel API
were coming to AppEngine. However, all discussions and articles only
mentions a Javascript client running in a web browser. Will it come
ports to other languages as well? Maybe the actual communication is so
simple that it is trivial to do oneself (considering that the API is
somewhat similar to websockets if I understood it correctly)?

Thanks, Tomas

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appeng...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



Re: [google-appengine] Channel API outside browsers

2010-11-02 Thread Robert Kluin
Have you look at the communications at all?  I the javascript file is
included in the SDK.  It is a little heavy, but you could probably
use firebug (or chrome/safari dev console) to figure out what is going
on.

http://code.google.com/p/googleappengine/source/browse/trunk/python/google/appengine/tools/dev-channel-js.js




Robert






On Tue, Nov 2, 2010 at 08:41, Tomas Alaeus tala...@gmail.com wrote:
 I for one thought directly of games when I heard that the Channel API
 were coming to AppEngine. However, all discussions and articles only
 mentions a Javascript client running in a web browser. Will it come
 ports to other languages as well? Maybe the actual communication is so
 simple that it is trivial to do oneself (considering that the API is
 somewhat similar to websockets if I understood it correctly)?

 Thanks, Tomas

 --
 You received this message because you are subscribed to the Google Groups 
 Google App Engine group.
 To post to this group, send email to google-appeng...@googlegroups.com.
 To unsubscribe from this group, send email to 
 google-appengine+unsubscr...@googlegroups.com.
 For more options, visit this group at 
 http://groups.google.com/group/google-appengine?hl=en.



-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appeng...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



Re: [google-appengine] Channel API outside browsers

2010-11-02 Thread Peter Petrov
Forget about emulating it outside of a browser. Your best bet is using a
separate mechanism for sending messages to non-browser clients - for example
make a HTTP postback, or send a XMPP message.

On Wed, Nov 3, 2010 at 6:20 AM, Robert Kluin robert.kl...@gmail.com wrote:

 Have you look at the communications at all?  I the javascript file is
 included in the SDK.  It is a little heavy, but you could probably
 use firebug (or chrome/safari dev console) to figure out what is going
 on.


 http://code.google.com/p/googleappengine/source/browse/trunk/python/google/appengine/tools/dev-channel-js.js




 Robert






 On Tue, Nov 2, 2010 at 08:41, Tomas Alaeus tala...@gmail.com wrote:
  I for one thought directly of games when I heard that the Channel API
  were coming to AppEngine. However, all discussions and articles only
  mentions a Javascript client running in a web browser. Will it come
  ports to other languages as well? Maybe the actual communication is so
  simple that it is trivial to do oneself (considering that the API is
  somewhat similar to websockets if I understood it correctly)?
 
  Thanks, Tomas
 
  --
  You received this message because you are subscribed to the Google Groups
 Google App Engine group.
  To post to this group, send email to google-appeng...@googlegroups.com.
  To unsubscribe from this group, send email to
 google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com
 .
  For more options, visit this group at
 http://groups.google.com/group/google-appengine?hl=en.
 
 

 --
 You received this message because you are subscribed to the Google Groups
 Google App Engine group.
 To post to this group, send email to google-appeng...@googlegroups.com.
 To unsubscribe from this group, send email to
 google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/google-appengine?hl=en.



-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appeng...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



Re: [google-appengine] Channel API outside browsers

2010-11-02 Thread Robert Kluin
Are the data-exchanges overly complicated?

I have used XMPP for an app, I was hoping the channel API would let me simplify.



Robert





On Wed, Nov 3, 2010 at 00:29, Peter Petrov onest...@gmail.com wrote:
 Forget about emulating it outside of a browser. Your best bet is using a
 separate mechanism for sending messages to non-browser clients - for example
 make a HTTP postback, or send a XMPP message.

 On Wed, Nov 3, 2010 at 6:20 AM, Robert Kluin robert.kl...@gmail.com wrote:

 Have you look at the communications at all?  I the javascript file is
 included in the SDK.  It is a little heavy, but you could probably
 use firebug (or chrome/safari dev console) to figure out what is going
 on.


 http://code.google.com/p/googleappengine/source/browse/trunk/python/google/appengine/tools/dev-channel-js.js




 Robert






 On Tue, Nov 2, 2010 at 08:41, Tomas Alaeus tala...@gmail.com wrote:
  I for one thought directly of games when I heard that the Channel API
  were coming to AppEngine. However, all discussions and articles only
  mentions a Javascript client running in a web browser. Will it come
  ports to other languages as well? Maybe the actual communication is so
  simple that it is trivial to do oneself (considering that the API is
  somewhat similar to websockets if I understood it correctly)?
 
  Thanks, Tomas
 
  --
  You received this message because you are subscribed to the Google
  Groups Google App Engine group.
  To post to this group, send email to google-appeng...@googlegroups.com.
  To unsubscribe from this group, send email to
  google-appengine+unsubscr...@googlegroups.com.
  For more options, visit this group at
  http://groups.google.com/group/google-appengine?hl=en.
 
 

 --
 You received this message because you are subscribed to the Google Groups
 Google App Engine group.
 To post to this group, send email to google-appeng...@googlegroups.com.
 To unsubscribe from this group, send email to
 google-appengine+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/google-appengine?hl=en.


 --
 You received this message because you are subscribed to the Google Groups
 Google App Engine group.
 To post to this group, send email to google-appeng...@googlegroups.com.
 To unsubscribe from this group, send email to
 google-appengine+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/google-appengine?hl=en.


-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appeng...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.