I have a hunch that large systems benefit from using message queues to communicate: messages permit asynchronous communication and the details of a queue (length, throughput) give insight into the workload of a system. Are there OCaml libraries or frameworks that support such an architecture, possibly including RPC mechanisms? I believe Lwt uses queues in its implementation but I believe they are not meant to be observed by client code. Sorry if this sounds vague - I’m just trying to explore the landscape.
You mean things like ZeroMQ? There are ZeroMQ bindings for OCaml. (More than one IIRC.)
That looks interesting. I was also thinking about something with an Erlang flavour but implemented as an OCaml framework.
I’m unaware of anything that implements the OCaml message passing paradigm but I agree that such a library would be interesting.
There’s also https://github.com/essdotteedot/distributed — I haven’t used it yet but it looks interesting.
I don’t know if you saw this thread from several days ago, but I am too in search of this grail
Still haven’t settled on a solution though
So the closest things you’re going to find are RPC parallel, which in erlang would sort of be like working with nodes and rpc in distributed erlang and https://github.com/owlbarn/actor which is like working with Actors in distributed erlang.
As much as I like Actors, they don’t suit typed Functional Languages well, from an API perspective.
If you’re willing to implement something from scratch, that’s closer to Ocaml’s natural semantics, look through the code of Async and the STDLibs ConcurrentML implementation, and figure out how to make it network based on top of ZMQ, or stick to the RPC model.