From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by sympa.inria.fr (Postfix) with ESMTPS id 2DFE47ED34 for ; Thu, 12 Jul 2012 10:46:13 +0200 (CEST) Received-SPF: None (mail4-smtp-sop.national.inria.fr: no sender authenticity information available from domain of berenger@riken.jp) identity=pra; client-ip=134.160.33.162; receiver=mail4-smtp-sop.national.inria.fr; envelope-from="berenger@riken.jp"; x-sender="berenger@riken.jp"; x-conformance=sidf_compatible Received-SPF: Pass (mail4-smtp-sop.national.inria.fr: domain of berenger@riken.jp designates 134.160.33.162 as permitted sender) identity=mailfrom; client-ip=134.160.33.162; receiver=mail4-smtp-sop.national.inria.fr; envelope-from="berenger@riken.jp"; x-sender="berenger@riken.jp"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: Pass (mail4-smtp-sop.national.inria.fr: domain of postmaster@postman.riken.jp designates 134.160.33.162 as permitted sender) identity=helo; client-ip=134.160.33.162; receiver=mail4-smtp-sop.national.inria.fr; envelope-from="berenger@riken.jp"; x-sender="postmaster@postman.riken.jp"; x-conformance=sidf_compatible; x-record-type="v=spf1" X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Al8BAJaN/k+GoCGimWdsb2JhbABFhWiuNYN7AQEBAQEICwsbJ4IgAQEFIwQRQAEQCxgCAgUWCwICCQMCAQIBRQYNAQcBAReHcqpukwKBIIogGYRRgRIDiEmMcYVWjR6BUA X-IronPort-AV: E=Sophos;i="4.77,573,1336341600"; d="scan'208";a="150412006" Received: from postman2.riken.jp (HELO postman.riken.jp) ([134.160.33.162]) by mail4-smtp-sop.national.inria.fr with ESMTP; 12 Jul 2012 10:46:10 +0200 Received: from postman.riken.jp (postman2.riken.jp [127.0.0.1]) by postman.riken.jp (Postfix) with SMTP id 05AC312603BB; Thu, 12 Jul 2012 17:46:07 +0900 (JST) Received: from [172.27.98.103] (rikad98.riken.jp [134.160.214.98]) by postman.riken.jp (Postfix) with ESMTPA id C819F1270063; Thu, 12 Jul 2012 17:46:06 +0900 (JST) Message-ID: <4FFE8ECE.4050007@riken.jp> Date: Thu, 12 Jul 2012 17:46:06 +0900 From: Francois Berenger User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120615 Thunderbird/13.0.1 MIME-Version: 1.0 To: "caml-list@inria.fr" CC: batteries-discuss@lists.forge.ocamlcore.org, OCaml Beginners List References: <4FFD1FC9.5040109@riken.jp> <20120711132142.42636h39ppnk3vsm.lealanko@webmail.helsinki.fi> In-Reply-To: <20120711132142.42636h39ppnk3vsm.lealanko@webmail.helsinki.fi> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-PMX-Version: 5.6.0.2009776, Antispam-Engine: 2.7.2.376379, Antispam-Data: 2012.7.12.83615 Subject: Re: [Caml-list] library/framework needed for distributed programming in OCaml Hello, For the moment, the best answer I got privately in my mailbox is to combine Janestreet's bin_prot and async libraries or Martin Jambon's biniou with Lwt. I kind of like what I read on async and bin_prot. On 07/11/2012 07:21 PM, Lauri Alanko wrote: > Hi. > > I also had need of such a library when I started working on a > distributed programming project, but as I couldn't find anything that > fulfilled my requirements, I wrote my own. > > The library is Lwt-based, and provides pretty straightforward remotely > callable procedures: > > type ('a, 'r) handle > val ($) : ('a, 'r) handle -> 'a -> 'r Lwt.t > val publish : ('a -> 'r Lwt.t) -> ('a, 'r) handle > > The library is designed to work in a firewalled environment: firewalled > nodes can join the distributed network by connecting to any accessible > host of that network with an open listener. All messages between nodes > are routed through the network. > > type connection > val connect : > ?host:string -> ?port:int -> unit -> connection Lwt.t > val listen : > ?port:int -> unit -> unit Lwt.t > > Initial values are obtained with "roots". A root (usually a handle, or a > record or first-class module containing handles) is keyed to a string, > and once set by a node, it can be discovered by any node in the network: > > val get_root : string -> 'a Lwt.t > val set_root : string -> 'a -> unit Lwt.t > > This is the only unsafe part of the interface: the getter and setter > _must_ agree on the type of the root or all hell breaks loose. > > I haven't published the library yet, since I have wanted to feel free to > modify it as required by my application, but if you are interested, and > cannot find a more mature solution, I'd be happy to provide it for your > inspection. If you publish your code somewhere (github is really nice), I would be very happy to have a look at it. Thanks a lot, F.