Google app engine Channel API for COMET on non Javascript clients
Asked Answered
I

5

6

How to use Google app engine Channel API for COMET on non JavaScript clients.

I shall be writing a client in python or any other language, and can do HTTP or Socks from client.

How shall I proceed, I want to know what is happening in backed of JavaScript client?
Is JS using Long Polling or what to talk to GAE server.

Inmate answered 18/1, 2011 at 6:40 Comment(0)
F
8

The asynchronous message passing is done by embedding a hidden iframe in the page, then using the goog.net.CrossPageChannel classes from the Google Closure javascript library to send messages from the iframe to the host page.

The Closure CrosspageChannel code is documented here: http://closure-library.googlecode.com/svn/!svn/bc/4/trunk/closure/goog/docs/class_goog_net_xpc_CrossPageChannel.html

You can easily reverse-engineer the messages that'll be passed up from the iframe to the host page. These probably won't change (though there's no absolute guarantee of that right now).

I'm hoping to open-source the client library for the Channel API this quarter, but the above should get you started.

Famagusta answered 19/1, 2011 at 20:14 Comment(1)
@Moishe Does that mean the Javascript client for Channel API is Closure library?Externality
C
4

I've reverse-engineered the javascript Channel API client and created a python library. Feel free to use it. I haven't tested it on any real-world application yet, but from what I can see it seems to work quite well.

Cannonry answered 12/6, 2011 at 16:55 Comment(0)
G
3

Google App Engine has not yet published any documentation about the protocol behind the Channel API so there's no development of libraries outside the Javascript language (here a wrapper for Gwt).

If you are interested you could star these feature requests:
4189 - Enable Java clients (not just javascript) to use the Channel API
4226 - Channel API for native client apps?
4206 - Create a native C# client library for the Channel API

Guildsman answered 18/1, 2011 at 8:14 Comment(2)
has any body tried to reverse engineer the client side activity at low level.Inmate
could be possible but Afaik no public documentation yetGuildsman
A
3

If you want bi-directional updates from a non-JS client, you can use XMPP.

Afire answered 18/1, 2011 at 13:4 Comment(0)
I
0

Cool,... I found an X-Ray view of "channel api" on the app engine talk og Google I/O http://www.youtube.com/watch?v=oMXe-xK0BWA

It uses hidden Iframe http://en.wikipedia.org/wiki/Comet_(programming)#Hidden_iframe

Now i will try to imitate th client in python or something.

Inmate answered 18/1, 2011 at 18:21 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.