Understanding Akka Dispatchers

This week I had to work on tuning a execution engine that is built using Akka. Akka is a toolkit and runtime for building highly concurrent, distributed and resilient message driven systems. This post assumes you already know Akka. Actor needs a dispatcher to perform its task. A dispatcher relies on executor to provide thread. There are two types of executors a dispatcher can have: 1) fork-join-executor 2) thread-pool-executor. In this post, we will understand how you can configure fork-join-executor and thread-pool-executor to meet your needs. Continue reading “Understanding Akka Dispatchers”

Advertisements

Actor System Termination on JVM Shutdown

In my day job, I work on a backend system that uses Akka. Akka is a toolkit and runtime for building highly concurrent, distributed and resilient message driven systems. I will write an in-depth Akka tutorial some other week. This week I will talk about a specific problem that I was trying to solve. We have two applications that talk over each other via Akka remoting. First application can shutdown the second application programmatically by sending a message to the second application ActorSystem. Shutdown here means you can exit the JVM. To make sure we do a clean shutdown, we added JVM shutdown hook that terminates the ActorSystem. Continue reading “Actor System Termination on JVM Shutdown”