views:

18

answers:

0

What are the best practices regarding hosting a web application on RingoJS/Rhino? Seeing as it's single threaded, blocking calls such as long-running queries/file-uploads/web-services will mean that every other request will hang.

As far as I can tell, I could

A.) Open a separate Ringo instance for processes I expect to block for a long time (ie, file transfers, network io) and proxy.

B.) Open about 10-20 Ringo instances and have Apache perform some sort of round-robin proxying based on request load of each process.

I'm just looking for info regarding the pitfalls of each and some approaches other people have taken. Naturally, the problem isn't limited to Ringo, so any input from people using similar environments that have "solved" this problem is greatly appreciated.