Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Actor-based distributed concurrency libraries for Ocaml and other languages [closed]

Question

Can anyone recommend a library for Ocaml that offers an actor-based concurrency model for distributed computing?

Note here the "actor-based" and "distributed" - I'd like the actor-based model, but also I want seamless handling of distributed actors - I don't want to write the protocol to talk to them. The library should ideally also offer standard patterns such a supervisor trees and so on.


Motivation

I love Erlang concurrency model and ability to transparently deal with distributed processes and local processes together. However, I find Erlang's syntax to be rather limiting and would like a much more expressive language. I'm considering moving from Erlang to either Scala or Ocaml.

I know Scala has the Akka library which seems to offer a nice Scala version of Erlang's concurrency model. I'd like to see what is available on the Ocaml side.


Aside

I'd also be happy to hear about actor-based concurrency libraries for other languages (particularly C++, Haskell, Python and Ruby).

like image 296
MGwynne Avatar asked Sep 27 '11 09:09

MGwynne


People also ask

What is actor based concurrency?

The actor model is characterized by inherent concurrency of computation within and among actors, dynamic creation of actors, inclusion of actor addresses in messages, and interaction only through direct asynchronous message passing with no restriction on message arrival order.

When would you not use an actor model?

We've already covered some instances where the Actor Model isn't ideal. Such as when you need a sequential order of things to happen. If you find yourself sending multiple messages and then needing to rollback those processes if one fails, you might want to reconsider using the Actor Model.

What is actor based programming?

The actor model is a computer science concept that uses "actors" as the fundamental agents of computing. Actors take input, send output and perform functions. They can also create other actors.


1 Answers

While it may not be the exact same model that Erlang uses, you might want to take a look at JoCaml, which is based on the join calculus.

like image 154
Matthias Benkard Avatar answered Oct 05 '22 09:10

Matthias Benkard