On Wed, Jan 14, 2015 at 10:46 AM, Darryl L. Pierce <[email protected]>
wrote:

> On Wed, Jan 14, 2015 at 08:28:50AM -0500, Rafael Schloming wrote:
> <snip>
> > import sys
> >
> > reactor = Reactor(Program())
> > reactor.acceptor("0.0.0.0", "5672")
> > reactor.connection(Client("localhost:5672", sys.argv[1:]))
> > reactor.run()
>
> I like the simplicity of how a simple app can be setup. The above can be
> used inside of an EventMachine block in Ruby. Would we be able to pass a
> file descriptor to the underlying C code? I'm wondering if we could
> provide an AMQPServer similar to others provided [1].
>

The intention is to provide a couple of options here. One is the ability to
supply an external file descriptor to the C loop as you describe. The other
option which I'd like to provide is the ability to use the reactor purely
for the cross language dispatch, and simply write all of the I/O code in
the embedding language.

Neither of these things will work out of the box right now, however the
intention is very much to provdie them, e.g. internally the reactor
provides I/O via what is essentially just a special handler that reacts to
connection_local_open events and transports and sets up/pumps sockets
accordingly. Right now this is hard coded to a C handler, but with some
appropriate accessors we should be able to supply a pure python (or pure
ruby) handler also.

--Rafael

Reply via email to