Web development howto?

Jaime Barciela jbarciela at gmail.com
Mon Apr 25 11:42:59 PDT 2011


With the disclaimer that I haven't use it myself, only read *some* of
the docs, here is my (surely terrible) take at explaining the beast.

Mongrel2 is a neat idea based on 2 other projects:

 - 0mq ( http://www.zeromq.org/ ) which is an async communication
library that feels like sockets but behaves like a message queue. By
iMatix.
 - the original Mongrel http parser (
http://en.wikipedia.org/wiki/Mongrel_(web_server) ). Also by Zed Shaw.

The idea is that you have "handlers" that work on requests in an async
way. They are processes outside the web server and you can have as
many as you need anywhere in the network and can create and destroy
them as needed without disturbing the web server. This is similar to
FastCGI except you also get non-blocking I/O and a Publish/Subscribe
model for your application.

The really neat part of this is that if you look at it from the server
side looking out towards the browsers Mongrel2 essentially allows you
to include web browsers in a 0mq topology. A really nice trick.

0mq is a c library and there is a D binding for it:
https://github.com/itiu/zeromq-connector

But I haven't found a D handler for Mongrel2.


About ripping a FastCGI wrapper out of Serenity: Yes, I mean that is
actually general enough that you can make it a separate project and
use it yourself in Serenity. That would be great, not only for me but
for many newcomers like me as well.


Jaime

On Mon, Apr 25, 2011 at 1:42 PM, Robert Clipsham
<robert at octarineparrot.com> wrote:
> On 25/04/2011 16:56, Jaime Barciela wrote:
>>
>> Robert,
>>
>> I think your effort is much needed. Thank you -- from a fellow Brown Coat
>> :)
>
> I just hope Captain Shiny Pants doesn't find out, I don't fancy my chances
> against him in a fight if he realizes I stole his ship's name ;P
>
>> I was toying with the idea of writing a handler for Mongrel2 in D. But
>> I'm a D n00b, it may take me a while. If anybody wants to pick that
>> idea up and make it a reality that would be great.
>
> I'm not entirely sure what it is after 10 minutes of clicking my way around
> its site - looks interesting, whatever it is (I hate sites like that!)
>
>> In fact it will be a big reason for people to get into D in general.
>>
>> I'll take a look at (Fast)CGI and arsdnet.net.
>
> If you want a quick and easy FastCGI wrapper, I can rip it out of Serenity
> for you without too much effort, save you reinventing the wheel. Not sure if
> the arsdnet code has a FastCGI wrapper, may just be CGI.
>
>> Thanks
>> Jaime
>
> --
> Robert
> http://octarineparrot.com/
>


More information about the Digitalmars-d-learn mailing list