Author: Meenakshi Goyal

Future Type Operation with Scala

Reading Time: 6 minutes Introduction Scala Future represents a result of an asynchronous computation that may or may not be available yet. When we create a new Future, Scala spawns a new thread and executes its code. Once the execution is finished, the result of the computation (value or exception) will be assigned to the Future. Type Future Operations Map When we have a Future instance, we can use the map method to transform its successful result Continue Reading

How To Use Pattern Matching

Reading Time: 3 minutes Overview In this blog, we will show a functional feature of Scala which is pattern matching. If you have used Java or .NET in the past, it may at first sight appear similar to switch statements. But, Scala’s pattern matching is a lot more powerful! Different ways of Pattern Matching 1. Pattern matching – a very basic example Suppose you want to test a variable called donutType. In the case that its value Continue Reading

Opaque Type Aliases

Reading Time: 3 minutes Introduction Scala is a statically typed programming language. This means the compiler determines the type of a variable at compile time. A type alias is usually used to simplify declaration for complex types, such as parameterized types or function types. Opaque type aliases do not allow access to their underlying type outside of the file in which they are defined. Opaque type alias is a feature that Continue Reading

Getting started with Akka Cluster

Reading Time: 3 minutes Introduction Akka cluster provides a fault-tolerant decentralized peer to peer cluster membership service with no single point of failure or single point of bottleneck. It does this using gossip protocol and an automatic failure detector. Akka Cluster allows for building distributed applications, where one application or service spans multiple nodes (in practice multiple Actor Systems). Cluster Membership Akka cluster module provides a very simple cluster membership Continue Reading

Akka Typed: Stateful to Stateless

Reading Time: 4 minutes This blog is for people getting started with Akka typed actors. We’ll look at how we can keep state inside an actor in a few different ways. Cover the code from stateful to stateless. Introduction Typed Actors consist of 2 “parts”, a public interface and an implementation. If you’ve done any work in “enterprise” Java, this will be very familiar to you. As with normal 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

Introduction to Keycloak

Reading Time: 3 minutes Hey champs, let us try to understand about keycloak services, benefits and their feature etc. Add authentication to applications and secure services with minimum fuss. No need to deal with storing users or authenticating users. It’s all available out of the box. You’ll even get advanced features such as User Federation, Identity Brokering and Social Login. IAM(Identity Access Management) IAM or IdM(Identity Management) is a Continue Reading

How to do Configuration in Akka

Reading Time: 3 minutes This blog is for the Scala programmer with a little bit of Akka background, but who is utterly baffled by the seemingly magical Akka Essentials. This blog is all about the configuration in Akka like how we can create a configuration in different ways. Configuration Configuration is all about the piece of text which is in the form of key value pair. You can start Continue Reading

Backpressure in Akka Stream

Reading Time: 4 minutes “Reactive Streams” — whenever we come across these words, there are two things that come to our mind. The first is asynchronous stream processing, and the second is non-blocking backpressure. In this blog, we are going to learn about the latter part. Understanding Backpressure Very simply put, the idea behind backpressure is the ability to say “hey slow down!”. Let’s start with an example that Continue Reading

How to Use Graph DSL with Akka Streams

Reading Time: 3 minutes This blog is for the Scala programmer with a little bit of Akka background, but who is utterly baffled by the seemingly magical Akka Streams Graph DSL. This article will use bits of Scala code that are easy to understand. Introduction In Akka Streams computation graphs are not expressed using a fluent DSL like linear computations are, instead they are written in a more graph-resembling Continue Reading

Akka Fault Tolerance And Supervisor Strategies| “Fault Tolerance Made Easy”

Reading Time: 2 minutes This blog introduces Akka examples and explore the ways in which it facilitates and simplifies the implementation of concurrent, distributed applications. What is the Akka? Akka is a toolkit and runtime for building highly concurrent, distributed, and fault-tolerant applications on the JVM. It is written in Scala, with language bindings provided for both Scala and Java. All the complexity of creating and scheduling threads, receiving and Continue Reading