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 mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by sympa.inria.fr (Postfix) with ESMTPS id C810A7ED34 for ; Wed, 11 Jul 2012 12:21:55 +0200 (CEST) Received-SPF: None (mail1-smtp-roc.national.inria.fr: no sender authenticity information available from domain of la@iki.fi) identity=pra; client-ip=128.214.173.75; receiver=mail1-smtp-roc.national.inria.fr; envelope-from="la@iki.fi"; x-sender="la@iki.fi"; x-conformance=sidf_compatible Received-SPF: Pass (mail1-smtp-roc.national.inria.fr: domain of la@iki.fi designates 128.214.173.75 as permitted sender) identity=mailfrom; client-ip=128.214.173.75; receiver=mail1-smtp-roc.national.inria.fr; envelope-from="la@iki.fi"; x-sender="la@iki.fi"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail1-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@smtp-rs1-vallila2.fe.helsinki.fi) identity=helo; client-ip=128.214.173.75; receiver=mail1-smtp-roc.national.inria.fr; envelope-from="la@iki.fi"; x-sender="postmaster@smtp-rs1-vallila2.fe.helsinki.fi"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AtMBANtS/U+A1q1LmWdsb2JhbABFhWexdyIBAQEBAQgLCwcUJ4IhAQUjBFIQCxoCJgICVwYuh3KqRJMTgSCOfIESA4hFjHSFRI0l X-IronPort-AV: E=Sophos;i="4.77,567,1336341600"; d="scan'208";a="166423088" Received: from smtp-rs1-vallila2.fe.helsinki.fi ([128.214.173.75]) by mail1-smtp-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-SHA; 11 Jul 2012 12:21:53 +0200 Received: from webmail.helsinki.fi (webmail2-vallila1.fe.helsinki.fi [128.214.173.137]) by smtp-rs1.it.helsinki.fi (8.14.4/8.14.4) with ESMTP id q6BALg3e003600; Wed, 11 Jul 2012 13:21:44 +0300 Received: from scan-proxy2.it.helsinki.fi (scan-proxy2.it.helsinki.fi [128.214.2.138]) by webmail.helsinki.fi (Horde Framework) with HTTP; Wed, 11 Jul 2012 13:21:42 +0300 Message-ID: <20120711132142.42636h39ppnk3vsm.lealanko@webmail.helsinki.fi> Date: Wed, 11 Jul 2012 13:21:42 +0300 From: "Lauri Alanko" To: "Francois Berenger" Cc: "caml-list@inria.fr" References: <4FFD1FC9.5040109@riken.jp> In-Reply-To: <4FFD1FC9.5040109@riken.jp> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; DelSp="Yes"; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: quoted-printable User-Agent: Internet Messaging Program (IMP) 4.2.2 Subject: Re: [Caml-list] library/framework needed for distributed programming in OCaml Hi. I also had need of such a library when I started working on a=20=20 distributed programming project, but as I couldn't find anything that=20=20 fulfilled my requirements, I wrote my own. The library is Lwt-based, and provides pretty straightforward remotely=20= =20 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:=20=20 firewalled nodes can join the distributed network by connecting to any=20= =20 accessible host of that network with an open listener. All messages=20=20 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=20= =20 a record or first-class module containing handles) is keyed to a=20=20 string, and once set by a node, it can be discovered by any node in=20=20 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=20=20 _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=20=20 to modify it as required by my application, but if you are interested,=20= =20 and cannot find a more mature solution, I'd be happy to provide it for=20= =20 your inspection. Cheers, Lauri