This post comes as a continuation for Scala starter kit. If you are new to Scala ecosystem I would recommend to check it out.
Being a Scala developer there is a big chance you will develop highly concurrent and scalable applications using Akka.
This article comes with some high level information about Akka along with a list of useful resources that will definitely help you to get started.
What is Akka
Akka is a toolkit and runtime for building highly concurrent, asynchronous and resilient applications on JVM. It relies on Actor Model which is a mathematical model for concurrent computation. It has the
Actor as the primitive unit of computation. Actors are very lightweight but show high performance. In Akka you can have around 2.5 million actors per GB of heap with a capability of processing up to 50 million msg/sec on a single machine.
A bit of history
Before starting learning about actors it's good to know when all it started:
- 1973, Carl Hewitt invents Actor for research on AI
- 1986, Joe Armstrong implements the Actor Model in Erlang
- 1995, Erlang is used for the first time in real applications
- 2006, Actor Model is implemented in Scala Standard Library
- 2009, Jonas Bonér creates Akka toolkit
- 2015, first release of Akka.NET
Where/How to learn
Learning and being productive with Akka takes a bit of time and it's quite challenging. Therefore, it's very important to choose the most suitable learning resources for you.
I have defined below a list of good resources that will help you to get started and make the learning process less painful:
- Akka Notes series on Rerun.me is a very good place to start reading about Akka. It starts with a nice introduction to actors and then digs into different parts of Akka in the subsequent articles. All the blog posts are well structured and contain brilliant explanations.
- The actor model in 10 minutes - A concise blog post that will make you understand the Actor Model in less than 10 minutes.
- The Official Akka Documentation - It's like a big encyclopedia where you can find a lot of information about Akka, including code examples.
- Akka team blog - Initially available on Let it crash!, it contains all the latest news and announcements on Akka.
- Reactive Manifesto - A manifesto on Reactive Systems, which are: Responsive, Resilient, Elastic and Message Driven. If you want to embrace the Reactive Programming - Sign the Manifesto!
- The Actor Model (everything you wanted to know...) by Hewitt, Meijer and Szyperski - This is a must see video. As the title suggests - there is a lot of useful information about Actor Model that will make you understand and reason easier about it.
- Building Reactive Applications with Akka by Jonas Bonér - A brilliant overview of Akka and reactive applications.
- Introduction to the Actor Model for Concurrent Computation - An introduction to Actor Model concepts along with some insights on how we can construct parallel systems using the Akka framework.
Although some books on Akka are available, I would rather stick to the official akka documentation as it's kept up to date.
Nevertheless, if you are still looking for some good books there is a list which I found on the official akka website:
- Learning Akka, by Jason Goodwin, PACKT Publishing, December 2015
- Akka in Action, by Raymond Roestenburg and Rob Bakker, Manning Publications Co., estimated in 2016
- Reactive Messaging Patterns with the Actor Model, by Vaughn Vernon, Addison-Wesley Professional, August 2015
- Developing an Akka Edge, by Thomas Lockney and Raymond Tay, Bleeding Edge Press, April 2014
- Effective Akka, by Jamie Allen, O'Reilly Media, August 2013
- Akka Concurrency, by Derek Wyatt, artima developer, May 2013
- Akka Essentials, by Munish K. Gupta, PACKT Publishing, October 2012
In addition to videos and lectures it is a must to start playing around with Akka. Probably the easiest and quickest way to have a minimal Akka project is to use Activator templates (e.g. Hello Akka template - you can also download it zipped from the Lightbend website). It's really handy.
If you have any interesting resources or useful tips that helped you while learning Akka please share them in the comment section.