Introducing the Merb
Posted by ezmobius Mon, 09 Oct 2006 23:02:00 GMTMeet the ‘Merb’. Merb == Mongrel + Erb. It is a super lightwieght ruby app server that maps urls to simple classes that can render erb templates.
so a request to: /foo/bar/baz/12 maps to: Foo.new.bar('baz', '12')
It parses the query string and form posts into @params and @cookies so you can use them in your mini controllers. This is just a toy for now but actually quite useful. If you have a few pages of your dynamic site that have to be fast and you maybe don’t need the full power of rails then Merb can serve dynamic templated requests at 700req/sec with no database access. I’ll get some benchmarks for db access as well soon. But the idea is to also be able to handle multiple file uploads at once without blocking your rails processes. You can either use your front end webservers rewrite module to send all requests to /merb or whatever to the merb server. I am also exploring making it so you can add this as a handler to the mongrels that run your main app and have them co-exist with your rails app mounted at a certain url.
Anyway, please have a play with it and send any feature requests or bugs to the trac install here: Merb Trac Install
And here is the readme that gives a little more detail about how Merb works currently. Merb README
You can check it out of svn here:
svn co http://svn.devjavu.com/merb
There is a little sample app with a few controllers inside the repo. just run ruby server.rb and play on localhost:4000 a bit.
Feedback is most welcome at this point