Java

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

Clean Code – Robert C. Martin’s Way

Writing good code in accordance with all the best practices is often overrated. But is it really? Writing good and clean code is just like good habits which will come with time and practice. We always give excuses to continue with our patent non-efficient bad code. Reasons like no time for best practices, meeting the deadlines, angry boss, tired of the project etc. Most of Continue Reading

Apache Solr : Did someone say search engine?

Apache Solr Solr is the popular, blazing-fast, open source enterprise search platform. It is one of the easiest ways of developing sophisticated, high-performance search applications. Based on another  Apache product Lucene, Solr provides developers with capabilities such as advanced full-text search capabilities, scalability, easy monitoring and much more. This blog intends to get you started with Solr and helps you interact with a Solr server.

4 Steps to Resolve CORS – Lagom.

Welcome All!! In this blog, we are going to discuss about the CORS issue and how it has to be resolved while working with Lagom. So Let’s begin. What is CORS? CORS: Cross Origin Resource Sharing Cross-origin resource sharing (CORS) is a mechanism that allows restricted resources (e.g. fonts) on a web page to be requested from another domain outside the domain from which the Continue Reading

Tail Recursion in JAVA 8

A tail-recursive function is just a function whose very the last action is a call to itself. Tail-Call Optimisation(TCO) lets us convert regular recursive calls into tail calls to make recursions practical for large inputs, which was earlier leading to stack overflow error in normal recursion scenario. With Scala, making a tail recursive function is easy. The Scala compiler detects tail recursion and replaces it with Continue Reading

A Simple walk-through to set up a local Cassandra multi-node cluster

In our earlier blogs we have already gone through The basic Introduction to Cassandra and also tried to explore the Cassandra Reads and Writes. Today we will be discussing something apart from the in-depth theoretical knowledge of Cassandra. In one of our projects , we came through a basic requirement in which we needed to required a local Cassandra cluster for some kind of testing.  Continue Reading

How to create your first docker image and run it in a docker container via command line?

So, Don’t you hate it when you are into deployments and don’t know how to go about docker and stuff. Today, we will talk about creating docker images and running it in a container via docker command line. It might sound frustrating and not easy but It’s possible and I will show you how. To make things easier from the beginning I have divided the Continue Reading

%d bloggers like this: