[Eventmachine-talk] DistribuStream released

Francis Cianfrocca
Sat, 27 Oct 2007 05:01:53 -0000

On 10/27/07, Tony Arcieri <tony at clickcaster.com>
wrote:
>
> On 10/26/07, Francis Cianfrocca <garbagecat10 at gmail.com> wrote:
> >
> > HttpClient is functional and useful, but a bit of a throwaway, not
> > designed very carefully. I''ll try to hack the
chunked-transfer support into
> > it, but it could use a rethink. Anyone up for it?
> >
>
> #send_request is the biggest problem (and the method I overwrite).  The
> main thing that''s needed, IMO, are objects which represent
requests and
> responses.  #send_request is pretty imperative and difficult to extend, so
> in DistribuStream I ended up overriding the entire thing, when really all I
> wanted to do was patch in a few additional types of headers.
>

Yup, that''s a good analysis of the problem. Would you consider
contributing
your rewrite of #send_request?

Look at eventmachine_httpserver: this is actually a well-designed
and
> > powerful piece of code.
> >
>
> I''ll certainly take a look at it, but since all the existing code
uses
> Mongrel the simplest way to go would be Kirk''s evented_mongrel.
However if
> I can''t find a way to consume a PUT request''s body
seperately of the header
> with evented_mongrel I''ll probably end up rewriting the HTTP
server
> components with eventmachine_httpserver.  It looks like it could use
objects
> which represent requests and responses as well, though.


em_httpserver has distinct request and response objects. They''re not
too
much like the ones on  Ruby''s CGI unfortunately, because they were
designed
with eventing in mind.
-------------- next part --------------
An HTML attachment was scrubbed...