Solution Architecture

I have made a formal commitment towards developing myself as a Solution Architect. This blog post will have the links to everything which i have found useful.

Ramblings 2 @ Java

This post is a continuation of ramblings of the past.

Javascript frameworks:

Step back jQuery, it is now Backbone.js , Ember.js and Angular.js. It has to be seen who is winning, though. I have not used any of these in my project but each one of it, looks an interesting prospect. Check out this link to understand the differences. Underscore.js is a powerful complement to Backbone.js/jQuery.

Updated: React is a new javascript framework which looks simpler in implementation and is going to give serious competition Angular.

Security frameworks:

Spring security, Apache Shiro and JBoss PicketBox are in contention here. Spring security has the first mover advantage. But, Apache Shiro is easier to learn and implement. JBoss PicketBox is good for JBoss fans.

Single Sign-on:

It is always good to understand what each framework offers before embarking on a solution implementation. OAuth2 seems to be a preferable option if you are starting now and don’t have a SAML infrastructure already.  For enterprise, SAML still seems to be holding the ground. Learn more here and here too.

Shibboleth provides an open-source SAML implementation of SSO capability.

Source-control, Continuous Integration and Automated Deployment:

There seems to be a new stack for this GitHub + Jenkins + Puppet. A quick reality check of the competitors in each of the spheres is listed below.

GitHub/GitLab/Gitorious: For source control management, GitHub is leading the pack.For a quick differentiation, Check here.

Hudson/Jenkins : Continuous integration server which integrates with a git repository. Jenkins has taken over Hudson, Check here.

Chef/Puppet : Automated application deployment on servers. Puppet seems to be ahead of the race marginally, Check here.

Read this for a typical implementation.

Ramblings @ Java

It was a saturday evening and this led to skimming through my spam mails. It was here, i stumbled upon the release of Spring 4. This led to discovery a whole gamut of terms, concepts and many more. This post is just a collection of the same.

STOMP – Streaming Text Oriented Messaging Protocol. We can build interactive web applications using this protocol.

Micro Service Architecture – Extending Single Responsibility Principle to service level [or] Java Architecture, the UNIX way. To know more, go through PresentationBlog-1 and Blog-2.

CQRS – Command and Query Responsibility Segregation.

YAML – YAML ain’t a mark-up language. A standard for data serialization for all programming languages.

Stove pipe architecture – An anti-pattern; also means legacy software with undesirable qualities. Also, read Stove pipe architecture vs Enterprise Architecture 

CAP Theorem – A distributed system cannot guarantee all three aspects Consistency, Availability and Partition tolerance together.

A treasure-chest for design-patterns, anti-patterns and many more Sourcemaking

Bootstrap – It is a sleek, intuitive, fluid and powerful mobile first front-end framework for creating faster and easier web-development provided by Twitter. It is better than JQuery UI in many aspects and for a few differences check here.

Single page architecture – is a web application or web site that fits on a single web page with the goal of providing a more fluid user experience akin to a desktop application.

Dropwizard – A java framework to build ops-friendly, high-performance RESTful web-services. This helps in building Micro-service architecture.

JDBI  – A SQL convenience library for java to access relational database.

FreeMarker Vs Velocity – Freemarker wins hands-down due to its powerful api





Mediocre Life and Luck factor

It was supposed to be a lazy sunday after a long week in the office. To my surprise, i chanced upon an article on lifehacker which talked about seven effective habits of mediocre life. I could relate to it as a fish takes to water. In this article, James Alutcher concludes, “Being mediocre doesn’t mean you won’t change the world. It means being honest with yourself and the people around you. And being honest at every level is really the most effective habit of all if you want to have massive success.”

All of us, once in a while say “touch-wood”, have you wondered where does it originate?. The reasoning goes something like this: “Touching (“Knocking on”) wood dates back to pagan rituals that were designed to elicit the help of benign and powerful tree gods.” . Richard Wiseman has a wonderful article about luck and the luck factor here. He concludes saying “much of the good and bad fortune we encounter is a result of our thoughts and behavior”.

Handy Linux Commands

Usage Command
Check for the Version of Linux uname -mrs  or
Open file using cat /proc/version or
uname -a [All information]
Check for the Machine architecture uname -mrs
i386 and i686 = 32-bit; x86_64 = 64-bit
Check for the Server release details lsb_release -a
Check the processes running ps fuxxx , ps auxxx
Checking whether a port is open or not telnet <ip_address> <port_no>
Updating access rights to execute a program chmod +x ./<program_name>
Searching for specific text occurrences grep <search_term> *
Checking top 100 lines of a file tail -100f <file_name>
Running a program in back-ground nohup ./<program_name> &
Checking ip address /sbin/ifconfig or ip addr show
Checking which process is cosuming how much top
Checking how much space is available in current drive df -h
Killing a process kill -9
Copying file/directory from a linux server [File]scp <USER_NAME>@<HOST_NAME>:<USR_DIRECTORY>/sample.txt .
[Directory]scp -r <USER_NAME>@<HOST_NAME>:<USR_DIRECTORY>/ .
Clear the screen clear screen
Java Set-up in linux Click here

Jar with dependencies using maven

In the earlier post, though we had dependencies for our jar, we just used them while compiling them. Hence, when we execute our jar, it is required that, they be included in the class-path while executing our jar.

Though, this sounds reasonable enough, there are situations when it becomes tedious to include the dependencies in the class-path every-time you want to run the jar,especially, when there are more than a few dependencies and multiple main-classes. A simpler way is to bundle the other dependent jars in our jar.

Hmmm. This may sound a little off the mark. It is true you cannot bundle the dependent jars in your jar. Albeit, you can include the classes of your dependent jars in your jar. This will solve the problem. Whoa!!! how do i do it?

This can be done pretty easily using Maven in tandem with an assembly.xml. Following are the key points:

a. Use Maven Assembly plugin to assemble the class files in a jar and include their dependencies as well
b. Maven Assembly plugin requires an additional assembly.xml which in turn specifies format e.g. jar and depndency-set
c. Configure the assembly.xml as part of same project and use it from pom.xml using maven assembly plugin
d. Generate one single jar with all dependencies

The sample pom.xml looks like below:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="" xmlns:xsi=""
  <name>My Blog Reader</name>
        <artifactId>maven-assembly-plugin</artifactId><!--1.Use Maven assembly plugin to assemble the jar-->
            <descriptor>src/assemble/assembly.xml</descriptor><!--2.Assembly configuration-->



The sample assembly.xml is specified below:

<assembly xmlns="" 

Useful Links: