Home » Author Archives: Anirudh Bhatnagar

Author Archives: Anirudh Bhatnagar

Anirudh is a Java programmer with extensive experience in building Java/J2EE applications. He has always been fascinated by the new technologies and emerging trends in software development. He has been involved in propagating these changes and new technologies in his projects. He is an avid blogger and agile enthusiast who believes in writing clean and well tested code.

Achieving Order Guarnetee in Kafka with Partitioning

java-interview-questions-answers

One of the most important features of Kafka is to do load balancing of messages and guarantee ordering in a distributed cluster, which otherwise would not be possible in a traditional queue. Lets first try and understand the problem statement Let us assume we have a topic where messages are sent and there is a consumer who is consuming these ...

Read More »

Deploy Spring Boot Application on Amazon Elastic Beanstalk

spring-interview-questions-answers

In this blog, we are going to see how to deploy a Spring boot application on Amazon ElasticBeanstalk. Amazon ElasticBeanstalk has a preconfigured Java environment, which could be used to deploy a Spring Boot JAR which has the servlet container inside it. For our example, we will use maven as the build tool here. Step 1 : The first step ...

Read More »

Build a new Web Application from scratch using Spring boot, Thymeleaf, AngularJS – Part 3

spring-interview-questions-answers

In the previous blogs we built the landing page using Thymeleaf, Bower and Bootstrap and deployed it to Heroku. In this blog we will introduce some functionality with AngularJS for front end and Spring Boot Webservices at backend. We will begin with Login/Logout section. Lets begin with installing AngularJS in our application using bower. Introducing AngularJS $ bower install angular --save ...

Read More »

Understanding strategy pattern by designing game of chess

java-logo

Today we will try to understand Strategy Pattern with the help of an example. The example we will consider is The Game of Chess. The intention here is to explain strategy pattern and not to build a comprehensive Chess Game solution. Strategy Pattern : The Strategy pattern is known as a behavioural pattern – it’s used to manage algorithms, relationships ...

Read More »

Pizza problem – builder vs decorator

java-logo

Problem Statement We need to build the software for a pizza company who wants to prepare different types of pizzas, e.g Chicken Pizza, Flat Bread, Pepperoni Pizza with Extra Cheese, put add on toppings on it. Lets try to see which design pattern suits this problem statement and under what scenario. Traditionally, for pizza problem, builder pattern is most commonly ...

Read More »

Configuring chef Part-2

opscode-chef-logo

Lets recap what all we have done in the last blog :                   Setup workstation and chef-repo. Registered on chef to use hosted chef as the chef-server. Bootstrapped a node to be managed by the chef-server. Downloaded the “apache” cookbook in our chef-repo. Uploaded the “apache” cookbook to the chef-server. Added the ...

Read More »

Converting JSON to XML to Java Objects using XStream

json-logo

XStream library can be an effective tool for converting JSON to Java to XML translations to and fro. Lets explore each one of them one by one, and see which driver is used. Handling JSONs To convert JSON to Java objects all you have to do is initialize XStream object with an appropriate driver and you are ready to serialise ...

Read More »

Configuring Chef part 1

devops-logo

Below are the first steps in getting started with using chef. The three main components of chef are :                   Work station This is the developer’s machine will be used to author cookbooks and recipes and upload them to the chef-server using the command line utility called knife. Chef-Server This is the ...

Read More »

Want to take your Java skills to the next level?

Grab our programming books for FREE!

Here are some of the eBooks you will get:

  • Spring Interview QnA
  • Multithreading & Concurrency QnA
  • JPA Minibook
  • JVM Troubleshooting Guide
  • Advanced Java
  • Java Interview QnA
  • Java Design Patterns