[Mongrel] Comet style requests with mongrel

Zed A. Shaw zedshaw at zedshaw.com
Mon Nov 26 08:22:35 EST 2007


On Mon, 26 Nov 2007 09:30:29 +0000
Jeremy Wilkins <jeremy at ibexinternet.co.uk> wrote:

> Cheers for the reply, the intention was to use a custom handler to  
> bypass rails for just this one action. I'm currently using a poll,  
> and am looking into the possibility of keeping the connection open  
> instead. There will only be a maximum of 15 connections open at any  
> one time - would this still be limited by ruby file descriptor limit?

What Eden said, additionally, your sample in the blog post will mostly work, but be careful of threading issues.  In Ruby it's not so bad, but in JRuby you can get hit with weird bugs because they use real threads.

For example, double check that the connection object you're using to query the SQL server doesn't need a little lock.

-- 
Zed A. Shaw
- Hate: http://savingtheinternetwithhate.com/
- Good: http://www.zedshaw.com/
- Evil: http://yearofevil.com/


More information about the Mongrel-users mailing list