Best Practices

Distributed Transactions and Saga Patterns

In a Knolx session organized by Knoldus, we discussed the idea of following Saga Patterns. For that to be more accessible, I’d like to share the session with the help of this blog. Service-oriented architecture has given us enough advantages to be a predominant architecture in our Industry, but it can’t be all sunshine and rainbows. There are use cases where monoliths are not only Continue Reading

Lagom 1.4: Response compression | GZip Encoding

In the previous blog, we discussed response compression using GZip filter for Lagom 1.3. Here, we will go over the steps we use to add similar response compression in Lagom 1.4. The steps remain the same with minor changes due to underlying changes that came as Lagom upgraded from Play 2.5 to Play 2.6. Step 1: The code The first step is to write the Continue Reading

Do you think your code is Perfect? Well, Think again.

“Any fool can write code that a computer can understand. Good programmers write code that humans can understand.” – Martin Fowler “I can code.” I always say to myself. But do others think the same? Is my code good enough for people to understand? Do other people think “Damn I wish I could write such code.?” –  that’s the main question I always had in Continue Reading

Do you know Akka-HTTP Cache?

Today we are to going to talk about a very important aspect of reactive web applications development. It’s not from the alien world, we always talk about it but we rarely want to deal with it. It’s Cache. In today’s mammoth scalable architecture, we are mostly surrounded by big design issues and somewhere here and there we neglect benefits of using a very useful concept Continue Reading

Is Shifting to Domain Driven Design worth your Efforts?

In our earlier blog, we explored a bit about Microservices. But let’s take a step back and look into how microservices can be effectively designed. Yes, you guessed it right. We will be talking about the Domain Driven Design or what we call the DDD approach. But before jumping into the concepts of Domain Driven Design, let’s understand 2 basic terminologies : Domain: A domain is the sphere Continue Reading

Unit Testing – The good, bad & ugly

Unit testing is common to all the codes that we write. We all do it, so it’s important to understand the most “looked forward” (sarcasm) aspect of development. However overlooked and underestimated, Unit Testing forms the most important part of any development cycle and hence it’s worth delving into. So let’s begin. So the big question at hand is, what is Unit Testing? “A unit test Continue Reading

Knolx: Introduction to Algebird: Abstract Algebra for Analytics

Hello everyone, Knoldus organized a session on 6th October 2017. The topic was “Introduction To Algebird”. Many people attended and enjoyed the session. In this blog post, I am going to share the slides & video of the session.

Rules while working with stream in Java 8

First, let’s have a basic understanding of stream. Then we will have a look at the side effects that can occur while working with streams. Stream represents a sequence of objects from a source, which supports aggregate operations. One thing to be notified while working with streams  is that, aggregate operation (intermediate operations) are lazy evaluated i.e. they do not start processing the contents of Continue Reading

One-way & two-way streaming in a Lagom application

Now a days streaming word is a buzz word and you should have heard many types of streaming till now i.e. kafka streaming, spark streaming etc etc. But in this blog we will see a new type of streaming i.e Lagom-streaming. Lagom-streaming internally uses Akka streams, with the help of which we will see one way & two way streaming. But before going forward, it Continue Reading

Simple Things You Can Learn From Cassandra Nodetool (Monitor/Manage) For DC/OS

Cassandra native tool called nodetool is used for monitoring and managing cassandra cluster for dcos

A Java Lagom service which only consumes from Kafka topic (Subscriber only service)

Subscriber only service means an application which only consumes, does not produce. We have generally seen the applications which both produces and consumes data from a Kafka topic but sometimes we need to write an application which only consumes data i.e. consumes data from a 3rd party service. So in this blog I am going to explain how to write a Lagom service which only Continue Reading

What to do for overriding the PureConfig behavior in Scala ?

PureConfig has its own predefined behavior for reading and writing to the configuration files, but sometimes we got the tricky requirement in which we need some specific behavior; for example to read the config. It is possible to override the behavior of PureConfig for a certain type by implementing another instance of ConfigReader, ConfigWriter or ConfigConvert. So in this blog we will discuss all 3 Continue Reading

Apache Spark : Spark Union adds up the partition of input RDDs

Some days back when I was doing union of 2 pair rdds, I found the strange behavior for the number of partitions. The output RDD got different number of partition than input Rdd. For ex: suppose rdd1 and rdd2, each have 2 no of partitions and after union of these rdds I was expecting same no of partitions for output RDD, but the output RDD got the Continue Reading

%d bloggers like this: