Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: Gerd Stolpmann <info@gerd-stolpmann.de>
To: Florian Hars <hars@bik-gmbh.de>
Cc: Jon Harrop <jon@ffconsultancy.com>, caml-list@inria.fr
Subject: Re: [Caml-list] Faking concurrency using Unix forks and pipes
Date: Wed, 30 May 2007 13:31:41 +0200	[thread overview]
Message-ID: <1180524702.1470.40.camel@localhost.localdomain> (raw)
In-Reply-To: <465D2436.5060703@bik-gmbh.de>

Am Mittwoch, den 30.05.2007, 09:13 +0200 schrieb Florian Hars:
> Jon Harrop schrieb:
> > Has anyone implemented a parallel map function in OCaml using Unix forks, 
> > pipes and maybe marshalling?
> 
> I've been toying with something like
> 
> module type MR =
>   functor (D1: DICT_TYPE) ->
>     functor (D2: DICT_TYPE) ->
> sig
>   val mapreduce :
>     (D1.key -> D1.value -> (D2.key * 'a) list) ->
>     ( D2.key -> 'a list -> D2.value option) ->
>     D1.t ->
>     D2.t
> end

Interesting example... We are going to implement a distributed mapreduce
on a cluster using ocamlnet (and its components rpc and netplex).

Netplex is a framework to listen to a number of sockets and to
start/manage processes dealing with the TCP connections (using a
generalized pre-fork model). We are already using it for our distributed
web crawler.

Gerd

> and have one implementation that forks a set of worker processes
> and then marshalls data of types
> type 'a command = Quit | Execute of 'a
> type ('a, 'b) response = Result of 'a | Error of 'b
> through a pipe.
> 
> Not very robust right now, but it seems to work if none of the
> workers dies prematurely...
> 
> Yours Florian.
> 
> _______________________________________________
> Caml-list mailing list. Subscription management:
> http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
> Archives: http://caml.inria.fr
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> Bug reports: http://caml.inria.fr/bin/caml-bugs
> 
-- 
------------------------------------------------------------
Gerd Stolpmann * Viktoriastr. 45 * 64293 Darmstadt * Germany 
gerd@gerd-stolpmann.de          http://www.gerd-stolpmann.de
Phone: +49-6151-153855                  Fax: +49-6151-997714
------------------------------------------------------------


  reply	other threads:[~2007-05-30 11:31 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-30  3:42 Jon Harrop
2007-05-30  4:10 ` [Caml-list] " Erik de Castro Lopo
2007-05-30  4:12 ` Jonathan Bryant
2007-05-30  9:45   ` Benedikt Grundmann
2007-05-30  7:02 ` Oliver Bandel
2007-05-30  7:31   ` Jon Harrop
2007-05-30 16:22     ` David Teller
2007-05-30  7:34   ` Loup Vaillant
2007-05-30  8:02     ` Jon Harrop
2007-05-30  8:13       ` Erik de Castro Lopo
2007-05-30  8:30         ` Loup Vaillant
2007-05-30  8:32           ` Loup Vaillant
2007-05-30  8:50             ` Jon Harrop
2007-05-30 12:13               ` Richard Jones
2007-05-30  8:54         ` Jon Harrop
2007-05-30  9:56           ` Mattias Engdegård
2007-05-30 12:15           ` Richard Jones
2007-05-30 17:46           ` Pablo Polvorin
2007-05-30 19:14           ` Erik de Castro Lopo
2007-05-30  7:13 ` Florian Hars
2007-05-30 11:31   ` Gerd Stolpmann [this message]
2007-05-30  8:40 ` Luc Maranget
2007-05-30  9:10   ` Erik de Castro Lopo
2007-05-30  9:25     ` Erik de Castro Lopo
2007-05-30  9:25       ` Jon Harrop
2007-05-30  9:41         ` Joel Reymont
2007-05-30 16:05         ` David Teller
2007-05-30  9:21   ` Joel Reymont
2007-05-30 16:10   ` David Teller
2007-05-30  9:52 ` Thomas Fischbacher
2007-05-30 12:03 ` Richard Jones
2007-05-30 16:03 ` Granicz Adam
2007-05-30 22:09   ` Jon Harrop
     [not found] <5F7D2956-2B0A-465A-8AC2-06D7EDC457F9@valdosta.edu>
2007-05-30 19:44 ` Fwd: " Jonathan Bryant
2007-05-30 19:57   ` Erik de Castro Lopo
2007-05-30 20:05     ` Jonathan Bryant
2007-05-30 22:08       ` Jon Harrop

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=1180524702.1470.40.camel@localhost.localdomain \
    --to=info@gerd-stolpmann.de \
    --cc=caml-list@inria.fr \
    --cc=hars@bik-gmbh.de \
    --cc=jon@ffconsultancy.com \
    /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