Re:Multicore OCaml: April 2021
by toolslive on Thursday May 13, 2021 @10:27AM
(#27142427)
What I'm still missing is a strategy to move existing ocaml programs that use (let's say) Lwt for concurrency and a bit of C for things that were trivial to parallelize to move to multicore ocaml AND benefit from it.
[ Parent
| on HN ]
(One of the Multicore OCaml devs here)
We have prototyped offloading CPU intensive computations in Lwt programs using Multicore OCaml [1]. We're currently working with Lwt maintainers to upstream it.
Re:Multicore OCaml: April 2021
by anuragsoni on Thursday May 13, 2021 @12:02PM
(#27143683)
> We have prototyped offloading CPU intensive computations in Lwt programs using Multicore OCaml
This is very interesting! I'm wondering if you are aware of any discussions with the async maintainers about what their plans are with the multicore runtime?
thx!
Another question. Suppose you're starting from scratch, is it worth going the effects based async io route ?
https://github.com/kayceesrk/ocaml-aeio
seems very interesting...
Yes, exactly. The reason why monadic concurrency libraries such as Lwt and Async is that the OCaml language does not support concurrency natively. If it did, we would have built something similar to the `ocaml-aeio` library.
Btw there is a modern instantiation of `ocaml-aeio` called `eieio` [1] which supports Linux's io-uring. Eventually, this will be extended to support all the modern I/O stacks on different platforms, and also support performing I/O on multiple cores.