From: "Lauri Alanko" <la@iki.fi>
To: "Francois Berenger" <berenger@riken.jp>
Cc: "caml-list@inria.fr" <caml-list@inria.fr>
Subject: Re: [Caml-list] library/framework needed for distributed programming in OCaml
Date: Wed, 11 Jul 2012 13:21:42 +0300 [thread overview]
Message-ID: <20120711132142.42636h39ppnk3vsm.lealanko@webmail.helsinki.fi> (raw)
In-Reply-To: <4FFD1FC9.5040109@riken.jp>
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.
Cheers,
Lauri
next prev parent reply other threads:[~2012-07-11 10:21 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-11 6:40 Francois Berenger
2012-07-11 10:21 ` Lauri Alanko [this message]
2012-07-12 8:46 ` Francois Berenger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120711132142.42636h39ppnk3vsm.lealanko@webmail.helsinki.fi \
--to=la@iki.fi \
--cc=berenger@riken.jp \
--cc=caml-list@inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox