Introduction to Akka

A brief history of time

Fasih Khatib
Akka for Newbies
2 min readFeb 2, 2017

--

A long time ago (before I was born), software was written to be run on a single processor. The only way to increase performance was to make the processor faster. Moore’s law says that the processors will become faster and faster with the number of transistors doubling every 18 months. So, since the processors became faster, the code written for the older processor now also became faster.

However, there’s only so many transistors that can be crammed onto a little chip and only so much heat that can be dissipated. The performance that can be achieved by a single processor hit a ceiling. This required a change in the way processors are made. We moved towards a multicore architecture with multiple processors working in tandem as a single logical processor. This change in hardware also necessitates a change in the way software is written. The code written for a single processor would no longer benefit from the new hardware.

So, we moved towards multi-threaded code and as everyone knows, ensuring that the various threads work flawlessly is a pain in the PCIe slot.

Enter Akka.

Akka is a toolkit that lets you write highly concurrent, fault-tolerant, and distributed applications easily. The thread management is handled for you by Akka so you focus more on writing the functionality that matters rather than on making sure that the threads work fine.

Since Akka is a toolkit, you can pick and choose what Akka tool you want to use.

There’s Akka actors which provide an efficient implementation of the actor model, there’s Akka HTTP which lets you expose actors over HTTP or let them consume data over HTTP, there’s Akka streams which lets your actors consume streaming data.

We’ll be covering a lot of the Akka tooling in this series beginning with actors as they form the heart of Akka.

Why use Akka?

There are a number of benefits that you get when building applications with Akka like concurrency, scalability, and fault tolerance with very little effort on your part.

Also, you have the Scala, Java, and .NET APIs which makes the learning curve a lot less steeper. The actor model is also very easy to reason about.

With that said, we’ll begin with the basics in the next post.

--

--