chat in RoR

May be just use :wink:

Well, you can always use some easy to use comet solution like and write your own code.

But be warned that, this juggernaut thing, won't work from machines behind firewall and NAT.

The reason is, Juggernaut uses XMLSocket from flash, which talks to the push server through a separate port. Now flash imposes lots of security restrictions on programs opening sockets.

Couple of Juggernaut folks suggest, run this push server on port 443, which is very strange solution in my opinion, because normally you would like to bind your web server on that, if your application wants to use https.

Until, they come with a better solution , Juggernaut can't be used in anything serious. Traditional comet, through Javascript has been tried before by folks, but rails not being thread safe, it is hard to process one controller asynchronously on a mount point(which would be URL of your chat app.)

So you are stuck with Ajax polling. :frowning:

So you are stuck with Ajax polling. :frowning:

This is what campfire does. It's nice when my wireless connection flakes out and returns. Campfire doesn't miss a beat. IRC and Adium both drop and reconnect.

Also, yes Rails is not threadsafe and may not be a good candidate for frequent polling or javascript. But you can easily write a custom mongrel handler to do that stuff.

Thats correct, I saw mongrel handler code, posted on mongrel mailing list, long back. But apparently the idea didn't pan out. May be its time, I should take it for a ride. :slight_smile:

Can't help feeling a bit impressed with this: