Micro Services Architecture

microservices

In programming we decompose big things into small, manageable chunks. In algorithms, we solve a small problem, and then use recursion or iteration to solve more complex problems. In software development, we create methods, and interfaces, and classes, and packages with the objective of being more efficient, and letting our code be more maintainable, manageable…so that a change in one part does not require a cascading change in other parts of the application.
Yet, we deploy as a monolith. All the packages run in the same JVM, in the same process. Classic example of this is the Java EE container, where all the wars, jars, and ears are deployed in the same JVM. In this page, I am jotting my notes on micro services, and a high level framework for designing micro services.

Read More

Non Blocking IO

What is blocking IO, non-blocking IO, select and epoll? When to think about using them? The below notes are on a controversial topic of thread versus connections, and some parts of these notes are derived from http://www.kegel.com/c10k.html.

Read More

The IO Subsystem

An application cannot write directly to the devices, or to the network. It needs to channel the requests via the kernel. Similarly when an application wants to read some data, it performs a read system call. The kernel would load the data into the input buffer, and then someone somehow signals the application that the data is ready to be consumed. While an application, or an application server can be written without understanding what goes under the hood, it is often important to understand the IO subsystem to be able to tune high performing servers. The notes on this page try to concisely capture the key concepts in IO subsystem of an operating system, and prepare a stage for understanding the blocking IO, non-blocking IO, and epoll edge triggered channel selection.

Read More

Logback – Sleeker, Faster, and Better

LogBack

Logback logging framework is the successor for log4j. It standardizes several additional features and capabilities, which were earlier achieved in ad hoc manner by different project teams.

Read More

Ensemble of Weak Learners

Ensemble - Team Work Image

There are various machine-learning algorithms a.k.a. “learners” for regression and classification problems. Ensembles allow us to create a more powerful learner from a set of base learners. They are known to produce better results than the individual algorithms and are better at reducing generalization errors. Thus, the base learners are also referred as weak learners when discussing the ensembles.

The base learning algorithms used by an ensemble could be of different types, for example the individual base learners could be Bayesian, Decision Trees, SVM, etc. in other cases, the base learners could be the same algorithm with different tuning parameters and training sets, for example in Random Forest ensemble, each base learner is a Decision Tree.

I’m going to discuss the five key ensemble techniques (Voting, Stacking, Bagging, Random Forest, and Boosting) and will attempt to represent them using a simple graphic.

Read More

Traffic Conditioning

Speed Limit

Often there would be a need for an ISP to prioritize or delay a set of packets. Sometimes this is done to enhance the user experience, and other times to up-sell a set of their services. For example, VoIP & HTTP data must get priority over FTP & P2P data, so that the user experience is good. ISP’s might want to set hard limits on some applications, for example no more than 5 mbps for FTP data. Some ISP’s would offer differentiated services, and up-sell higher bandwidth for online gaming to their subscribers. And almost always, the ISP’s would limit the bandwidth on a per client basis, based upon the plan sold to the subscriber.

Read More