Cybrix
Cybrix

Reputation: 3318

What is the concept (data-transmision) behind Facebook's live chat?

I recently joined Facebook (I know I'm late) and I woke up last night with a wonder. It looks like the live-chat module "looks" for new answer message every second or so. Which is a bit too fast IMO. I have no idea how they manage to not get their servers alive.

I would like to know what is the concept behind. Or atleast, how do you guys thinks they achieve that.

I've not yet run Firebug to see the XHR requests beings send.

I believe if the live-chat is hold into an Iframe and the XHRs send to a different HTTP server it would be keep the "main" server "cooler". Also, using the Iframe method will avoid to send too much bandwidth due to the cookies used by the "main" website.

I dont want an answer like "They have hundreds of servers receiving millions requests a minute, they can survive.". I'm sure I'm just missing some of their voodoos magics. :P

Anyway, any ideas anyone?

Upvotes: 1

Views: 1176

Answers (4)

Eric
Eric

Reputation: 2706

Information is available here : http://www.facebook.com/note.php?note_id=14218138919

And these slides explain pretty much everything : http://www.slideshare.net/dariosalvelli/eugene-letuchy-erlangat-facebook

Upvotes: 1

Tesserex
Tesserex

Reputation: 17314

The last time I looked at it with firebug, which admittedly was many months ago, it seemed like they were using the comet method. There was an XHR open for up to a minute, which would either return with new data, or at the end of a minute, nothing.

Upvotes: 0

wizztjh
wizztjh

Reputation: 7041

You might want to google search for xmpp

Upvotes: 0

user500944
user500944

Reputation:

Maybe they are using websockets or something of the sort, you know, to keep a persistent connection with the server instead of opening/closing an HTTP connection every time data needs to be sent.

Upvotes: 0

Related Questions