[Eventmachine-talk] Server-Push Client

20 views
Skip to first unread message

Steve Sloan

unread,
Aug 14, 2008, 12:52:33 PM8/14/08
to eventmac...@rubyforge.org
I'm working on a Ruby client to grab image frames from a network-connected camera (e.g. one of these:
http://www.axis.com/products/video/video_server/ ). I'm currently using Curb for the HTTP connection, with my own code to parse the
multipart/x-replace responses.

I'd like to switch to using EM (as inspired by AMQP), but looking at the HttpClient/Client2 APIs, there doesn't appear to be any
easy way to add server-push support. Both seem to assume that there's exactly only response per request, and that the whole
response must be stored, which are both deal-breakers for server-push.

Before I started hacking away, I thought it would be best to see if anyone else has already done any work on server-push in EM, or
if there were any suggestions on the easiest way to add it.

Thanks ...

-- Steve

_______________________________________________
Eventmachine-talk mailing list
Eventmac...@rubyforge.org
http://rubyforge.org/mailman/listinfo/eventmachine-talk

James Tucker

unread,
Aug 14, 2008, 1:06:52 PM8/14/08
to eventmac...@rubyforge.org

On 14 Aug 2008, at 17:52, Steve Sloan wrote:

> I'm working on a Ruby client to grab image frames from a network-
> connected camera (e.g. one of these: http://www.axis.com/products/video/video_server/
> ). I'm currently using Curb for the HTTP connection, with my own
> code to parse the multipart/x-replace responses.
>
> I'd like to switch to using EM (as inspired by AMQP), but looking at
> the HttpClient/Client2 APIs, there doesn't appear to be any easy way
> to add server-push support. Both seem to assume that there's
> exactly only response per request, and that the whole response must
> be stored, which are both deal-breakers for server-push.
>
> Before I started hacking away, I thought it would be best to see if
> anyone else has already done any work on server-push in EM, or if
> there were any suggestions on the easiest way to add it.

I built the pre-requisite capabilities to do the server side stuff in
Thin, an EventMachine based web server. I've not had a need for a
client yet, but that would be a very good idea to build.

http://github.com/raggi/thin/tree/async_for_rack/

Steve Sloan

unread,
Aug 20, 2008, 4:01:58 PM8/20/08
to eventmac...@rubyforge.org
I've added multipart support to HttpClient2. See
http://github.com/CodeMonkeySteve/eventmachine/ if interested. The test
coverage is a bit sparse, so I'm not sure if it's quite ready for prime
time yet.
Reply all
Reply to author
Forward
0 new messages