[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

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

Zed A. Shaw

2/12/2006 8:40:00 PM

Hello All,

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.

* http://mongrel.ruby...

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/attribu...) 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:

$ 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¹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 for
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.

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.


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


= 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.ze...



11 Answers

Andreas S.

2/12/2006 10:07:00 PM

0

Zed Shaw wrote:

> 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)?

--
Posted via http://www.ruby-....


David Vallner

2/12/2006 10:47:00 PM

0

Dna Nedela 12 Február 2006 23:06 Andreas S. napísal:
> Zed Shaw wrote:
> > 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)?

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

David Vallner


Zed A. Shaw

2/13/2006 12:39:00 AM

0

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.ze...


On 2/12/06 5:06 PM, "Andreas S." <f@andreas-s.net> wrote:

> Zed Shaw wrote:
>
>> 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)?



Michael Schoen

2/13/2006 2:31:00 AM

0

Zed Shaw wrote:
> 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.



Francis Hwang

2/13/2006 3:24:00 AM

0

Zed Shaw wrote:
> 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.
>
> * http://mongrel.ruby...

Such nice design, Zed. You're so Web 2.0 I can barely stand it.

Anyway, it's http://mongrel.ruby... , though I'm sure everybody
can figure that out.

f.

David Vallner

2/13/2006 3:24:00 AM

0

Dna Pondelok 13 Február 2006 03:31 Michael Schoen napísal:
> Zed Shaw wrote:
> > 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.

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

David Vallner


Michael Schoen

2/13/2006 3:55:00 AM

0

> 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.



Dick Davies

2/13/2006 10:17:00 AM

0

On 13/02/06, Tom Cloyd <tomcloyd@bestmindhealth.com> wrote:
> 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.


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

--
Rasputin :: Jack of All Trades - Master of Nuns
http://number9.helloope...


David Vallner

2/13/2006 2:22:00 PM

0

Dna Pondelok 13 Február 2006 07:12 Tom Cloyd napísal:
> 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
headlines (d'oh, the content is in the content area of the page), the very
first paragraph explains in a single sentence what the site and Mongrel is
about. The next paragraph tells you how to use it on six lines of text, which
is far more concise than most technical sites I've ever seen. And the rest is
the usual, a mild sales pitch and (gasp) a direct link to the RDoc from the
first site without having you wade through three pages of documentation
indexes on a wiki.

So, after going through the laughably little text on the front page, you
indeed do know Mongrel is a web server, that it's written in Ruby, that is' a
simple and fast one, and how to install, start and stop it with a Rails
Application, and that you can't run it as a daemon on Windows and why. That's
what I see without touching the scroll wheel and maximizing the browser
window. Let's say I've seen worse. Especially considering you'll probably
visit this site from a programming blog or this mailing list, where you
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 under
the photos, since those are tasks one might actually revisit the site for, as
opposed to reading documentation, which is technically available locally
after installing the gem. Then again, directly linking to subpages of the
rubyforge project page is handier than just one link to it and leaving users
stumbled.

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

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

David Vallner


jgbailey

2/13/2006 6:51:00 PM

0

I submitted a couple of feature requests to RubyForge - I hope you
check them out!

Zed Shaw wrote:
> Hello All,
>
> 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.
>
> * http://mongrel.ruby...
>
> 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/attribu...) 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:
>
> $ 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¹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 for
> 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.
>
> 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.
>
>
> == 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 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.
>
>
> = 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.ze...