Akka

Introduction to Akka Actors and Child Actors

Reading Time: 3 minutes Introduction In this blog, I will be explaining the basics of Akka, actors, and the way they are created. Therefore, I am naming this blog “Introduction to Akka Actors and Child Actors”. So let’s start with Akka first. What is Akka? Akka is not a framework but a toolkit and we use Akka for building distributed, highly concurrent, and fault-tolerant applications on the JVM, therefore Continue Reading

Introduction to Finite State Machines

Reading Time: 2 minutes In this we are discuss about the Finite State Machines(FSM) implementation using the Akka Actor Model. Finite State Machines First we go through the the proper defination of FSM as describes in Erlang Design Principles. A FSM can be understand in the form of relation. This can be define as: If we are in state S and the event E occurs, we should perform the actions A and make a transition Continue Reading

How to Schedule Messages or Tasks in Akka?

Reading Time: 2 minutes In this blog, we’ll see how to schedule sending of messages to actors or execution of tasks(functions or Runnable) at a specific point of time in future or maybe repeatedly over a certain interval. For this purpose, the Akka ActorSystem provides Akka Scheduler to manage the periodic execution of tasks. Akka Scheduler In simple words, the Akka Scheduler helps us to schedule sending of messages Continue Reading

Akka Stopping Actors

Reading Time: 2 minutes In Akka, you can stop Actors by invoking the stop() method of either ActorContext or ActorSystem class. ActorContext is used to stop child actor and ActorSystem is used to stop top level Actor. The actual termination of the actor is performed asynchronously. There are some other methods available in Akka, which are used to stop Actor. Some of which are PoisonPill, terminate() and gracefulStop() are Continue Reading

Getting Started with Spark 3

Reading Time: 4 minutes Introduction to Apache Spark Big Data processing frameworks like Apache Spark provides an interface for programming data clusters using fault tolerance and data parallelism. Apache Spark is broadly used for the speedy processing of large datasets. Apache Spark is an open-source platform, built by a broad group of software developers from 200 plus companies. Over 1000 plus developers have contributed since 2009 to Apache Spark.  Continue Reading

The deadly combination of Akka with Scala

Reading Time: 3 minutes Hi, today in this blog we are going to work with Akka using the Scala Programming Language. In today’s blog, we are going to learn the basics of the Akka using Scala. What are we going to learn today? Learn the Basics of Akka Create Akka System and Akka Actors Make use of Akka actors Create an application using Akka and Scala About Akka What Continue Reading

Akka Streams | Three Basic Components

Reading Time: 3 minutes Akka, a free open source toolkit simplifying the construction of concurrent and distributed system/application. We have already deal with Akka Actors where we learnt about the Akka Actors and their Behaviors. But Actors can be seen dealing with with Sequence of Data where they send or receive series of messages. So, In this blog we discuss Akka Stream in bit detail. What is Akka Streams Continue Reading

Synchronous Testing In Akka ToolKit | Testing Classic Akka Actors

Reading Time: 3 minutes Akka, a free open source toolkit simplifying the construction of concurrent and distributed systems/applications. In this blog, we are gonna discuss Testing the Akka Actors Synchronously. Usually, we people say that testing the Akka Actors is a bit confusing and tricky too, but it isn’t. Coming to the types of testing in Akka Toolkit, we have two types of testing i.e. Synchronous Testing and Asynchronous Continue Reading

Understanding Akka Streams and Its Components

Reading Time: 4 minutes Overview In this blog, we’ll be understand about akka streams and its components. Also, we’ll do a simple exercise that involves each of these components. Introduction Stream A stream is a flow of data that involves moving and transforming data. An element is the processing unit of the stream. Akka Streams In software development, there can be cases where we need to handle the potentially Continue Reading

How to do Unit testing using embedded PostgreSQL in Akka

Reading Time: 2 minutes Embedded PostgreSQL provides a platform neutral way for running PostgreSQL binary in unit tests. It is an efficient database to write test cases as it supports all data types of PostgreSQL. In this blog I will not dive deep in the features of Embedded PostgreSQL but rather focus on it’s integration with an Akka application. I have added a sample project for the better understanding. Continue Reading

Introduction to Akka Streams

Reading Time: 4 minutes Hey folks, let us understand the basics of akka streams. I hope you have a basic understanding of Akka Actor. What is Akka Streams Akka Streams is a library to process and transfer a sequence of elements. It is built on top of Akka Actors to make the ingestion and processing of streams easy. As it is build on top of Akka Actors, it provide Continue Reading

Mailboxes in Akka

Reading Time: 5 minutes Mailboxes are one of the fundamental parts of the actor model. Through the mailbox mechanism, actors can decouple the reception of a message from its elaboration. So, let’s see how Akka Typed, the most famous incarnation of the actor system, implements the concept of mailboxes. Logging Users’ Navigations First, an actor is an object that carries out its actions in response to communications it receives. Hence, in Akka Typed, Continue Reading

Scheduler in Akka

Reading Time: 2 minutes The Akka Actor System provides Akka Scheduler for managing the periodic execution of tasks. In this blog, we’ll see how we can schedule tasks using Akka Scheduler. Dependency Let’s add the Akka-actor dependency to our project: Single Execution Scheduler A single execution scheduler lets us defer the execution of a task. The task will execute after the configured delay. Let’s see how we can create a single Continue Reading