Google App Engine Channel API 初体验

46 views
Skip to first unread message

google app engine

unread,
Dec 18, 2010, 7:19:46 AM12/18/10
to google-app-e...@googlegroups.com

1. channel api的id分成key与channel api
channel api是给客户端的,对于服务器没有什么用。
而key是服务器端的,服务器只要有key就可以了

流程大约是这样

a)创建
key = md5(str).hexdigest()    #要限制在64位以内
channel_id = channel.create_channel(key)
b)
然后
channel.send_message(key, message) 发送消息
c)
在客户端的注意点是message发出去后,在javascript端也是一个对象。
内容需要通过得到的对象data.data来得到发送的字符串。

2. 在SDK上并没有使用comet技术,而是使用了polling,不断的从服务器取数据。


google app engine

unread,
Dec 18, 2010, 7:23:05 AM12/18/10
to google-app-e...@googlegroups.com
3. channel api 现在没有状态,无法知道如何客户端是不是已经断开。

google app engine

unread,
Jan 1, 2011, 6:16:27 PM1/1/11
to google-app-e...@googlegroups.com
新发现, channel api不支持ie6

饥饿的兔子

unread,
Jan 2, 2011, 8:30:08 AM1/2/11
to google-app-e...@googlegroups.com
一直都不知道channel做什么用的。。


 
在 2011年1月2日 上午7:16,google app engine <cali...@gmail.com>写道:
新发现, channel api不支持ie6

--
您收到此信息是由于您订阅了 Google 论坛“Google App Engine 中文开发组”论
坛。
要在此论坛发帖,请发电子邮件到 google-app-e...@googlegroups.com
要退订此论坛,请发邮件至
google-app-engine-...@googlegroups.com
更多选项,请通过
https://groups.google.com/forum/?hl=zh-CN#forum/google-app-engine-cn-dev
访问该论坛



--
autumn-sea.appspot.com 测试版,摘录一些自己喜欢的文章.

Reply all
Reply to author
Forward
0 new messages