tags:

views:

413

answers:

1

I am planning to build a web chat on my site. I know two way of doing this: one is using XMPP web client (through flash, long TCP connection), and the other is facebook way, long-polling.

But facebook is going to update their chat to support Jabber (XMPP), so can some one tell what way is better? (including upgrading to XMPP)

+1  A: 

I've had pretty good results with long polling in my applications, but the bigger question is whether you're going to face the C10K problem. If so, structuring your code to deal with that kind of intense workload will likely dominate all other design considerations, at least in the short term. :-)

Other than server load, the primary consideration for which strategy to use will be client environment compatibility -- to be able to work from behind draconian firewalls that only allow HTTP or in browser environments that prohibit any plugins, long polling is the only way to survive, but it has more overhead than the simple TCP connection approach.

Jeffrey Hantin
Workload somehow is the problem of scalability of the architecture. But if I choose long-polling, is that easy to upgrading to XMPP? And what resources are available to build such a web chat system?Can someone make a comparison?
Mickey Shine
Fortunately the problem decomposes fairly readily into a pluggable transport component separable from the chat application itself, so if it is well-written it should be straightforward to support both.
Jeffrey Hantin