Saturday, November 19, 2016

Running HDFS on Opensuse

http://hadoop.apache.org/docs/r2.7.3/hadoop-project-dist/hadoop-common/SingleCluster.html


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

https://msdn.microsoft.com/en-us/library/dn600215.aspx

  • 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

https://spring.io/guides/gs/circuit-breaker/

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 (http://gceasy.io/)
    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 http://fastthread.io/

Friday, June 17, 2016

Compiling and Deploying a CLR Assembly in .net

https://msdn.microsoft.com/en-us/library/ms254956(v=vs.80).aspx

Invoking DLL (C Runtime Library from Java)

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

Download JNA
https://maven.java.net/content/repositories/releases/net/java/dev/jna/jna/4.2.2/jna-4.2.2.jar

Thursday, June 2, 2016

Preparation of TOGAF 9.1

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

http://togaf9part1.blogspot.com/

https://eavoices.com/2013/06/24/hitchhikers-guide-to-togaf-exam-preparation/


Thursday, May 26, 2016

Programming Principles

http://webpro.github.io/programming-principles/

http://www.artima.com/weblogs/viewpost.jsp?thread=331531

Generic

  • KISS (Keep It Simple Stupid)
  • YAGNI
  • 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

Module/Class

  • 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