Java

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

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

kafka with spark

Spark Unconstructed | Deep dive into DAG

Apache Spark is all the rage these days. People who work with Big Data, Spark is a household name for them. We have been using it for quite some time now. So we already know that Spark is lightning-fast cluster computing technology, it is faster than Hadoop MapReduce. If you ask any of these Spark techies, how Spark is fast, they would give you a Continue Reading

Is Apache Cassandra really the Database you need?

Welcome back, everyone. It has been quite some time since I have been working with Cassandra. To be honest, it is a quite cool database. Its decentralized nature, as well as its ability to handle such a large volume of writes, is really commendable. But as we know nothing is perfect. So is the Cassandra Database. What I mean by this is that you cannot Continue Reading

Dependency Injection: The Core

We can define Dependency Injection as a technique where one object supplies the dependencies to other objects. But what actually does it mean? Well, there are many answers to this question and sometimes they are quite confusing and annoying. But in this blog, I’ll try to keep things quite straightforward and as simple as possible. A class has a dependency on another class if it Continue Reading

CuriosityX: RDDs – The backbone of Apache Spark

In our last blog, we tried to understand about using the spark streaming to transform and transport data between Kafka topics. After reading that many of the readers asked us to give a brief description of RDDs in Spark which we used. So, this blog is totally dedicated to the RDDs in Spark. So let’s start with the very basic question that comes to our mind Continue Reading

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

Custom ErrorHandlers and Lagom

Hello everyone, it’s been quite a while now since I started working on Lagom(java) and it was only recently when I came across a scenario wherein I was required to override the ErrorHandler provided by Play in my Lagom microservice. As you all already know that Lagom is built on top of Play and Akka, so there will be times when we’ll be required to Continue Reading

Code Combat II : The Code Battle For The Vanguard Continues…

“If you can dream it, you can do it. ”  -Walt Disney For some coding is a job. For some, it is an exercise. But for us folks here at Knoldus, it’s a Passion. So in order to bring a twist in the daily work schedule, Knoldus held an overnight Hackathon competition within the organization on 18th May 2018 which presented an opportunity for every Knolder(employees Continue Reading

The Law of Demeter

You’ll often get to hear from good programmers about having “loosely coupled” classes. What do they mean by saying that? Let’s understand this first before jumping onto the Law of Demeter. Loosely Coupled  In object-oriented design, the amount of coupling refers to how much the design of one class depends on the design of another class. In other words, how often do changes in class

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

What is Uniform Access Principle?

Uniform Access Principle is a programming concept which was first introduced by Bertrand Meyer which stated that All services offered by a module should be available through a uniform notation, which does not betray whether they are implemented through storage or through computation. The principle simply means that the notation used to access a feature of a class shouldn’t differ depending on whether it’s an attribute or a Continue Reading

%d bloggers like this: