At Google IO 2010, the app engine team announced that they had a Channel API in the works. This week I got invited by Moishe Lettvin of the Channel API team to join a handful of developers to try it out. The api is undocumented at the moment and can be considered in private alpha.
I haven’t had the chance to actually use the api yet but I have studied the examples (there are only two) and browsed the private mailing list to better understand it. Here are a few things that I have understood about the api:
- Each client connection is called a “Channel”. There can only be one active channel per client and it is identified by a unique id.
- XMPP is used for transferring messages, not websockets. This is accomplished by embedding a hidden Google Talk iframe in the application. The javascript api does this automatically.
- The intent of the API is to allow multiple clients (browsers) to share messages instantaneously (eg: chatting). It is not designed for server-side streaming which really goes against the grain of app engine.
- Websocket support may be implemented in the future.
The basic javascript client code is quite simple:
var channel = new goog.appengine.Channel(channel_id);
var socket = channel.open();
socket.onopen = function() {
window.setTimeout(function() {sendMessage('connected')}, 100);
}
socket.onmessage = function(evt) {
var o = JSON.parse(evt.data);
... app logic ...
}
and the server-side Python code is not too bad either:
from google.appengine.api import channel from google.appengine.api import users # creating a channel user = users.get_current_user() id = channel.create_channel(user) # sending a message to that channel later in the code channel.send_message(user, "json formatted message")
As you can see, the API is quite simple. Hopefully it will prove to be a boon for developers trying to build distributed multi-user/multi-player applications using the app engine platform.
UPDATE 12/2: The Channel API is now publicly available in v 1.4.0 of the SDK.
Salman Haq: Sneak Peak: GAE Channel API http://bit.ly/9bf3Ve
Salman Haq: Sneak Peak: GAE Channel API http://bitshaq.com/2010/09/01/sneak-peak-gae-channel-api/
RT @planetpython: Salman Haq: Sneak Peak: GAE Channel API http://bit.ly/9bf3Ve
RT @planetpython: Salman Haq: Sneak Peak: GAE Channel API http://bit.ly/9bf3Ve
RT @slmnhq: Sneak Peek: GAE Channel API http://bit.ly/9MUsxL
"Sneak Peek: GAE Channel API" – http://bit.ly/acrG4z #appengine #channel
RT @dannmartens: "Sneak Peek: GAE Channel API" – http://bit.ly/acrG4z #appengine #channel
Sneak Peek: GAE Channel API http://htn.to/Gfx3XU
#appengine channel-api
http://bitshaq.com/2010/09/01/sneak-peak-gae-channel-api/
メモメモ。後で使えるかも。 QT @bluerabbit777jp: #appengine channel-api
http://bitshaq.com/2010/09/01/sneak-peak-gae-channel-api/
RT @dannmartens: "Sneak Peek: GAE Channel API" – http://bit.ly/acrG4z #appengine #channel
RT @paul_kinlan: RT @dannmartens: Sneak Peek: GAE Channel API – http://bit.ly/acrG4z #appengine #channel
RT @paul_kinlan: RT @dannmartens: Sneak Peek: GAE Channel API – http://bit.ly/acrG4z #appengine #channel
RT @dannmartens: "Sneak Peek: GAE Channel API" – http://bit.ly/acrG4z #appengine #channel
RT @dannmartens: "Sneak Peek: GAE Channel API" – http://bit.ly/acrG4z #appengine #channel
RT @TyphoonAE: RT @dannmartens: "Sneak Peek: GAE Channel API" – http://bit.ly/acrG4z #appengine #channel
RT @slmnhq: Sneak Peek: GAE Channel API http://bit.ly/9MUsxL
RT @slmnhq: Sneak Peek: GAE Channel API http://bit.ly/9MUsxL
RT @slmnhq: Sneak Peek: GAE Channel API http://bit.ly/9MUsxL
Interesting, any word on when this will go live?
I wouldn’t be the right person to ask.
I do know that the engineer working on this api has requested public demos that he can show to an internal team at Google.
RT @slmnhq: Sneak Peek: GAE Channel API http://bit.ly/9MUsxL
GAE Channel API — embedded XMPP for multiple clients instantaneous message sharing on App Engine http://bit.ly/citH6i
RT @johl: GAE Channel API — embedded XMPP for multiple clients instantaneous message sharing on App Engine http://bit.ly/citH6i
RT @johl: GAE Channel API — embedded XMPP for multiple clients instantaneous message sharing on App Engine http://bit.ly/citH6i
[...] end, providing an Alicehub API. The real time conversation features are built on top of the coming GAE Channels API of which we are “Trusted Testers”. This Alicehub API is then used by the web interface, [...]
[...] key to the Alicehub experience; The real time conversation features are built on top of the coming GAE Channels API of which we are “Trusted [...]
Realtime Channel API on #appengine via #xmpp: http://j.mp/9ltL6L http://j.mp/gae-realtime http://j.mp/gae-roadmap http://j.mp/a5eRKn #gddcz
[Python] Salman Haq: Sneak Peek: GAE Channel API:
At Google IO 2010, the app engine team announced that they ha… http://bit.ly/9bf3Ve
Is it possible to use Third party xmpp servers in closed environments? Somehow that combined with a future gpg/ring of thrust would be awesome
@higayasuo JS側のGTalkガジェットについてはこのエントリと例のMLで説明されてたと思います http://ow.ly/3o4Pz
Is it possible to use Third party xmpp servers in closed environments? Somehow that combined with a future gpg/ring of thrust would be awesome
Hi everybody, I`m trying to make a chat with channels, just to know exactly how does channels work, but Is not as easy as I thought, can anybody show me an article where show code with java implementation, an easy one except tictactoe