Hacker News new | ask | show | jobs
by zedshaw 5520 days ago
> That helps, but I guess it begs the question of why you would want "10 processes asynchronously responding to one browser"? And what does that really mean?

Two use cases: A background task that involves a few systems, but you don't want to block the main app stack. Simplest case is say image crunching on an upload. More complex case is what you'd do with something like Gearman.

Second: You can carve up your pages into each piece and plug the pieces together. This would require a bit of coordination, but you could have a backend for headers, one for content, side bars, footer, etc. and they all respond when they get results directly to mongrel2's socket with a chunked-encoding.

> It would be really awesome if Mongrel2 could support something like Socket.IO.

It already supports Flash sockets and long polling, so Socket.IO should just work. Haven't tried it though. Check out the docs and look at the chat example in examples/chat/ for a quick (slightly old) demo that's just using jssocket.