[Nitro] Mongrel adapter for Nitro

Joshua Hoke nitro at tap.homeip.net
Thu Feb 2 08:57:17 EST 2006

On Tue, Jan 31, 2006 at 05:36:52PM -0800, Bryan Soto wrote:
> Works on WinXP too with some hoop-jumping. Mongrel fun though, not Nitro.

Here is a bit of an explanation about Mongrel vs. Webrick (I could be
wrong, I am certainly not an expert in either):

Mongrel, at the moment, seems to be only a socket-listener along with a
C extension to parse HTTP requests. It does not interpret requests at
all that I know of, but leaves that to the application. Therefore, the
adapter for Nitro has to pick up the slack... probably a lot of the
missing features could be borrowed from Webrick code, but I don't know
how many you can add before Mongrel starts to lose its speed advantage.

I don't know what changes George made, but the code I wrote did not
really support looking up MIME types (just defaulted to text/plain,
hence the problem you saw). It also did not support
If-Modified-Since/Last-modified headers (allows the browser to cache
unmodified pages), partial content requests (e.g., resuming downloads),
or persistent (keep-alive) connections. I don't even know if the latter
is possible with Mongrel, actually. 

It might also blow up when things don't go the way it expects (a socket
closed, error in Ruby code, invalid HTTP request, etc.); I don't know
how many errors are trapped in Nitro.

In short, because Mongrel has almost no features, all these parts of the
standard have to be implemented in the Mongrel adapter.

Joshua Hoke

More information about the Nitro-general mailing list