Part 1 — Getting Started

  1. Install Tomcat Server
  2. Download Struts 2
  3. Create a dynamic web project in Eclipse
  4. Include struts jar files that are downloaded
  5. Create struts.xml file
  6. Write action classes
  7. Inside the struts.xml file, mention struts dtd and in <struts> tag mention package tag
  8. Inside the package tag, mention mapping between action and request URL
  9. Write the business logic within execute() method that returns a string
  10. The return string is used to route between JSPs
  11. Create JSP file
  12. Inside mapping between action and request URL in struts.xml file, mention the JSP files to be displayed based on the return string by action class
  13. We…

A reference before exam

Why Azure?

  1. be ready for future
  2. build on ur terms
  3. trust ur network
  4. operate hybrid seamlessly

Market place — partner solutions optimized to run in azure, over 8000 solutions so far

Infra —
uses virtualization
os and hardware separated using hypervisor

Each server rack is attached with fabric controller software
Multiple server racks are connected through network switch
Orchestrator is responsible to get the requests through web api and sends it to switch that chooses best rack
Once the request reaches server, it will create the requested resource in a vm

10 broad categories:
compute — scale compute
network — on prem experience, vpn…

Network Policy

kind: NetworkPolicy
name: test-network-policy
namespace: default
role: db
- Ingress
- Egress
- from:
- ipBlock:
- namespaceSelector:
project: myproject
- podSelector:
role: frontend
- protocol: TCP
port: 6379
- to:
- ipBlock:
- protocol: TCP
port: 5978

Config Maps

apiVersion: v1
kind: ConfigMap
name: game-demo
# property-like keys; each key maps to a simple value
player_initial_lives: "3"
ui_properties_file_name: ""

# file-like keys |
player.maximum-lives=5 |

The KUBECONFIG environment variable holds a list of kubeconfig files.

Node & Pod Affinity/Anti-Affinity, Taints and Tolerations

Scheduler is a Kubernetes controller listening if a new pod is created and figure out right node by filtering and scoring

Node Affinity/Anti-Affinity

Affinity: If we need a pod to be in a node, based on key-label and value-label
Anti-Affinity: We don't want two replicas of pods in the same node

Node Affinity

Pod Anti-Affinity

Load balancing, Networking plugins, CNI

Docker Networking

3 default networking types — None, Host, Bridge (docker0 network)

Containers are launched on Docker bridge

Advanced Concepts — Stateful applications

This article is part 2 of Please go through the link.

  1. Volumes and Claims
  2. Life cycle of volumes and claims
  3. Provisioning types
  4. Binding and Mounting volume
  5. Statefulsets
# Containers are not persistent
# PV is accessible at cluster level, independent of pods
# PVs life cycle is not tied to container lifecycle
# Types = Static PV and Dynamic PV

Static PV

kubectl create -f static-pv.yml
kubectl get pv
kubectl get pv <name>

Life cycle of PV and PVC

# PV is at cluster level
# When developer claims PVC is created at container level

A distributed streaming platform

What is Kafka for?

Is a producer consumer system.


  1. Topics
  2. Partition — Topics are partitioned for faster read and write of the data

Kafka in Spring

Annotation : @KafkaListener


import org.springframework.core.task.SimpleAsyncTaskExecutor;
import org.springframework.core.task.TaskExecutor;
import org.springframework.kafka.annotation.KafkaListener;
import org.apache.kafka.clients.admin.NewTopic;
private final TaskExecutor exec = new SimpleAsyncTaskExecutor();@KafkaListener(id = "fooGroup", topics = "topic1")
public void listen(Foo2 foo) {
this.exec.execute(() -> {} );
public NewTopic topic() {
return new NewTopic("topic1", 1, (short) 1);


@Autowired private KafkaTemplate<Object, Object> template; @PostMapping(path = "/send/foo/{what}") 
public void sendFoo(@PathVariable String what) {
this.template.send("topic1", new Foo1(what));

Kafka APIs

Admin API (inspect topics), Producer API (write), Consumer API (read), Kafka Streams API, Kafka Connect API

Shark, MLpack, Dlib, OpenCV Libraries


Used in: Regression tasks


sudo apt-get install cmake cmake-curses-gui libatlas-base-dev libboost-all-dev# Download package
mkdir build
cd build
cmake ..
make -j


#include <shark/ObjectiveFunctions/Loss/SquaredLoss.h>
#include <shark/Algorithms/Trainers/LinearRegression.h>


-std=c++11 -lboost_serialization -lshark -lcblas


Used in: Clustering tasks


apt-get install libboost-math-dev libboost-program-options-dev libboost-test-dev libboost-serialization-dev libarmadillo-dev binutils-devsudo apt-get install libmlpack-dev
sudo apt-get install mlpack-bin


#include <mlpack/methods/kmeans/kmeans.hpp>
#include <armadillo>


std=c++11 -larmadillo -lmlpack -lboost_serialization


Used in: Clustering and lot more algorithms


Download dlib source

mkdir build
cd build
cmake ..
cmake -build . --config Release


#include <dlib/clustering.h>
#include <dlib/rand.h>


g++ -I /home/admin/Programs/dlib-19.7/ /home/admin/Programs/dlib-19.7/dlib/all/source.cpp -lpthread -lX11…

Spring Boot

Parameters like password, db connection data, dev parameters, test parameters etc should be maintained in a separately called configuration. This is possible by maintaining .yml file or .properties file.

  1. .properties file contains the key value pairs and are accessed in the microservice by @Value(“$key”) annotation before a variable declaration.
  2. .yml file also stores key value pairs. It can have tree structure to avoid long prefixes.
  3. @ConfigurationParameter(“prefix”) annotation is used to fetch all the parameters in config file with that prefix and stores in variables of a bean class.
  4. But, all these go to the jar file, so config is not…

Amulya Reddy Konda

Software Engineer

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store