#scala

Back2Basics: Introduction to Elasticsearch

Reading Time: 2 minutes In this blog, I am going to discuss about Elasticsearch. What are the benefits of using it as a database and How to use it. Elasticsearch Elasticsearch is a highly scalable open-source full-text search and analytics engine. It allows you to store, search, and analyse big volumes of data quickly and in near real time.  Elasticsearch provides near real-time search and analytics for all types Continue Reading

Scala Cats: EitherT

Reading Time: 2 minutes In this blog, I will discuss about EitherT which is another concept of Scala Cats library. Before discussing about EitherT, lets discuss Either first then EitherT which helps us in resolving the issue or boilerplate we have due to Either. Either Either can be used for error handling in most situations. However, when Either is placed into effectful types such as Option or Future, a large amount of boilerplate is Continue Reading

How to Execute Commands in Scala?

Reading Time: 3 minutes Hey everyone, recently in my project, a need arises where I have to run an external command. In my code on a specific request, I wanted to start a node process. This made me ponder about “How to Execute Commands in Scala?”. 🤔 And I found something useful in Scala Library, so here I’m sharing what I learnt.

What is Open Class in Scala 3?

Reading Time: 2 minutes At Knoldus, we are pursuing to learn and share Scala 3 features with the community. In that quest, I am writing this blog to talk about a new feature being introduced in Scala 3 – Open Class. You can read about our other blogs on Scala3 here. Story till Scala2? In Scala 2, all classes are by default available for extensions, and we need to Continue Reading

Introducing Trait Parameters in Scala 3

Reading Time: 2 minutes At Knoldus, we are endeavoring to learn Scala 3 and share it with community. There are multiple blogs which have been published here on Scala 3 which you can visit to get to know about other new features of the language. In this blog post, I will take you through the feature of trait parameters introduced in the language. Traits in Scala 2 Traits are Continue Reading

Back2Basics: Partial functions and Partially applied functions in Scala

Reading Time: 2 minutes Hi Folks, in this blog I will discuss about the difference between Partial Functions and Partially Applied Functions in Scala, importance of these functions and how we can use them in our code. Before discussing about Partial Function and Partially Applied Functions, we should know about Functions. What is Function? A Function is a transformation for an input into an output which means whenever an Continue Reading

Circuit Breaker in Akka

Reading Time: 3 minutes Hey everyone, in today’s blog I will be covering the concept of Circuit Breaker in Akka. Before moving forward to it just think of a situation when you are requesting on a website and it is taking too much time. You try to refresh the page and still the same. Would you like to use that website again? I think the answer will be no. Continue Reading

Combating Fallacy in Scala

Combating Fallacy in Scala: Part 2

Reading Time: 3 minutes Welcome back to this amazing series of Combating Fallacy in Scala: Part 2. For this part, the topic will be “Tuple Unpacking”. So, let’s move forward. Tuple Unpacking Before looking into this, let’s have a look at Tuple in Scala. According to the Scala Docs “A tuple is a neat class that gives you a simple way to store heterogeneous (different) items in the same container.“ A tuple provides Continue Reading

Traits – The beauty of Scala

Reading Time: 4 minutes In this blog we will discuss about a Trait and how Traits can help you to beautify your code by Multiple Inheritance. Traits Traits are a fundamental unit of code reuse in Scala. Trait encapsulates method and field definitions, which can be reused by mixing into classes. Two most important concept about Traits are :- Widening from thin interface to rich interface Defining stackable modifications. Continue Reading

String Interpolation in Scala

Reading Time: 2 minutes Lets just refresh few of the Scala concepts in more detail, So in this blog we are going to discuss about string interpolation which is a amazing concept. As we know logging, printing and debugging is an important part of programming by String Interpolation we can use the String literals in an easy way. String Interpolation String interpolation is a concept in which we can Continue Reading