[Nitro] Bounty: Serverside (pure ruby http server) adapter for Nitro

Michael Fellinger manveru at weez-int.com
Sun Sep 3 22:20:52 EDT 2006

On Monday 04 September 2006 11:11, Alex Pooley wrote:
> Thanks for the link. Firstly, it's nice to have another option. Still,
> I'm intrigued...
> I wonder if they (or anyone else?) can actually substantiate the claim
> that it is faster than Mongrel? Mongrel doesn't really do much, so where
> could you improve? Mongrel even goes to the trouble of jumping to C to
> partially pre-process requests.
> Also, just flicking through the code (see below) it looks like you won't
> get multiple name=>value pairs for query parameters and cookies. Also
> converting everything to a symbol carries potential for leaking memory,
> particularly when used in this way. That's a DOS waiting to happen
> yeh? :(

Indeed, the more i learn about ServerSide, the more i'm convinced that it's 
trying to be a very lightweight way to serve directory-listings...
not to offend the original author, there are some neat things in there too, 
but i don't think it would stand long in a production-environment.

on the other hand, the very simple clustering and spawning and using 
('serverside start/stop' comes to mind) will have its place on my machine - 
though not to serve nitro - since i'll not use it in production anyway, i've 
got other more crucial things to work on :)
but it's a very nice way to let someone grab a file or two via http... exactly 
the kind of thing i miss since i left kde and don't have the 
kicker-fileserve-plugin anymore :`(

anyway, my advice is to give it a try... :) not as adapter, but as a fine 
additional tool... and who knows what the project will yield later on.

> Still, I'll be keeping my eye on ServerSide.
> --------------------------------------------------------
> (connection.rb)
>       # Parses query parameters by splitting the query string and
> unescaping
>       # parameter values.
>       def parse_parameters(query)
>         query.split(Const::Ampersand).inject({}) do |m, i|
>           if i =~ Const::ParameterRegexp
>             m[$1.to_sym] = $2.uri_unescape
>           end
>           m
>         end
>       end
>       # Parses cookie values passed in the request
>       def parse_cookies
>         @headers[Const::Cookie].split(Const::CookieSplit).inject({}) do |m,
> i| if i =~ Const::CookieRegexp
>             m[$1.to_sym] = $2.uri_unescape
>           end
>           m
>         end
>       end
> On Sat, 2006-09-02 at 22:07 +0200, Jonathan Buch wrote:
> > Hi,
> >
> > very interesting: http://code.google.com/p/serverside/
> >
> > Just got that address from James Britt, really interesting....
> > To quote him:  "Faster than Mongrel, but pure Ruby? Interesting ..."
> >
> > Adapter?  Anyone? :P
> >
> > Jo

Weez International Limited

East Roppongi Bldg 5F, 509
3-16-35 Roppongi, Minato-ku Tokyo #106-0032
Tel: 81-(0)3-3505-3881 Fax: 81-(0)3-3505-3883
E-mail: manveru at weez-int.com
Website: http://weez-int.com

More information about the Nitro-general mailing list