[ANN] Mongrel 0.3.1 -- New Site/Runs Right

Z

Zed Shaw

Hello All,

Yet another release of Mongrel proudly pushed out for everyone to review an=
d
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.

* http://mongrel.rubyforge.net/

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.


=3D=3D 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) wit=
h
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.


=3D=3D 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:

$ sudo gem install mongrel
$ cd myrailsapp
$ mongrel_rails start -d

Which runs Mongrel in the background. You can stop it with:

$ mongrel_rails stop

And you=B9re all set. You can pass the start and stop commands the -h option
to find out all the possible options.


=3D=3D=3D Win32 Folks

The only thing you people need to do right now is avoid the -d option for
start. Win32 doesn=B9t support POSIX fork so it won=B9t go into the background.
I=B9ll be adding support for making Mongrel a service in a few releases.

There might be other Process specific calls the blow up on win32. Let me
know since..ehem..I didn't really test this on win32. Sorry.


=3D=3D 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, bu=
t
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 dynamically
storing gzip and regular versions of all returned content 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.


=3D 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.


Zed A. Shaw
http://www.zedshaw.com/
 
A

Andreas S.

Zed said:
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

Does it handle multiple concurrent Rails requests (threads)?
 
D

David Vallner

D=C5=88a Nede=C4=BEa 12 Febru=C3=A1r 2006 23:06 Andreas S. nap=C3=ADsal:
Does it handle multiple concurrent Rails requests (threads)?

The documentation seems to indicate that Mongrel is a threading server with=
20=20
worker thread. So I'd bet on "yes".

David Vallner
 
Z

Zed Shaw

Yes, it handles concurrent requests *except* for right when it runs the
actual Rails dispatcher. Rails isn't thread safe and so there needs to be a
big sync lock around the whole thing to keep Rails from peeing in it's pants
like a schoolgirl.

Otherwise there are a fixed number of worker threads that simply wait on a
queue of requests to process and they work with those in parallel. Right
after Dispatcher is done the lock is released and the required IO is sent
back via these worker threads.

It can handle a reasonably good load with this, but probably still needs
some tuning.

Zed A. Shaw
http://www.zedshaw.com/
 
D

David Vallner

D=C5=88a Pondelok 13 Febru=C3=A1r 2006 01:38 Zed Shaw nap=C3=ADsal:
Yes, it handles concurrent requests *except* for right when it runs the
actual Rails dispatcher. Rails isn't thread safe and so there needs to be
a big sync lock around the whole thing to keep Rails from peeing in it's
pants like a schoolgirl.

I might be easy to amuse, but I'm getting hilarious mildly (well, not reall=
y=20
mildly) pornographical mental images of ruby-talk members involving=20
schoolgirl costumes and urination.

Which probably noone wanted to know. Weep.
Otherwise there are a fixed number of worker threads that simply wait on a
queue of requests to process and they work with those in parallel. Right
after Dispatcher is done the lock is released and the required IO is sent
back via these worker threads.

Hmm. Is fastCGI / SCGI support on the roadmap for these cases?

David Vallner
 
M

Michael Schoen

Zed said:
Yes, it handles concurrent requests *except* for right when it runs the
actual Rails dispatcher. Rails isn't thread safe and so there needs to be a
big sync lock around the whole thing to keep Rails from peeing in it's pants
like a schoolgirl.

Ah, that incontinence problem again.

So does that imply that one might actually want to run several instances
of Mongrel behind a load-balancing lighttpd proxy? Since most of the
time (for my app at least) is going to be spent within Rails,
effectively Mongrel's single-threaded.
 
D

David Vallner

D=C5=88a Pondelok 13 Febru=C3=A1r 2006 03:31 Michael Schoen nap=C3=ADsal:
Ah, that incontinence problem again.

So does that imply that one might actually want to run several instances
of Mongrel behind a load-balancing lighttpd proxy? Since most of the
time (for my app at least) is going to be spent within Rails,
effectively Mongrel's single-threaded.

You could possibly directly wire lighttpd to Rails then, what with the New!=
=20
Shiny! SCGI runner around IIRC.

David Vallner
 
M

Michael Schoen

You could possibly directly wire lighttpd to Rails then, what with the New!
Shiny! SCGI runner around IIRC.

That's how we've been running for the past few months (thanks Zed!), and
it works well. Mongrel's a step forward though, cause it makes it easier
to verify that a specific process is working properly since you can hit
it directly with a browser, something you can't do with an scgi process.
 
D

Dick Davies

Yeah, well, too bad I'm given absolutely no reason to click past the fron= t
page. Don't you just love mystery meat? Not really.


Did you miss the 'Mongrel is a fast HTTP library and server for Ruby' bit?
 
D

David Vallner

D=C5=88a Pondelok 13 Febru=C3=A1r 2006 07:12 Tom Cloyd nap=C3=ADsal:
Yeah, well, too bad I'm given absolutely no reason to click past the front
page. Don't you just love mystery meat? Not really.

I don't understand why, if users are wanted, the hook isn't in the least
baited. Am I supposed to go read the source, to see IF this is something I
might be interested in?

Worse yes, this is hardly the first time I've seen this sort of
presentation. I don't get it.

t.

I don't get your point about "mystery meat". If you get over the dog photo =
and=20
headlines (d'oh, the content is in the content area of the page), the very=
=20
first paragraph explains in a single sentence what the site and Mongrel is=
=20
about. The next paragraph tells you how to use it on six lines of text, whi=
ch=20
is far more concise than most technical sites I've ever seen. And the rest =
is=20
the usual, a mild sales pitch and (gasp) a direct link to the RDoc from the=
=20
first site without having you wade through three pages of documentation=20
indexes on a wiki. =20

So, after going through the laughably little text on the front page, you=20
indeed do know Mongrel is a web server, that it's written in Ruby, that is'=
a=20
simple and fast one, and how to install, start and stop it with a Rails=20
Application, and that you can't run it as a daemon on Windows and why. That=
's=20
what I see without touching the scroll wheel and maximizing the browser=20
window. Let's say I've seen worse. Especially considering you'll probably=20
visit this site from a programming blog or this mailing list, where you=20
already know at least some context and what you're looking for.

If anything, I'd complain about the left sidebar with the very tiny font un=
der=20
the photos, since those are tasks one might actually revisit the site for, =
as=20
opposed to reading documentation, which is technically available locally=20
after installing the gem. Then again, directly linking to subpages of the=20
rubyforge project page is handier than just one link to it and leaving user=
s=20
stumbled.

Contrast to perl.org, where all you get is a cornucopia of links, with the=
=20
first ones as amazingly relevant as "history" and "success stories".=20
Python.org, the first text in the content pane of the page, where everyone=
=20
looks first, the first thing is what software the website is hosted on, the=
n=20
some marketese "success story" quote (seriously, people, no one gives a dam=
n=20
about success stories), then announcements, then another pointless "welcome=
"=20
sentence. and in the same browser window described above, that's pretty muc=
h=20
it. Etc.

<flame>
Seriously, If you have to quibble about website usability, get some REAL=20
arguments, instead of topical rants.
</flame>

David Vallner
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top