Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Akka as the concurrency model for Clojure

Looks there is a lot of cool things about Akka framework (I don't really understand the framework, hope to dig into it soon).
Is it encouraged to use Akka in Clojure? does it make sense to use Akka as the concurrency model in Clojure projects and drop the built in facilities?

like image 633
Chiron Avatar asked Mar 25 '11 01:03

Chiron


3 Answers

Clojure has lots of built in support for dealing with concurrency. There's no need to bring an actor libarary into your project unless you actually need actors. Your question doesn't detail the architecture or design of your system, so I can't really speak to whether or not actors are necessary for your project, but I certainly wouldn't jump right into it. Take a look at Clojure's agents and other concurrency primitives first. They should suit your needs quite nicely.

As far as Akka (or any actor library) as the concurrency model for Clojure, that is not the way the language was designed. You may choose to use an actor library for your application, but it is not the approach that the Clojure language has adopted.

like image 182
abedra Avatar answered Oct 03 '22 04:10

abedra


It depends on if your project is already using the built-in facilities. It also depends on if your company/project tolerates the idea in the first place, tolerates the licensing terms of the library, and whether you/your group is willing to live with the community support or pay for the commercial support.

See:

  • http://doc.akka.io/licenses
  • http://scalablesolutions.se

Besides this, it will come down to preference for the developers of your project, maintainability of the code you'd write vs the standard facilities, level of support for the library, acceptance of the library within the Clojure software development community, etc.

My advice is to evaluate it and make comparative proof-of-concept prototypes with all the technologies you are considering.

This sort of advice is applicable when adding any third-party code to a project.

Accepting someone else's opinion blindly could cost you a lot of time, effort, money, and support from other developers.

like image 43
Merlyn Morgan-Graham Avatar answered Oct 01 '22 04:10

Merlyn Morgan-Graham


Pulsar projects brings Lightweight threads, CSP and Erlang-like actors for Clojure.

like image 25
Chiron Avatar answered Oct 04 '22 04:10

Chiron