Collections in Scala (Part-2) | Set

Reading Time: 4 minutes Collections in Scala systematically distinguish between mutable and immutable collections. In the previous blog, we had covered – An Overview of Collections and its types in Scala (Im)Mutability in Scala You may go through the Collections And (Im)Mutability in Scala (Part-1). So, In this Blog we will discuss Scala Set in detail. Set – Scala Sets are iterables that does not contain any duplicate element. Continue Reading

Scala vs Python for Apache Spark: An In-depth Comparison

Reading Time: 5 minutes Imagine the first day of a new Apache Spark project. The project manager looks at the team and says: which one to choose, scala or python. So let’s start with “scala vs python for spark”.  You may wonder if this is a tricky question. What does the enterprise demand say? Is this like asking iOS or Android? Is there a right or wrong answer? So Continue Reading

scala variances

Scala Variances: Covariance, Contravariance, and Invariance

Reading Time: 4 minutes 1. Variance Variance is the interconnection of subtyping relationship between complex types and their component types. Variance is all about sub-typing. It tells us if a type constructor is a subtype of another type constructor. Variance defines inheritance relationships of parameterized types(types that have parameters within them). Sub-Typing Every programming language supports the concept of types. Types give information about how to handle values at Continue Reading

Functors in Functional Programming

Functors in Functional Programming

Reading Time: 5 minutes 1. Overview In this tutorial, we’ll take a look at Functor type class in Cats. The idea of Functor is “something that can be mapped over”, we’ll see what is actually mapped and how. In functional programming, Functors come into play when we have types or values wrapped inside contexts or containers. We don’t have to know any of the implementation details of those contexts Continue Reading

Case classes and Anonymous Function in Scala

Reading Time: 3 minutes In this blog, we’ll be looking at one of the important concepts of Scala that is Case class, also we will see how to define a Scala case class and along with this, we’ll discuss what are the important features of case classes, the importance of case classes. We will learn how to define a minimal case class and why do we need case classes Continue Reading

Complete CI/CD Pipeline For MicroService Using Akka Http And BitBucket

Reading Time: 4 minutes In this blog, we will see how to set up a Bit-Bucket Pipeline to get CI/CD for your Akka HTTP Application. We will be deploying the application on the HEROKU server, but in this blog, we will also see how to dockerize the application and push the image on Docker Hub which further can be used to deploy on any container orchestration platform. Let’s get Continue Reading

Introductory Scala Concepts (Pattern Matching, Option, and Try/Success/Failure)

Reading Time: 4 minutes Pattern Matching: Scala Pattern matching is one of the features of functional programming that make it such an awesome paradigm. This tool is somewhat similar to switch statements you might be familiar with from other languages such as Java or Python, however Scala pattern matching is a much more powerful tool. In short, pattern matching allows one to check a value against a pattern as Continue Reading

Introduction to functions in scala

Reading Time: 4 minutes A function is a group of statements that perform a certain task. Instead of writing the same code again and again for different inputs, we can simply make a function and call whenever required. Each function must perform a specific task. Difference between Functions & Methods A scala method is a part of a class that has a name, signature, bytecode, etc. whereas a function Continue Reading

Build your first API with Scala and Akka HTTP

Reading Time: 3 minutes Akka is a free and open-source toolkit and runtime simplifying the construction of concurrent and distributed applications on the JVM. It is built by Lightbend. Akka supports multiple programming models for concurrency, but it prefers actor-based concurrency. One can integrate this library into any JVM support language. It implements Actor Based Model. The Actor Model provides a higher level of abstraction for writing concurrent and Continue Reading

Companion Object in Scala

Reading Time: 4 minutes Companion Object is a singleton object of a class sharing same name and same source file.The class is called a Companion Class.For instance, we have a class name Person in Person.scala and an singleton object Person in the same file: In this file the object Person is a companion object and class Person is a companion class. Benefits of Companion Object Companion Objects in Scala gives many benefits.First, companion object and class can access each Continue Reading

Type Inference : An helpful feature of Scala

Reading Time: 4 minutes Scala comes with very interesting features. One such feature is Type Inference. Type Inference is a very powerful feature of Scala as it helps the developer to develop fast and efficiently. The Scala compiler can often automatically infer the type of an expression (everything in Scala is an expression). This helps the developer write the code without worrying about mentioning the types which are often known Continue Reading

Akka Toolkit | Creating your First Akka Actor | Scala

Reading Time: 3 minutes Akka, a free open source toolkit simplifying the construction of concurrent and distributed system/application. In this blog we are gonna discussing about Akka, Actors and finally creating and running our first actor. Akka – Again, it is a free and open-source toolkit and runtime. It is used to develop highly concurrent, distributed, and fault-tolerant message-driven applications on the JVM(Java Virtual Machine). It includes features for Continue Reading

Beginners Level: Akka Typed API

Reading Time: 3 minutes In this blog, I will be explaining Akka Typed API. This is going to be my first blog on Akka Typed, so let us name it “Beginner Level: Akka Typed API“. Here, I will be telling you the reason for preferring Akka typed over untyped. Along with that, I will also be demonstrating some implementations with Akka Typed. Now before heading towards Akka Typed API, Continue Reading