Multithreading

keep in mind that we (my coworker and i) ran into a similar problem and I'm not sure if this is what you might be experiencing.

the current http 1.1 spec suggests that clients have no more than 2 simultaneuous connections to a server at any time. browsers such as Firefox and IE adhere to these suggestions but they can be overridden. but thats neither here nor there...the limit is what is important.

so anyways, in our situtation, we had to fire off several ajax requests, not knowing about this 2 request limit, and we found that if one of the requests got hung up on the server side, then we were down to 1 and if that one hung up...well, we're SOL.

so what we've done is (as Ezra suggests) is use backgroundrb for our intesive work (spawning many threads for said work) and use a periodical request to poll the server for any new data we may need. it works very well and is quite fast.

Chris