Forum: Ruby Mongrel HTTP Library 0.2.0 (Fast And RubyForgified)

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
8c43ed7f065406bf171c0f3eb32cf615?d=identicon&s=25 Zed Shaw (Guest)
on 2006-01-31 07:32
(Received via mailing list)
Hi Everyone,

I'm happy to announce the 0.2.0 release of Mongrel -- the fastest
HTTP 1.1 library Ruby has yet.

http://mongrel.rubyforge.org/ -- ruby docs lame page.
http://rubyforge.org/projects/mongrel/  -- project page.

Special thanks to Tom Copland for setting up my RubyForge goodness,
and to Why for kicking in time to get the Camping examples up to snuff.

This release should strike a good balance between being fast and
being stable on all platforms.

== Gems And Source

You can get this release of Mongrel via RubyGems in the usual way:

   gem install mongrel

Please let me know if this don't install.  You can also hit the
project page and download a full .tgz source file if you hate RubyGems.


== Status

This release mostly just focuses on the core of Mongrel.  I've done
just about everything I know to make it the fastest thing possible
short of sacrificing goats and small children (but there was this one
dude on IRC).  I'll leave it to others to compare for now but the
main purpose of this release is to do any final fine tunings and
really pound on it to make it stable.

The other major change is that the HttpResponse class is now fully
functioning and should be easy for people to use.  It does not
support the CGI library yet but I've got devious evil plans to set my
skills on the CGI library as well.


== Example

This example is from the examples/simpletest.rb file:

require 'mongrel'

  class SimpleHandler < Mongrel::HttpHandler
     def process(request, response)
       response.start(200) do |head,out|
         head["Content-Type"] = "text/plain"
         out.write("hello!\n")
       end
     end
  end

  h = Mongrel::HttpServer.new("0.0.0.0", "3000")
  h.register("/test", SimpleHandler.new)
  h.run.join

Doesn't really do much but demonstrates the main meat of the system.
Why has also written some Camping (http://rubyforge.org/projects/
camping) samples which should work with the svn version of Camping.


== Next Steps

I'd love for people to break the hell out of it and post me some bug
reports.  I've tried to do everything I can, but I'm going to get
ahold of some HTTP fuzzing stuff and see if I can't do any further
damage.

I'm also looking for smart people who might have opinions on Mongrel,
what it does, and specifically how you can see using it with your web
application framework.  Feel free to join the Mongrel mailing list at
http://rubyforge.org/mailman/listinfo/mongrel-users and start tossing
the ideas around.

Enjoy and let me know what you think.

Zed A. Shaw
http://www.zedshaw.com/
7a4e995e378ef66de0ceaea5e1381ee1?d=identicon&s=25 George Moschovitis (Guest)
on 2006-01-31 12:59
(Received via mailing list)
Hello Zed,

thanks for  your great work. Just wanted to let you know that there is
a mongrel adapter for Nitro
(submitted by a member of the community) in the repository version.
Will be released next week.

regards,
George.
8c43ed7f065406bf171c0f3eb32cf615?d=identicon&s=25 Zed Shaw (Guest)
on 2006-01-31 14:12
(Received via mailing list)
Oh, so very cool.  I'll hit you guys up on #nitro to get the details
and play with it.
Aee77dba395ece0a04c688b05b07cd63?d=identicon&s=25 Daniel Berger (Guest)
on 2006-02-01 23:49
(Received via mailing list)
Zed Shaw wrote:
> Hi Everyone,
>
> I'm happy to announce the 0.2.0 release of Mongrel -- the fastest
> HTTP 1.1 library Ruby has yet.
>
> http://mongrel.rubyforge.org/ -- ruby docs lame page.
> http://rubyforge.org/projects/mongrel/  -- project page.
>
> Special thanks to Tom Copland for setting up my RubyForge goodness,
> and to Why for kicking in time to get the Camping examples up to snuff.

Nitpick:

http11.c: In function `URIClassifier_init':
http11.c:286: warning: control reaches end of non-void function

I'm not sure what that function is supposed to do, actually. The rdoc
say it creates a new URIClassifier object, but the function just stores
an empty hash in @id_handler_map.

And, at the risk of sounding like an old fuddy duddy, please change the
"sucks ass" stuff to something a little less juvenile please.

Thanks,

Dan
9363c84442cc60a0a84fdbe3db87425f?d=identicon&s=25 Charles Comstock (Guest)
on 2006-02-01 23:55
(Received via mailing list)
I missed the first announcement for this.  Has it always been this fast
because of the use of C or are you slowly in the process of moving
things over?  I ask this as this really is a tailor made project to
make use of RubyInline, allowing selective performance improvements in
C conditionally dependent on whether or not a compiler is available.

Looks good though, keep up the good work.

Charlie
110a70d754732299d62611743553e05d?d=identicon&s=25 Brian McCallister (Guest)
on 2006-02-02 01:09
(Received via mailing list)
Hmm, nice feature would be able to stop a running server...

-Brian
8c43ed7f065406bf171c0f3eb32cf615?d=identicon&s=25 Zed Shaw (Guest)
on 2006-02-02 01:51
(Received via mailing list)
On Feb 1, 2006, at 5:22 PM, Brian McCallister wrote:

> Hmm, nice feature would be able to stop a running server...
>

Until I get a real server architecture up you'll have to rely on the
magic of CTRL-C technology.  It's mostly just a core library now with
some ambitious folks making their own servers.
Bf1e672f5e54581db4e6d45b7030d286?d=identicon&s=25 Steven Lumos (Guest)
on 2006-02-02 01:51
(Received via mailing list)
Zed Shaw <zedshaw@zedshaw.com> writes:

> Hi Everyone,
>
> I'm happy to announce the 0.2.0 release of Mongrel -- the fastest
> HTTP 1.1 library Ruby has yet.

Any immediate idea about the following?

% ruby simpletest.rb
/local/ruby-1.8.4/lib/ruby/site_ruby/1.8/mongrel.rb:28:in `initialize':
uninitialized constant Mongrel::URIClassifier::TrieNode (NameError)
        from /local/ruby-1.8.4/lib/ruby/site_ruby/1.8/mongrel.rb:61:in
`initialize'
        from simpletest.rb:13

This is Ruby 1.8.4 compiled 64-bit on Solaris/SPARC.  Installed the
0.2.0 gem and it built with just a single warning:

"ext/http11/http11_parser.rl", line 49: warning: statement not reached

Steve
8c43ed7f065406bf171c0f3eb32cf615?d=identicon&s=25 Zed Shaw (Guest)
on 2006-02-02 03:19
(Received via mailing list)
You probably have an older version lying around somewhere.  That
missing class is from the 0.1.1 release.  Try looking for all
mongrel.rb files and http11.so (.dll, .bundle) and remove them, then
reinstall.  Maybe a gem vs. source install conflict?

I'll look at that compile warning too.

Zed A. Shaw
Bf1e672f5e54581db4e6d45b7030d286?d=identicon&s=25 Steven Lumos (Guest)
on 2006-02-02 20:23
(Received via mailing list)
Zed Shaw <zedshaw@zedshaw.com> writes:

> You probably have an older version lying around somewhere.  That
> missing class is from the 0.1.1 release.  Try looking for all
> mongrel.rb files and http11.so (.dll, .bundle) and remove them, then
> reinstall.  Maybe a gem vs. source install conflict?

Of course that was it.  Thanks.

Steve
This topic is locked and can not be replied to.