I am unable to find the MailboxProcessor documentation. I would expect to be able to read the xml documentation online, without having to resort to VS Code and Ionide. Can you point me to such a page, if it exists?
Hey, you are right at least it does not pop up easilly on web searches, on on microsoft docs, seems to be missing:
Btw, I found some not “official” but useful maybe if you need to get started:
https://fsharpforfunandprofit.com/posts/concurrency-actor-model/ http://tomasp.net/blog/agent-event-reporting.aspx/ https://www.codemag.com/Article/1707051/Writing-Concurrent-Programs-Using-F
also i was checking out Cricket actor lib recently :
Thanks for those links. I actually found the MailboxProcessor documentation from the Cricket page:
Cricket is abandoned, which is a shame. It seems the actor pattern is not widely adopted, outside of Erlang and perhaps Akka. Also, it seems strange to me that many of the articles on the MailboxProcessor do not sufficiently delve into error handling strategies. An actor is a process, and how should we handle the failure cases? Erlang was built around the principles of supervisor hierarchies, but that is nowhere discussed when reading about MailboxProcessor.
Why not just use Akka.NET? There is an idiomatic F# package for it.
Actors are not much used in the Microsoft ecosystem. But Microsoft themselves use actors in Service Fabric and Orleans. Azure leverages Service Fabric internally. Though they have a slightly different approach.
There’s also this alpha cross-language, cross-platform distributed application runtime called dapr.
Hi Kevin, thanks for your response. I was not intending to build a complete actor system, rather use the MailboxProcessor to implement a lock-free rate limiter for api calls. That is how the MailboxProcessor has been advertised, by many (Petricek, etc), as a simple tool to be used when there is a shared resource for example.
I thought as you mentioned supervisor hierarchies and error-handling strategies then you may as well just integrate a full-blown actor library. You could just use Akka for the relevant part of your application. It’s easy to integrate it that way.
Something else that might be of relevance to you is Polly, if you have transient fault-handling scenarios to deal with. I used both Akka and Polly in a project I worked on for a startup about a couple of years ago, though since then I’ve not had a chance to revisit this tech.
The documentation is here: