3 ms·
Good questions! 1) As I mentioned in https://news.ycombinator.com/item?id=27142502 https://news.ycombinator.com/item?id=27142502 there is support for paralleli
by sadiq 5y ago
Good questions!
1) As I mentioned in https://news.ycombinator.com/item?id=27142502 https://news.ycombinator.com/item?id=27142502 there is support for parallelism and concurrency.
Giving an example of where these might be useful in a webservice.
The addition of shared-memory parallelism is beneficial where you might have a great deal of shared state that needs to be used to service requests. An in-memory cache is a good example - with a processed-based approach managing read/writes and avoiding significant overhead from marshalling the data is difficult.
Concurrency via effects at a minimum can make writing network-based services much more pleasant (and debuggable!). See the examples in https://arxiv.org/abs/2104.00250 https://arxiv.org/abs/2104.00250 where programs can be written in a direct-style similar to blocking IO but using effects are transformed to use asynchronous interfaces. There's work going on in the project at the moment to build fast cross-platform IO implementations that sit atop of uring/gcd/iocp.
3) This is a good question and one we're still working on. I think one of the lead developers KC has a few good ideas about instrumentation we can do to enable detecting races to global state. It's certainly going to be an issue for people porting large codebases.
4) This is the place to start: https://github.com/ocaml-multicore/multicore-opam#install-multicore-ocaml https://github.com/ocaml-multicore/multicore-opam#install-mu... .
- wuschel 5y agoThank you for the your answer! I will check out the URIs.