Yet another release of Mongrel proudly pushed out for everyone to review
and
comment on. This time though, I’ve done up a little website that’s way
better than the plan Rdoc that used to stand in for the site like a
one-legged leper.
As you should already know, Mongrel is a fast HTTP server and library
for
Ruby partially written in C. It supports running Ruby on Rails,
Camping,
and Og+Nitro applications as well as featuring a simple API for others
to
use in their own frameworks. Performance is usually much higher than
WEBrick while the features are kept much lower.
== 0.3.1 Changes
This release fixes a huge bug in the Rails support where the
Content-length was very very wrong. People who had weird problems
downloading images should try this release and let me know the results.
It features a new command and plugin system (thanks to pluginfactory)
with
an initial start and stop command for Ruby on Rails.
New site that was basically stolen from all sorts of Creative Commons
licensed sources. Please read the attributions page ( http://mongrel.rubyforge.org/attributions.html) so they get credit.
Dependency problems with daemons gem solved.
== The New Rails Runner
This release features a mongrel_rails script that has start and stop
commands as well as full options for dictating it’s configuration.
Simply
do the following:
Which runs Mongrel in the background. You can stop it with:
$ mongrel_rails stop
And you¹re all set. You can pass the start and stop commands the -h
option
to find out all the possible options.
=== Win32 Folks
The only thing you people need to do right now is avoid the -d option to
start. Win32 doesn¹t support POSIX fork so it won¹t go into the
background.
I¹ll be adding support for making Mongrel a service in a few releases.
== The Next Release
I’ll be grabbing all the various Rails applications I can and begin
testing
Mongrel against them. If anyone is building an application and is
interested in testing Mongrel with their gear then shoot me an e-mail.
There is one outstanding bug with the Rails support which I have to fix,
but
otherwise it’s working reasonably well.
Any suggestions for documentation people want are more than welcome.
Finally, I’m looking at a caching mechanism that would involve
dyanmically
storing gzip and regular versions of all returned conent into a
memcached.
I have a small prototype kind of working that does this, but I’m
interested
in people’s ideas for what they’d like in a caching system that’s
between
Rails page caching and fully dynamic content.
= Love Your Dog?
I’m looking for people who want their buddy featured on the Mongrel
site.
Just post a photo via some photo posting site and let me know where it
is.
I’ll make a page for all the “mongrels” out there. 'Cause dogs rule.
Sweet! This is coming along nicely. A few comments…
Why restrict mongrel_rails to only allow “development” and
“production” as environments? Some folks (like me ;-)) have adding
additional environments, including “qa” and “sandbox”.
In a similar vein, what do you think about defaulting to
ENV[‘RAILS_ENV’] if that’s set?
Are you planning on exposing the num_processors argument to
mongrel_rails, to allow a command-line option for setting it either
higher or lower?
Lastly, any plans to allow for a graceful restart?
Don’t know if this is related to mongrel at all, but for some weird
reason
when I run my rails app under mongrel, it thinks it’s in production mode
instead of development mode, even though my environment.rb settings have
not
changed.
Hello Zed. I’m under Windows and when I try installing the mongrel
gem, and I’m also requested to install the daemons dependence. At this
point it seems the system tries to build daemons locally (compiling)
but since I don’t have a compiler properly installed it doesn’t work.
Is there a binary distribution available for daemons on Windows?
Thanks.
Don’t know if this is related to mongrel at all, but for some weird
reason when I run my rails app under mongrel, it thinks it’s in
production mode instead of development mode, even though my
environment.rb settings have not changed.
That’s because mongrel_rails defaults to production mode, which can be
changed using the -e command line option.
A less surprising default would be to use
ENV['RAILS_ENV'] || "development"
and let that be overridden w/ -e on the command line.
Sweet! This is coming along nicely. A few comments…
Why restrict mongrel_rails to only allow “development” and
“production” as environments? Some folks (like me ;-)) have adding
additional environments, including “qa” and “sandbox”.
Ah, didn’t know people did that. Alrighty, I’ll remove that check.
In a similar vein, what do you think about defaulting to
ENV[‘RAILS_ENV’] if that’s set?
Good point. Next release.
Are you planning on exposing the num_processors argument to
mongrel_rails, to allow a command-line option for setting it either
higher or lower?
Hey, you read code! Bastard! Yeah, I can add that.
Lastly, any plans to allow for a graceful restart?
Yes, that’s coming once I get a few more needed things written.
Yeah, I’m planning to figure out how to automate building win32 builds
for
people to download. I didn’t know that daemons requires a compiler, but
mongrel does for sure.
If you’re in a hurry I believe you can grab the MS visual studio for
free
these days.
Not good at design at all, just good at stealing designs people
graciously
give out for others to use.
Of course I think design is the bane of all information existence. I
just
got done telling someone, “You could wrap a turd in a good design and
people
would eat it like a snickers bar.”
Thanks for the compliment though! I do appreciate it.
Not good at design at all, just good at stealing designs people graciously
give out for others to use.
Of course I think design is the bane of all information existence. I just
got done telling someone, “You could wrap a turd in a good design and people
would eat it like a snickers bar.”
and let that be overridden w/ -e on the command line.
As for surprising defaults, I actually went with production since the
idea
is that most people will run WEBrick in dev and Mongrel in production,
but I
guess I could just make it behave like WEBrick if people think that’s
better.
As for surprising defaults, I actually went with production since the idea
is that most people will run WEBrick in dev and Mongrel in production, but I
guess I could just make it behave like WEBrick if people think that’s
better.
Ah, didn’t think about that – I like to run the exact same setup in
both dev and production to avoid any unexpected differences. Defaulting
to dev does some “safer” though (for some definition of “safer”).
Is Mongrel appropriate for apps running on - heavily - shared accounts?
Would there be any benefit, over lighttpd or Apache?
Well, Mongrel is still being worked on so putting it into production
probably isn’t the smartest move right now.
In the future I can see people going one of several ways with shared
accounts:
lighttpd or apache acting as a simple mod_proxy front end talking to
a
Mongrel backend for anything Rails.
A smart load balancer like BalanceNG or a Cisco which routes
requests
for you based on content. Again, static content served with apache or
lighttpd and dynamic with Mongrel.
Simply serve the whole mess with Mongrel directly. This might work
great for people hosting lots of tiny little applications.
The main thing with large shared hosting systems is port management.
Usually people rely on something like VPS as well.
edu> uname -a;ruby -v
Darwin copito.local 8.4.0 Darwin Kernel Version 8.4.0: Tue Jan 3
18:22:10 PST 2006; root:xnu-792.6.56.obj~1/RELEASE_PPC Power Macintosh
powerpc
ruby 1.8.4 (2005-12-24) [powerpc-darwin8.3.0]
Am I doing something wrong? Thanks.
Eduardo Fernández Corrales
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.