Saturday, November 19, 2016

Running HDFS on Opensuse

Saturday, November 5, 2016

Upgrade nodejs via npm

Clean all npm cache from your system forcefully.

sudo npm cache clean -f 

After cleaning all cache from your system, now install n modules using npm command.

sudo npm install -g n 

Install Nodejs – Let’s install or update latest nodejs version on your system using n module

sudo n stable 

Updating npm
Node comes with npm installed so you should have a version of npm. However, npm gets updated more frequently than Node does, so you'll want to make sure it's the latest version.

npm install npm@latest -g

Wednesday, July 13, 2016

Resiliency Patterns

I have gone through the excellent article on application resiliency

  • Circuit Breaker Pattern
Handle faults that may take a variable amount of time to rectify when connecting to a remote service or resource. This pattern can improve the stability and resiliency of an application.
  • Compensating Transaction Pattern
Undo the work performed by a series of steps, which together define an eventually consistent operation, if one or more of the operations fails. Operations that follow the eventual consistency model are commonly found in cloud-hosted applications that implement complex business processes and workflows.
  • Leader Election Pattern
Coordinate the actions performed by a collection of collaborating task instances in a distributed application by electing one instance as the leader that assumes responsibility for managing the other instances. This pattern can help to ensure that tasks do not conflict with each other, cause contention for shared resources, or inadvertently interfere with the work that other task instances are performing.
  • Retry Pattern
Enable an application to handle temporary failures when connecting to a service or network resource by transparently retrying the operation in the expectation that the failure is transient. This pattern can improve the stability of the application.
  • Scheduler Agent Supervisor Pattern
Coordinate a set of actions across a distributed set of services and other remote resources, attempt to transparently handle faults if any of these actions fail, or undo the effects of the work performed if the system cannot recover from a fault. This pattern can add resiliency to a distributed system by enabling it to recover and retry actions that fail due to transient exceptions, long-lasting faults, and process failures.

Spring application which uses netflix hystrix fault tolerance library to provide circuit breaker for a rest method

Friday, June 24, 2016

Troubleshoot Sudden CPU Spikes

Troubleshoot Sudden CPU Spikes

This type of sudden CPU spike usually happens because of two reasons:
  1. Repeated Full GCs
    1. Analyze the GC log file using Universal Garbage Collection Log Analyser (
    2. Capture Heap Dump and analyze the heap memory with Eclipse MAT
  2. Infinitely looping threads
    1. Take multiple CPU dump with the interval of 10 seconds
    2. Analyze using online tool

Friday, June 17, 2016

Compiling and Deploying a CLR Assembly in .net

Invoking DLL (C Runtime Library from Java)

The following example maps the printf function from the standard C library and calls it.

Download JNA

Thursday, June 2, 2016

Preparation of TOGAF 9.1

A good article i came through which would really help me to prepare for TOGAF

Thursday, May 26, 2016

Programming Principles


  • KISS (Keep It Simple Stupid)
  • Do The Simplest Thing That Could Possibly Work
  • Separation of Concerns
  • Keep Things DRY
  • Code For The Maintainer
  • Avoid Premature Optimization
  • Boy-Scout RuleInter-Module/Class

  • Minimise Coupling
  • Law of Demeter
  • Composition Over Inheritance
  • Orthogonality


  • Maximise Cohesion
  • Liskov Substitution Principle
  • Open/Closed Principle
  • Single Responsibility Principle
  • Hide Implementation Details
  • Curly’s Law
  • Encapsulate What Changes
  • Interface Segregation Principle
  • Command Query Separation