I’d like to implement a scalable chatroom in rails using AJAX. I know from research that the only scalability happens with a server-side push.
My two questions are:
1) In a reasonably efficient chat server, at what point does polling become prohibitive? 2) I really don’t want to use Juggernaut. I don’t know much about how comet works. I guess I’m wondering if this would be horribly difficult for me to build using Javascript (to create a client side server/poller) and another language (to provide efficient polling for clients behind a firewall, and an integration into the CGI). and 3) (yes, out of 2), whether I’m even going about it the right way?
The simplest answer I could hope for is a quantified ‘yes, you put 5 lines of Javascript into the client and 20 lines of ruby into a CGI script, and call it a day’.
If it was that easy to do people would not have built those technologies. IMHO I think polling is always a going to be a hacky way to do it. That Said….
I am not sure why Juggernaut is off the cards A guy a work for built this site 64Squares with it and is works great.
I know other sites such as WeeWar use the polling method and they have upwards or 400 request a Min. So I think it would take sometime before the scaling became an issue.
Good luck
Cheers