Author: Gulshan Singh

Exceptions and Futures in Zio

Reading Time: 3 minutes ZIO is an open-source library that delivers a better “Future” for asynchronous and concurrent programming in Scala. Similarly, we can’t retry a Future in the event of failure, like we can for ZIO, because a Future isn’t a blueprint for doing something—it’s an executing computation. So if a Future fails, there is nothing else to do. We can only retrieve the failure. The central “type Continue Reading

Welcome to the Future in Scala

Reading Time: 4 minutes You have units of work that you want to run asynchronously, so you don’t block while they’re running. A future gives you a simple way to run an algorithm concurrently. A future starts running concurrently when you create it and returns a result at some point, well, in the future. In Scala, we call that a future returns eventually. The Future instance is a handle Continue Reading

Basic understanding of Monads, Monoids, and Functor

Reading Time: 4 minutes Monoid is based on an associative function. Formally, a functor is a type F[A] with an operationmap with type (A => B) => F[B]. In functional programming one typically only deals with one category, the category of types. A functor is an interface with one method i.e a mapping of the category to category. Monads basically is a mechanism for sequencing computations. A monad is Continue Reading

Distributed Domain-Driven Design in Akka Actor System

Reading Time: 5 minutes Domain-Driven Design is a set of guiding principles for software architecture. The most important concept in DDD is the focus on the Domain Model. If you are not familiar with the term “domain,” it is the set of requirements, constraints, and concepts that make up the business or field that you are trying to model. In Domain-Driven Design, we focus on that business domain and Continue Reading

Concept of Domain Driven Design in Reactive Architecture

Reading Time: 3 minutes Domain-Driven Design provides techniques to analyze a problem in a more manageable way. Therefore developers focus on the task, without worrying about all the other complexities surrounding it. We use Domain-Driven Design to facilitate communication between developers and domain experts. What is Domain? A Domain is a sphere of knowledge. In the context of software, it refers to the business or idea that we are modeling. Continue Reading

Akka Streams: Produce, Process, and Consume the data

Reading Time: 5 minutes Introduction of Akka Streams Akka Streams enables the consumption of streaming data in a fully non-blocking and asynchronous manner. Akka Streams is a part of Akka, specifically the part exposing a user-friendly API (a set of classes and methods) to handle, consume produce streams easily. It is all about the “how” of pushing streaming data around and making that easier for a user of Akka. Continue Reading

How Pass Messages Between Actors in Akka Actor System?

Reading Time: 4 minutes Introduction of Akka Actors Akka is a great library for message passing between actors or applications and building scalable, resilient, and distributed applications. If you are working on an application based on Microservices-driven architecture and scalability is a big concern, then go for Akka Actor System. Characteristics of Akka Actors The best way to think of using Akka is the “Everything is an actor” approach. Continue Reading

Variables and Basic Types In Scala

Reading Time: 5 minutes Value Assignment in Scala Like many languages, the variable assignment in Scala is divided into two parts, a declaration and a value assignment separated by an assignment operator, which is an equal sign. Variables and basic types In Scala is much same as we found in Java and other languages. The variable declaration starts with a keyword, followed by a space and then a variable Continue Reading