Brandon Jones wrote:
> I know that GMail has it's chat embedded, and it manages itself in a
> fairly real time way. I'm quite curious as to how Google does this
> whether it be by polling or some other semi-constant updating, or what
> other ways it is able to do it.
>   
Brandon,

This is how meebo[1] works:

It constantly polls the server for events, as ajax call:

POST http://www.meebo.com/mcmd/events
With session key etc, the post data looks like

focusTime        27
rev      4
sessionKey 
 0000000000000000000000008070ff0ab0ef58d42b73a99f96ca8XXXXXXXXXXX



Now the server tells the client if there is any event, which may be a 
new instant message,
status change, logging on/off of friends, getting added by others etc. 
The server sends the response in json
which may look like:

{rev:5,blevents:[{event:'away',user:'xxxxx',buddy:'xxxxx',buddyalias:'',protocol:'yahoo',onmeebo

:0, 
lastonline:0,data:'',data2:""},{event:'idle',user:'xxxxx',buddy:'xxxxxx',buddyalias:'',protocol

:'yahoo',onmeebo:0, lastonline:0,data:'0',data2:""}]}

Since on http the client can not have a persistent connection with the server, 
the client must constantly 
poll the server. What I have heard is meebo runs ejabberd so they must be 
having a layer which maintains 
a persistent connection with the jabber server and routes this http data to 
jabber server via the corresponding
connection to the server as xmpp message. 

Gtalk also dose the same thing. You can install the firebug[2] plugin for 
firefox which lets you 
investigate the ajax call very easily.

1. http://www.meebo.com
2. Firebug plugin for firefox: 
https://addons.mozilla.org/en-US/firefox/addon/1843


Thanks & Regards,
Arup Malakar




--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"google-talk-open" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-talk-open?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to