Am Dienstag, den 26.03.2013, 15:29 +0100 schrieb Philippe Veber:
> Dear all,Well, I don't know whether this is an option for Ocsigen users, but
>
> 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?
Ocamlnet includes fairly good multiprocessing support. You can run
servers that dynamically start subprocesses on demand. Look for Netplex:
http://projects.camlcity.org/projects/dl/ocamlnet-3.6.3/doc/html-main/Intro.html#netplex
I've no good recipe, though, how to plug in service processors that base
on lwt (well, there is an adaptor in Ocamlnet for lwt - Uw_lwt - but I
wouldn't know what to do on the Ocsigen side, but maybe worth
exploring).
Ocamlnet also includes other mechanisms that are generally interesting
for compute stuff, namely Netmulticore for exploiting several cores on
the same machine with fast shared memory architecture, and RPC for
distributing computations in a network. Both are extensions of Netplex,
so it is easy to integrate into a single program.
Gerd
--
------------------------------------------------------------
Gerd Stolpmann, Darmstadt, Germany gerd@gerd-stolpmann.de
Creator of GODI and camlcity.org.
Contact details: http://www.camlcity.org/contact.html
Company homepage: http://www.gerd-stolpmann.de
*** Searching for new projects! Need consulting for system
*** programming in Ocaml? Gerd Stolpmann can help you.
------------------------------------------------------------