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

Re: [MirageOS-devel] Lwt NOT deprecated



On 2 Jul 2014, at 16:21, Richard Mortier <Richard.Mortier@xxxxxxxxxxxxxxxx> 
wrote:

> 
> On 2 Jul 2014, at 15:21, Vincent Balat <vincent.balat@xxxxxxxxxxxxxxxxxxxxx> 
> wrote:
> 
>> I'm sending this quick e-mail to deny the rumours that have been heard on 
>> this 
>> list:
> 
> given how pervasively Lwt is currently used in mirage, i think there'd have 
> been far more general panic^H^H^H^H^Hinterest if we'd thought Lwt was 
> suddenly going away :)

Yes indeed.  We're going to be using Lwt more in the future with the incoming 
JavaScript/IOCaml port as well.

> 
> i think the "rumour" (one email, pretty quickly quashed by several responses 
> :) was triggered by simple misinterpretation of a discussion connected with a 
> decision taken by the Frenetic team to discontinue their support for Lwt in 
> favour of Async. (i am unaware of their reasons-- if anyone from Frenetic is 
> on the list, it would be great if they could comment!)

I'm not speaking on their behalf, but they do use Real World OCaml in Cornell 
in the CS course, so I imagine it's just easier in terms of a documentation 
base.  Async is a 'more complete' library if you don't mind being tied to Unix, 
and it does make stronger guarantees in terms of not context switching between 
binds (although I believe Lwt has also improved in this regard).  Lwt is a 
clear win on portability and especially JavaScript compilation.

> having said all that, given the current situation (Mirage mostly using Lwt 
> and Frenetic using Async), any further suggestions for/experiences of trying 
> to integrate between libraries using a mixture of Lwt and Async would be 
> welcome. 
> 
> eg., better to port to one or the other? is it relatively easy to abstract 
> across them both? thoughts on how big is the minimal subset of Mirage that 
> would need to be ported/abstracted to use Async?  pointers to any 
> documentation discussing the tradeoffs between Async and Lwt would also be 
> useful. i've come across the wg-parallel list which appeared to be briefly 
> active last year, as well as <https://github.com/janestreet/lwt-async> which 
> appears likely to be related to the discussion.
> 

The only embedding that works is Lwt in Async, whereas the Async on Lwt doesn't 
exist (which is what Mirage Xen needs).

It's possible to abstract between Lwt/Async for simple uses (where you're just 
doing a few binds), but is trickier when you want to use the full capabilities 
of one of the libraries (particularly Async).  There are also fundamental 
differences in some of the design choices (Async favours Pipe, Lwt favours 
Lwt_stream).

Overall, I'd start with the openflow protocol parsing and switch, as I 
mentioned in the other thread.

-anil
_______________________________________________
MirageOS-devel mailing list
MirageOS-devel@xxxxxxxxxxxxxxxxxxxx
http://lists.xenproject.org/cgi-bin/mailman/listinfo/mirageos-devel


 


Rackspace

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