Scalaz 8 IO vs Akka (typed) actors vs Monix

Click for: original source

There’s a couple of hot development areas in the Scala ecosystem, and the competition between the various side-effect wrappers is one of the most interesting. Adam Warski article comparing various options and trying to find the answer to the question: Can you really replace an Actor with an IO or Task?

Akka is much more than just actors; there’s streaming, persistence and clustering, just to name the three most popular modules.

An actor encapsulates and manages state. Access to the state is guaranteed to be serialized, so that the state is always accessed and changed by a single thread.

Article then compares all three libraries and provides test code for you so you can try yourself. To be precise it copares: akka-actor (just the base module, concurrency), monix-task and scalaz-zio.

Monix is a smaller library, but apart from the core concurrency library it also provides a reactive streaming implementation.

ZIO (Scalaz 8 IO), on the other hand, as well as cats-effect, is clearly focused only on encapsulating side effects and providing a concurrency library.

Good, in depth article. Author concludes that Monix / ZIO is definitely a viable alternative for the “traditional” and “typed” Akka flavors. Great!

[Read More]

Tags akka scala functional-programming