E
Ezra Zygmuntowicz
Hey there folks-
I'm happy to announce the first useable release of my new =
pocket-=20
framework Merb. Merb is a mongrel handler with built in controller =20
and view templating with erb. It has a nice routing system similar to =20=
rails but much simpler. It uses some of the code from the camping =20
handler and the rails handler and then some of its own secret sauce =20
to form imho a nice fast little framework.
ActiveRecord is supported as shown in the sample app. Merb does =
not =20
use cgi.rb at all(yay!) but can handle file uploads very well. See =20
the sample app. And it can process concurrent file uploads without =20
blocking. Merb also supports the X-SENDFILE header so you can set =20
that header to a path to a file in your controller and then mongrel =20
will serve it directly and your controller can continue on to the =20
next request.
Merb is a pet project of mine but was born out of real life =
need. I =20
am using it in combination with rails apps that need a lot of file =20
uploads or need to serve some dynamic pages faster then rails will =20
allow. Right now Merb performs very well for a dynamic ruby framework =20=
thanks to mongrel being very fast when it doesn't have the Rails =20
Albatross =99 on its back. Serving a dynamic templated page thru merb =20=
routing and controller with 10 ActiveRecord objects being listed out =20
in the view, merb clocks in at 400req/sec on my macbook and a bit =20
better on a real server. Static files are served as fast as mongrel can.
I am using this along side a rails app by rewriting requests to =
a =20
suburl to the merb mongrel like /foo -> merb handler. I am =20
investigating making it possible to mount merb at a url in mongrel =20
itself along side a rails app but I have to do more testing to see =20
how that affects everything.
If you want to play along at home you can do this to get a quick =
start:
$ sudo gem install merb
$ gem unpack merb
$ cd merb-0.0.3/examples/sample_app
# edit the conf/merb_init.rb to add your database password info.
# then add a posts table to your db with a title and body column.
$ merb start -t
Then you can browse to these urls to play around.
http://localhost:4000/posts/new
or
http://localhost:4000/posts/list
or
http://localhost:4000/uploads/start
Here are the relevant links if you want to get involved with Merb =20
development.
http://rubyforge.org/frs/?group_id=3D2383
http://merb.devjavu.com/
http://svn.devjavu.com/merb
http://brainspl.at/articles/2006/10/15/merb-gets-cool-routes-and-file-=20=
uploads
Keep in mind that Merb is only a week or two old and is changing =
=20
fast! If you want to get in on the ground floor and help me add to =20
the base system then you are most welcome. On the other hand, if Merb =20=
kills your children I am not responsible
Thanks for playing!
Cheers-
-- Ezra Zygmuntowicz=20
-- Lead Rails Evangelist
-- (e-mail address removed)
-- Engine Yard, Serious Rails Hosting
-- (866) 518-YARD (9273)
I'm happy to announce the first useable release of my new =
pocket-=20
framework Merb. Merb is a mongrel handler with built in controller =20
and view templating with erb. It has a nice routing system similar to =20=
rails but much simpler. It uses some of the code from the camping =20
handler and the rails handler and then some of its own secret sauce =20
to form imho a nice fast little framework.
ActiveRecord is supported as shown in the sample app. Merb does =
not =20
use cgi.rb at all(yay!) but can handle file uploads very well. See =20
the sample app. And it can process concurrent file uploads without =20
blocking. Merb also supports the X-SENDFILE header so you can set =20
that header to a path to a file in your controller and then mongrel =20
will serve it directly and your controller can continue on to the =20
next request.
Merb is a pet project of mine but was born out of real life =
need. I =20
am using it in combination with rails apps that need a lot of file =20
uploads or need to serve some dynamic pages faster then rails will =20
allow. Right now Merb performs very well for a dynamic ruby framework =20=
thanks to mongrel being very fast when it doesn't have the Rails =20
Albatross =99 on its back. Serving a dynamic templated page thru merb =20=
routing and controller with 10 ActiveRecord objects being listed out =20
in the view, merb clocks in at 400req/sec on my macbook and a bit =20
better on a real server. Static files are served as fast as mongrel can.
I am using this along side a rails app by rewriting requests to =
a =20
suburl to the merb mongrel like /foo -> merb handler. I am =20
investigating making it possible to mount merb at a url in mongrel =20
itself along side a rails app but I have to do more testing to see =20
how that affects everything.
If you want to play along at home you can do this to get a quick =
start:
$ sudo gem install merb
$ gem unpack merb
$ cd merb-0.0.3/examples/sample_app
# edit the conf/merb_init.rb to add your database password info.
# then add a posts table to your db with a title and body column.
$ merb start -t
Then you can browse to these urls to play around.
http://localhost:4000/posts/new
or
http://localhost:4000/posts/list
or
http://localhost:4000/uploads/start
Here are the relevant links if you want to get involved with Merb =20
development.
http://rubyforge.org/frs/?group_id=3D2383
http://merb.devjavu.com/
http://svn.devjavu.com/merb
http://brainspl.at/articles/2006/10/15/merb-gets-cool-routes-and-file-=20=
uploads
Keep in mind that Merb is only a week or two old and is changing =
=20
fast! If you want to get in on the ground floor and help me add to =20
the base system then you are most welcome. On the other hand, if Merb =20=
kills your children I am not responsible
Thanks for playing!
Cheers-
-- Ezra Zygmuntowicz=20
-- Lead Rails Evangelist
-- (e-mail address removed)
-- Engine Yard, Serious Rails Hosting
-- (866) 518-YARD (9273)