HTML5 WebSockets

Eric Wong normalperson at yhbt.net
Thu Dec 10 18:32:36 EST 2009


Eric Wong <normalperson at yhbt.net> wrote:
> Hi all,
> 
> The Revactor/ThreadSpawn/ThreadPool concurrency models *should* already
> support HTML5 WebSockets out-of-the-box right now with the respective
> TeeInput (streaming "rack.input" support).  You'll probably want to make
> sure the Rack::Chunked middleware is loaded for anything you run, but
> other than that everything should work provided you have a working
> client-side implementation...
> 
> I'm terrible at doing anything interactive on web browsers[1] and I
> don't think any current browsers out there support WebSockets natively,
> but there are ways to mimic it with JS libraries it seems.
> 
> If anybody can code anything up and put up a demo, that would be great.

The new version of Chrome supports Web Sockets, so yes, I'd like to
confirm that our streaming "rack.input" support works with Web Sockets.

As always, I'm trying to avoid GUI development myself, but may end
up having to like I did with upr (http://upr.bogomips.org/) and
gaining more gray hairs in the process :<

> I'll get around to adding a Fiber-based concurrency model which should
> work with TeeInput, too.

FiberSpawn and FiberPool have been added since and both seem to work
great.

Unconfirmed, but the IO.select()-based scheduler for these should also
give these a slight advantage when balancing between multiple worker
processes.

-- 
Eric Wong


More information about the rainbows-talk mailing list