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 mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id 789437EE7A for ; Wed, 27 Mar 2013 02:11:23 +0100 (CET) Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of berenger@riken.jp) identity=pra; client-ip=134.160.33.161; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="berenger@riken.jp"; x-sender="berenger@riken.jp"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of berenger@riken.jp designates 134.160.33.161 as permitted sender) identity=mailfrom; client-ip=134.160.33.161; receiver=mail2-smtp-roc.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 (mail2-smtp-roc.national.inria.fr: domain of postmaster@postman.riken.jp designates 134.160.33.161 as permitted sender) identity=helo; client-ip=134.160.33.161; receiver=mail2-smtp-roc.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: AioCAFxGUlGGoCGhnGdsb2JhbABDgzoBwGaBHg4BAQEBAQYNCQkUXoIfAQEEATg0CgIRCxIGCRYPCQMCAQIBNw4TCAEBiAoGDL9DBI8ZFoMqA4h2iiuDRoV/jiI X-IPAS-Result: AioCAFxGUlGGoCGhnGdsb2JhbABDgzoBwGaBHg4BAQEBAQYNCQkUXoIfAQEEATg0CgIRCxIGCRYPCQMCAQIBNw4TCAEBiAoGDL9DBI8ZFoMqA4h2iiuDRoV/jiI X-IronPort-AV: E=Sophos;i="4.84,915,1355094000"; d="scan'208";a="9463296" Received: from postman1.riken.jp (HELO postman.riken.jp) ([134.160.33.161]) by mail2-smtp-roc.national.inria.fr with ESMTP; 27 Mar 2013 02:11:21 +0100 Received: from postman.riken.jp (postman1.riken.jp [127.0.0.1]) by postman.riken.jp (Postfix) with SMTP id 009A932C0379 for ; Wed, 27 Mar 2013 10:11:18 +0900 (JST) Received: from [172.27.98.103] (rikad98.riken.jp [134.160.214.98]) by postman.riken.jp (Postfix) with ESMTPA id 63CF632A0047 for ; Wed, 27 Mar 2013 10:11:18 +0900 (JST) Message-ID: <51524736.3080302@riken.jp> Date: Wed, 27 Mar 2013 10:11:18 +0900 From: Francois Berenger User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130308 Thunderbird/17.0.4 MIME-Version: 1.0 To: caml-list@inria.fr References: <51520CAE.6020009@ens-lyon.org> In-Reply-To: <51520CAE.6020009@ens-lyon.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-PMX-Version: 5.6.0.2009776, Antispam-Engine: 2.7.2.376379, Antispam-Data: 2013.3.27.10331 Subject: Re: [Caml-list] Master-slave architecture behind an ocsigen server. On 03/27/2013 06:01 AM, Martin Jambon wrote: > On 03/26/2013 07:29 AM, Philippe Veber wrote: >> Dear all, >> >> I'm developping an ocsigen website doing some scientific calculations. >> Up to now, the calculations were done in the same process that runs the >> server. In order to gain in scalability (and maybe stability too), I >> would like to run those calculations in a separate (pool of) >> process(es). As this is a pretty typical setup, I guess quite a few >> people have already done that. So I'd like to hear some suggestions on >> what library to use in this particular context. It seems to me that the >> release library [1] should do the job and is lwt-friendly, but there are >> maybe other good options? > > I wrote and used a library called Nproc about a year ago. Not in OPAM. :( > It lets you > create (Nproc.create) a pool of N processes, to which you can submit > (Nproc.submit) computations of any type quasi-magically - just make sure > any big environment required for the computation is not copied with each > closure that you send to the workers. The submodule Nproc.Full provides > a more advanced interface that lets each worker process have its own > local environment. > > https://github.com/MyLifeLabs/nproc > > I haven't used Nproc in a while but it was working fine and should still > work. > > > Martin > >