Author: Bhavya Verma

How to implement actions in Kalix using Scala

Reading Time: 3 minutes What is an action? Actions are stateless functions that can be used to implement various use cases such as: How to trigger actions? Actions can be triggered in the following ways: Steps to implement actions Defining the proto file Let’s see with an example how we can implement actions. So, we will be creating a FactorialAction that takes a number n and will return the Continue Reading

Event Sourced Entity in Kalix

Reading Time: 3 minutes What is an event sourced entity? Before understanding event sourced entity, let’s first understand a few terminologies: Entity – An entity is any singular, identifiable and separate object. Command – Command is an instruction which a user gives to a computer or a program to perform a specific task. State –  The state of a program is its condition regarding stored inputs. The term “state” is similarly Continue Reading

Let’s learn about function composition in Scala

Reading Time: 3 minutes In this blog, we are going to learn about how a list of functions can be composed to create a single function, in the context of mapping a set of values using those functions. Introduction When we compose two functions, we create a new function which applies one function to the result of the other. If I have one function a -> b which takes an a and gives Continue Reading

Implicit Parameters and Conversions in Scala

Reading Time: 3 minutes While working in Scala, everyone comes across implicit but only a few try to understand how it actually works. So if you are wondering how implicit in scala works, then this blog will help you to understand it. So let’s talk about implicit. What are implicits? When we talk about implicits, we mean implicit parameters or conversions that happen implicitly. Both of these involve the compiler implicitly Continue Reading

Distributed Messaging Patterns | Reactive Architecture

Reading Time: 3 minutes In this blog we are gonna learn about messaging and patterns of messaging. We are gonna learn how asynchronous messaging works. Asynchronous messaging provides us a lot of flexibility in our system. As an example, we can take large portions of our system offline and have our users not notice any difference in functionality. We can also enhance scalability of our system. For example, if Continue Reading

Creating stateless actors by changing their behaviour

Reading Time: 3 minutes Hey folks, let us understand how we can create stateless actors by changing their behaviour. I hope you have a basic understanding of what akka actors are and how do they work. If not, then you can check out this blog. Introduction An actor is described by its behaviour, which is responsible for handling the messages that the actor can receive. After each message, the Continue Reading

Akka Actors: How do they actually work

Reading Time: 2 minutes You might have used akka actors for building concurrent and distributed systems. But do you know how actors actually works under the hood? So let us understand in this blog how akka actors actually work. First of all, let us understand what are akka actors. Introduction Akka is an open-source library that helps to easily develop concurrent and distributed applications using Java or Scala by leveraging the Continue Reading

Unit testing with Mockito Framework

Reading Time: 3 minutes In this blog, we are going to learn about how we can use mockito framework to perform unit testing. Mockito framework provides us several methods which we can use to perform unit test. What is Unit Testing Unit testing is a software testing technique in which we only test a single component of the software. We ignore the output of the dependent module and test Continue Reading