Re: [dev] about handling the event loop of wmii

From: Suraj Kurapati <sunaku_AT_gmail.com>
Date: Mon, 10 May 2010 12:36:12 -0700

On Wed, May 5, 2010 at 8:14 AM, Emmanuel Oga <emmanueloga_AT_gmail.com> wrote:
> I'm doing some experiments on scripting wmii with the help of eventmachine.
> I mounted the wmii fs [...] Then, I came up with this:
> http://gist.github.com/390396

Why not talk directly to wmii via 9P instead of going through a
mount (which will invalidate any benefits you might gain from
eventmachine)?

> In a way EM feels like a natural way of handling an event loop.

Agreed. I would suggest grabbing Rumai's message library[1] and
building your own transport layer[2] using EventMachine on top.

However, note that Rumai already uses a single-threaded re-entrant
transport strategy following the XCB cookie approach[3], so I don't
know how much more benefit EventMachine will provide.

[1] http://github.com/sunaku/rumai/blob/master/lib/rumai/ixp/message.rb
[2] http://github.com/sunaku/rumai/blob/master/lib/rumai/ixp/transport.rb#L116
[3] http://www.x.org/releases/X11R7.5/doc/libxcb/tutorial/#requestsreplies

> this voice on the back of my mind that keeps telling my this might be
> overkill ...

EM <=> mounted 9P <=> wmii (overkill)
EM <=> wmii (maybe not)
Received on Mon May 10 2010 - 19:36:12 UTC

This archive was generated by hypermail 2.2.0 : Mon May 10 2010 - 19:48:02 UTC