[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 21/28] libxl: ocaml: add wrappers for poll



On Tue, 2013-04-23 at 14:37 +0100, Rob Hoes wrote:
> > Other than Dave's comment it looks good to me.
> > 
> > But how does the event model work in your callers today? The intention
> > with the libxl event interface is that by implementing the right hooks to
> > register/deregister fds you can just continue to use your existing event 
> > loop
> > (presuming it can take events on fds).
> 
> I have been experimenting with two different ways of doing this.
> 
> Xenopsd does not yet have an fd polling loop that we can easily use
> for libxl events. For this reason I just wrapped the poll function
> myself and ran it separately. The other option is to use a library
> such as Lwt (http://ocsigen.org/lwt/), which does have an event loop
> we can easily integrate with, and I got the libxl fd registration
> stuff working with this in a test program.
> 
> The problem with the latter approach is that it requires quite a
> rather big rewrite of xenopsd in order to use Lwt (or a something
> similar), and we did not have time for that yet (we probably will at
> some point).

Ah, so the use of poll is really just a short term pragmatic one until
you get around to implementing Lwt support? That sounds reasonable. I
seem to recall hearing that Lwt was on the roadmap for many of the
xen-api ocaml bits (e.g. oxenstored) too.

I think I'd be happier if this poll interface was part of xenopsd itself
rather than part of the libxl ocaml bindings, where it runs the risk of
becoming a stable & supported interface of the Xen project.

Or if you cannot include it in xenopsd perhaps it fits better in some
other dependency? I thought ocaml had a posix functionality library?
(unix or stdext or something).

Failing all that I suppose we could live with tools/ocaml/libs/poll in
the Xen tree.

(aside: I'd really love it if tools/ocaml/libs/mmap could find a non-Xen
home too ;-))

Ian.


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.