[Mongrel] http parser

Zed Shaw zedshaw at zedshaw.com
Sun Aug 20 16:08:27 EDT 2006


On Sun, 2006-08-20 at 02:50 -0700, snacktime wrote:
> Just thought I'd let you know that your http parser worked great for
> creating an http protocol handler for Eventmachine.  It wouldn't take
> that much effort to use Eventmachine for Mongrel, might be worth a
> shot just to see how it does.  A few things would need to be
> restructered, like HttpRequest where you read the rest of the body,
> and calling the handler.  But it wouldn't be all that much work I
> don't think.  Took me about an hour to create a working http server
> with Eventmachine, your parser, and subclassing HttpRequest to get rid
> of the socket reading.  I'll spend some more time on it tommorrow and
> see how it progresses.

The EventMachine stuff doesn't really buy you much since they use Ruby's
select still to process connections.  That means you're still stuck with
1024 max files and still stuck with Ruby's threads.  All they do is then
move IO processing out to a *large* amount of convoluted C++ code.  I'm
sure you'll love security auditing that. :-)

They are also working on their Mongrel competitor, but being in true
open source NIH form couldn't be bothered to borrow the parser I wrote
and decided to write their own by hand (it's like I don't even say
anything).  For whatever reason I've always thought those guys were a
little on the shady side.  Not sure why, they just seem desperate for
cash or something.

I'd say play around with it and if you get something interesting working
then that's cool, but in the end adding even more compiled code that I'd
have to distribute that's then tied to a group of developers who're
obviously trying to make bank off my work isn't going to go over well.

FYI, I'm also working on a different approach that moves all of the HTTP
processing into an ultra fast ucontext/poll based IO system.  I'm hoping
it'll work with any language too (Python baby).

But don't let this discourage you, Mongrel is open source so people can
try these things out.  You never know, it could end up being the bee's
knees on a platform like win32.

-- 
Zed A. Shaw
http://www.zedshaw.com/
http://mongrel.rubyforge.org/
http://www.railsmachine.com/ -- Need Mongrel support?



More information about the Mongrel-users mailing list