Tech Blogs

Need Of Value Classes With Example

What Value classes is? Value classes are a mechanism in Scala to avoid allocating runtime objects. This is accomplished through the definition of new AnyVal subclasses. The following shows a very minimal value class definition: case class UserId(id: Int) extends AnyVal As you can see in the above section,  For a class to be a value class, it must have exactly one parameter and it must have Continue Reading

Scrum vs Extreme Programming! Let’s see the difference!

In my previous blog “A quick overview of Scrum and Extreme Programming for the beginners“, I gave a brief introduction on Scrum and Extreme Programming. If we talk about similarities and differences between Scrum and XP, in some ways they are same and yet in some ways they are different. Scrum and Extreme programming, both are referred as “Agile Methodologies”, used in software development to Continue Reading

Akka Streams: Is it a Solution to Your Streaming Problems?

A few days earlier, in our project, we were using Spark streaming and initially, it worked like a charm. But as we were very close to completion of our use case, the unexpected occurred. Spark does have a lot of interesting features, but we had some more custom needs such as running a ton of varying jobs with different actors/flows. Also, we needed something which Continue Reading

Welcome, Akka Typed !!

While I was attending ScalaDays Berlin 2018, I experienced many great ideas but the one which intrigued me the most was “Farewell Any => Unit, welcome Akka Typed!” by Heiko Seeberger where he explained about Akka Typed APIs. In this blog I am going to explain what I learned until now about Akka Typed, therefore, I named this blog “Welcome, Akka Typed !!”, so let’s Continue Reading

Introduction to Akka Streams – Part 1

Akka Streams is a library that is used to process and transform a stream of data. In this blog, I’ll be discussing the components of Akka Streams. Akka Streams is an implementation of Reactive Streams and uses bounded buffer space, and this property is known as boundedness. To use Akka Streams, add the below dependency in your build.sbt:

Exactly-Once Semantics with Apache Kafka

Kafka’s exactly once semantics was recently introduced with the version 0.11 which enabled the message being delivered exactly once to the end consumer even if the producer retries to send the messages. This major release raised many eyebrows in the community as people believed that this is not mathematically possible in distributed systems. Jay Kreps, Co-founder on Confluent, and Co-creator of Apache Kafka explained its Continue Reading

DEPLOYING A PLAY APPLICATION(SCALA) WITH ANSIBLE ON AWS

In this blog, I will be demonstrating how to create an AWS instance and how to deploy your play application on that AWS instance using Ansible. First let’s see how to make an AWS instance:- Login to AWS console Click on launch instance on top and select the free instance Select the machine which you want to set up. Click on Configure Instance Details -> Continue Reading

10 Easy To Use Modules In Ansible

Ansible is all about using modules in its playbook. Here are my top 10 commonly used modules:- Before reading this blog I would like to explain some terminologies used below:- test-servers:- It is the group of my hosts which I have written in my inventory file. 2. – m XYZ:- XYZ is the module name 3. -u ec2-user:- to define username that is ec2-user 4. Continue Reading

Generate Docker Image For Mesosphere Kafka Client

Have you ever tried to access Kafka running on mesos on top of DCOS, and figure out that you end up with no latest Kafka client image in the docker hub? I have uploaded a new image with the Latest Kafka Stable Version 2.0.0, and one can get it easily – docker pull piyushdocker/kafka-client-2.0.0-image If you want to create your own image with any other Continue Reading

Currying vs Partially Applied Function

In this blog, I’m going to discuss about currying and partially applied functions. CURRYING Currying splits method with multiple parameters into a chain of functions – each with one parameter. Let’s understand currying using an example: scala> def multiply(a: Int)(b: Int)(c: Int) = a * b * c is the same as: def multiply(a: Int) = (b: Int) => (c: Int) => a * b Continue Reading

Spark: Why should we use SparkSession ???

Spark 2.0 is the next major release of Apache Spark. This brings major change for the level of abstraction for the spark API and libraries. The release has the major change for the ones who want to make use of all the advancement in this release, So in this blog post, I’ll be discussing Spark-Session. Need Of Spark-Session

Spark vs MapReduce: Which is better?

Both the technologies are equipped with amazing features, however with the increased need for real-time analytics, these two giving tough competition to each other What are MapReduce and Spark? MapReduce:- MapReduce is a programming model for processing huge amounts of data in a parallel and distributed. In this model, there are two tasks that are undertaken Map and Reduce and there is a map function Continue Reading

Mocking static methods with PowerMock

A good developer always writes a unit test case for his/her code. While writing test cases, we came across various types of scenarios, including the one where we need to mock static methods. One of the common examples of such scenario is where our service is using some static methods from a third party library. Here, one way to deal is to have an adapter Continue Reading

%d bloggers like this: