scala

Hacker hands using laptop computer to code

Pattern Matching and Its Types in Scala

Reading Time: 4 minutes In this blog, we will read about pattern matching in Scala followed by various types of patterns in match expressions. What is Pattern Matching? Pattern matching in Scala is a powerful mechanism of checking a value against a pattern. Thus, we match a value against a pattern and a successful match deconstructs the value into its constituent parts to be used further. While providing the Continue Reading

Hands-on read JSON data from any external API with Scala

Reading Time: 3 minutes Hi folks, In this blog, we will write HTTP server + client code which calls the below external API using Scala and play framework Project Setup We must install the SBT command-line tool (at least JDK 8). In this blog, we’re using SBT version 1.7.1 to install Play Framework version 2.8.1. Step 1: First, we need to add some dependencies in the build.sbt file. Step Continue Reading

man working on laptop while woman takes notes

Joins in Spark SQL with examples

Reading Time: 4 minutes Spark SQL Spark SQL is a module in Apache Spark. It allows users to process structured data using a SQL-like syntax. It integrates seamlessly with the Spark ecosystem, including Spark Streaming and MLlib. One of the main benefits of using Spark SQL is that it permits to users to integrate SQL queries with the programming language of their choice, such as Scala, Python, or Java. Continue Reading

Analyzing data.

What is a Closure in Scala ? Why it is required ? How to use it ?

Reading Time: 2 minutes Objects are more flexible for certain use cases because they carry both data members and member functions, whereas a function does not have data members. So if there is a requirement to pass data members along with functions, How will we achieve it in functional programming ? The answer is yes, we can achieve it using a closure and a free variable. What is a Continue Reading

What is Docker ? How to use it ?

Reading Time: 3 minutes Docker is a software containerization platform, meaning you can build your application, package them along with their dependencies into a container and then these containers can be easily shipped to run on other machines. Now let’s talk about containers and containerization. Containers A container image is a lightweight, stand-alone, executable package of a piece of software that includes everything needed to run it: code, runtime, Continue Reading

Programmers working on computer program

Apache Spark Best Practices and Performance Tuning

Reading Time: 2 minutes We all know that Apache spark is a Big data processing engine that works on the model of in-memory computation. When we are dealing with extensive data even if we are able to reduce the use of even 1 MB of memory per minute it will result in thousands of dollars per month. Hence it becomes essential to learn the spark best practices and optimization Continue Reading

Businessman playing digital tablet in cafe

How to write unit test in Scala ZIO

Reading Time: 3 minutes ZIO is a Scala library for creating asynchronous, concurrent, and fault-tolerant applications. It is based on the concept of “effects” and provides a powerful and flexible way to express and compose computations that may have side effects, such as reading from a file, writing to a database, or making an HTTP request. ZIO offers a full-featured ecosystem for building applications, including libraries for common tasks Continue Reading

Digital business and technology

Akka Cluster Sharding: Introduction

Reading Time: 3 minutes In this blog, we will learn the basics of Akka Cluster Sharding which will include what Sharding and Cluster Sharding is and their basic components. So, let’s get started. What is Sharding? The term Sharding means Partitioning. Sharding basically helps the system to keep data in different resources like memory after dividing it into different parts. Here in this section, I will explain Sharding in Continue Reading

Hands-on CRUD operation with Scala-Play

Reading Time: 3 minutes Hi folks in this blog, we perform CRUD(Create, Read, Update, Delete) operations using Scala, Play framework, and Postgres Slick Project Setup We must install the SBT command-line tool (at least JDK 8). This Project uses SBT version 1.6.2 to install Play Framework version 2.8.1 and the Postgres database. Now you need to download the hello word template in play scala. Run ‘ sbt new playframework/play-scala-seed.g8’ Continue Reading

Different methods are used in string operation – Scala

Reading Time: 3 minutes Scala Strings are one of the most important features of scala. Basically, it is a sequence of characters that uses the linear approach to store data. In scala, the string is immutable in nature and hence we cannot change its original state. Scala language provides us various methods to play with strings we can use these methods on strings to get the desired output. If Continue Reading

background

How to learn Scala ?

Reading Time: 2 minutes In this article we will going to cover some introductory part about Scala programming language. Introduction to Scala A contemporary multi-paradigm programming language called Scala was also created to describe common programming patterns in a clear, beautiful, and type-safe manner. Surprisingly It smoothly combines elements of functional and object-oriented languages. Scala as Object Oriented Programming Language Every value is an object in Scala, making it Continue Reading

Visualizing data - abstract purple background with motion blur, digital data analysis concept

Synchronous and Asynchronous Fibers in ZIO

Reading Time: 2 minutes In this blog post, we will discuss operations on fiber both synchronous and asynchronous with the help of an example. ZIO ZIO is a highly concurrent framework, powered by fibers, which are lightweight virtual threads that achieve massive scalability compared to threads, augmented with resource-safe cancellation, which powers many features in ZIO. However, this powerful concurrency model lets you do more with less, achieving highly Continue Reading

Bearded confident maintenance engineer in white shirt is working in database center

Some amazing Thread Methods which will make your task easy

Reading Time: 3 minutes Multithreading is one of the very important concepts in Scala programming. It allows us to create multiple threads in our program to perform various tasks. Now Scala Thread class provides us many methods which make our tasks easy. In this blog, we are going to discuss a few of these methods. Scala Thread Methods Scala threads provide us various methods to deal with threads. In Continue Reading