user968808
user968808

Reputation:

chat server using comet / websockets

I'm trying to code a chat server but want it to be able to cope with relativly high load and be compatible in all browsers. (hardware is not too big an issue)

So i was looking at websockets / comet / python / tornado.

Websocket seem to have a lot of compatibility issues cross browser. If websockets don't work it falls back to flash and there is a delay while download the .swf file. Our users will think the site is broke with the delay.

My question is, Am i missing something with websockets? should i be looking at anything else. There is so much written online im starting to not know whats good and bad anymore.

Thanks

Upvotes: 1

Views: 453

Answers (2)

Stefan Podkowinski
Stefan Podkowinski

Reputation: 5249

socket.io is pretty popular for javascript clients and tornadio provides tornado integration. Check Leggetters reference list for further options (great work btw!).

Upvotes: 0

leggetter
leggetter

Reputation: 15467

Websocket seem to have a lot of compatibility issues cross browser.

Browser compatibility is pretty good and improving all the time. See: caniuse.com/#feat=websockets

That said, you should have fallback options.

If websockets don't work it falls back to flash and there is a delay while download the .swf file. Our users will think the site is broke with the delay.

Only if the delay is significant. Even if it is you can get around this by offering the user constructive feedback to let them know that the application is connecting and that everything is working as expected.

Unless you can guarantee that all of your users either have native WebSocket support or have Flash installed then you should also have an HTTP-based fallback; HTTP-Long Polling, HTTP-Streaming, legacy AJAX polling.

There are lots of good realtime web tech solutions out there for implementing chat applications. Most of them will handle fallback for you and will provide you with mechanisms for keeping users informed of connection progress. Some also deal with horizontal scaling for you too.

Upvotes: 2

Related Questions