Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>The example of parallelized server that you cite is one of those embarassingly parallel problem that are well solved with a simple multiprocessing model, using <code>fork</code>. This has been doable in OCaml for decades, and yes, you will an almost linear speedup using all the cores of your machine if you need.</p> <p>To do that using the simple primitives of the standard library, see <a href="http://ocamlunix.forge.ocamlcore.org/processes.html" rel="noreferrer">this Chapter</a> of the online book "Unix system programming in OCaml" (first released in 2003), and/or <a href="http://caml.inria.fr/pub/docs/oreilly-book/html/book-ora187.html" rel="noreferrer">this chapter</a> of the online book "Developing Applications with OCaml" (first released in 2000).</p> <p>You may also want to use higher-level libraries such as Gerd Stolpmann's <a href="http://projects.camlcity.org/projects/ocamlnet.html" rel="noreferrer">OCamlnet</a> library mentioned by rafix, which provides a lot of stuff from direct helper for the usual client/server design, to lower-level multiprocess communication libraries; see <a href="http://projects.camlcity.org/projects/dl/ocamlnet-3.6.3/doc/html-main/index.html" rel="noreferrer">the documentation</a>.</p> <p>The library <a href="https://github.com/rdicosmo/parmap" rel="noreferrer">Parmap</a> is also interesting, but maybe for slightly different use case (it's more that you have a large array of data available all at the same time, that you want to process with the same function in parallel): a drop-in remplacement of <code>Array.map</code> or <code>List.map</code> (or <code>fold</code>) that parallelizes computations.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload