开发者

Akka as the concurrency model for Clojure

开发者 https://www.devze.com 2023-02-19 09:37 出处:网络
Looks there is a lot of cool things about Akka framework (I don\'t really understand the framework, hope to dig into it soon).

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 projec开发者_C百科ts and drop the built in facilities?


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.


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.


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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号