Obviously this is not all you are looking for, this will provide you a basic idea of connecting a mongo DB using java. The easiest DB connection so far I have seen is this. All you need to do is download the driver class or include it in your pom dependency and create a main class with two method calls.

We keep hearing about this new thing called IoT and Big Data. Let’s discuss the primer for today. I will try to give my understanding of IoT ( Internet of Things). There is nothing new about Internet. We all know what is internet and how we can use this for our daily life. The simplistic definition would be, we can’t imagine the life with out internet. It is part of our life. I love this image, which says “Internet is our basic need”.

Internet – Basic Human Need

Courtesy: Google ( I really don’t know who created this image)

Now, let’s get to our main point of today – IoT

Now, we are talking about Machines coming into Internet. So, each and every Machine/ Device / Thing will be connected to Internet. Let me try to give some real example I felt in my life. When I switched my internet vendor /Provider 2 years back the guy told me our Wi-Fi router can support 10 devices. I really felt 10 is too many that time as I was having only 1 smart phone at that time and 2 laptops. If I look back the same thing now, 2 smart phones (me and Wife), 1 tablet, 2 laptops, 1 kindle and the list may go up very soon… like Smart TV, smart Fridge, smart Air Conditioner, so on…. what all these devices doing on Internet and Why?

Personal scenarios:

Lets take some examples why you need your Fridge / Air Conditioner / TV on internet.

You have started from your office at 5 in the evening of a summer day. you need to travel 30 mins to reach home, you want your house cozy before you reach there. If your A/C is in internet, you would be able to switch it on when you start through your smart phone.

Your colleagues asked you for a party which is planned suddenly in office today. You want to have ice cubes ready before you get your friends home. If your Fridge is in internet, you would be able to set temperature before you start from office, and your ice cubes will be ready for the party.

Business Scenarios:

Lets think you manufacture a UPS/ Cooling unit/ Fridge / TV etc, if you don’t have this smart feature in your product there could be potential problems as below. Firstly customers might not be interested to buy your product as competitors already provide this feature for little more price. Whoever could effort little more money would buy that. Secondly, you won’t be able to analyse your product correctly. If you have this feature in your product you would be able to receive statistics of your product every second or minute. This will enable you to understand the usage of your product more and the problems in your product as well. So, You would be able to serve your customers what they are looking for.

So, As you know this is not a new thing at all. We already use this for many things in our real life. IoT is the new term tossed by industry to popularize this M2M (Machine to Machine) connectivity.

Reference: Here are some really good articles about IoT you would like to read.

In my previous post I explained the characteristics of cloud computing, perhaps people say if you know something very well you should be able to explain the thing to your granny. If you could do it successfully then you know about this technology well.

I consider this correct, So I gave this attempt. Lets hope this will workout well for you as well. I hope this would be useful for some of you as well in understanding the concepts.

Lets discuss about the Service Models of Cloud computing. IaaS, PaaS, SaaS.

If you have to build a house, what is that you need before you start constructing the house ? Foundation – which is the basic need to build in our case this is If you don’t have sufficient infrastructure at your end, you will hire the Infrastructure from these cloud companies.

If you don’t have sufficient time and energy to build the foundation of the house, you will hire the labor to build it and pay them hourly basis. The same way you will pay for the infrastructure you have used either based on the number of cores / memory utilized.

If you don’t want to build house or you don’t have budget to build a house what you would do? Most likely you would rent a house … right ? This is much cheaper option and you will get a ready house where you can live in immediately. still you might have to spend some money on furniture like Sofa, Fridge, TV, etc.

In the same way, the service provider would provide you the platforms like Google App Engine, Microsoft Azure, Red Hat’s OpenShift, provides the platform to you where you can write your own Apps and add-ons using given platform. These platforms offer you the basic building blocks for you to start your work quickly and scale easily.

If you take the previous example, you might think of taking a fully furnished apartment for rent. So you don’t even need to develop your own software on the platform. Just use the software and pay as per you use. This again has many models based on the application for charge back, some applications charge per size, some per request etc. Like based on the furniture and amenities you have in your house the rent will be charged. Eg SaaS services are Microsoft’s Office 365, Prezi.com and millions of software.

As part of my learning, I started the SOA ( Service Oriented Architecture ) in the recent past. I started reading some blogs, sites and books about SOA to understand the basics and why we need to go towards SOA for today’s enterprises. I would like to share my ideas and knowledge I got in this process. Hope this would give you some pointers to start your journey of SOA.

What is Service Orientation : Wiki tells us that, this is a paradigm to build software in form of services. We would take it further and can tell – “Think all logically divisible parts of your program as service”. Lets take a real time example for better understanding.

Case: Lets take a house which is having a 1 Hall, 1 Kitchen and 2 bed rooms (of-course couple of bath rooms as well). If you think in terms of services what are the services you could think of to form a house.

Electrical Wiring

Plumbing

Doors

Windows

Taps

Microwave

Fridge

Shower

Etc.

All these things together make a house. So, shall we think all these things as services?

Why not ?

If we have these many services, are we saying our house as SOA implementation ?

Now, what does SOA principles has to say about this –

Very similar to SOLID principles in Object Orientation, SOA has their own SOA principles. We have to look at them and figure out our model is matching with the SOA principles. You might think we already have these services as web services then SOA is the same. Are web service is the only way to achieve SOA ? that is a different question to answer but to be precise the current/contemporary way of implementing SOA is web services (May be in future we might have something different). Anyway, Lets get back to Principles of SOA.

Don’t get puzzled if they look very familiar 🙂

Loose Coupling: The services defined should maintain a relationship that minimizes dependencies, and only requires the awareness of each other.

Service Contract: All services should adhere to a service agreement. This could be a service description of a single or multiple related services. Services should do only whatever is mentioned in the contract.

Autonomy: Services should have a control over the logic they encapsulate. This means that each service should do the specific task and it should not do anything more than that.

Abstraction: Beyond what is described in the service contract, services hide the logic from outside world.

Reusability: Logic is divided into services with the intention of promoting reuse.

Composability: Collection of services can be coordinated and assembled to form composite services.

Discoverability: Services are designed to be outwardly descriptive, so that they can be found and accessed via available discovery mechanisms.

Considering these principles, If you design any SOA system that would be considered as better architecture of your application. So, I feel these are the needs of current enterprise applications. And SOA can give a perfect solution if you are able to see the needs through your Service Orientation lenses.

The Quartz Jobs can be created with a very simple program by just adding the required libraries to the class path of your project. Here I will try to explain two different ways to configure a Quartz job. This complete post is divided into 3 sections.

Step 1: Download the Jars for Quartz either from Maven or manual download.

Step 2: Create a Java project {I am going with older approach}.

Step 3: Refer your downloaded jars in your class path (by Right Click on Project -> Build path -> Add External Archives ) See screen shot below, You could even use jta-1.1.jar instead of jboss-transaction-spi. But don’t miss this jar as this is a mandatory dependency for Quartz 2.2.1.

Note: Once these steps are over either you can choose Section 2 or Section 3. [I recommend Section 3]

Section 2: Simple Job using Java Code

Step 1: Create a class which implements org.quartz.Job interface.

Step 2: Implement execute() method of this interface.

Step 3: Write your business logic inside this execute method i.e. what has to be done when your job gets executed.

Recently, I have been asked to check and deploy a process for Design and Code review in many different projects. All projects already have this process in place either officially or un-officially. When I said process some Engineering managers said, do we really need this as a process? We are already doing it on a need basis, and we have static code analysis tools in place. So, is it worth wasting two developers (Reviewer, Author) for Code review ?

Project Experience [ very important to understand the implications and regressions of the code ] last but not least

Knowledge Sharing

Your list can grow much bigger than what I have written. I feel though you have Analysis tools of your code and they definitely help you improve your code, you need somebody who is senior to you in the project and technically sound to have a look at your code and give you a fair way to improve your code.

In the current world of complex Enterprise software systems, we might not be able to design, build and document the Architecture properly. The Enterprise Architecture Frameworks help us do all these steps efficiently. They provide tools, approaches and processes defined for us to follow and reach our goals efficiently and on time. Brief History of Enterprise Architecture (EA) Frameworks In 1987 John Zachman published a paper on “A Framework for Information systems Architecture” which brought this topic into light and after that many people suggested many different frameworks and altered the Zachman’s proposal. All these frameworks at high level talk about the components which should be streamline the Architecture development and the documentation process. Important Components of Enterprise Architecture frameworks are as below

Provide Architecture vision

Design Business Architecture

Design Technology Architecture

Implementation of Governance

Architecture Change Management

Lets try to understand these frameworks in a bit detail.

Zachman Framework:

The oldest among all these framework is Zachman as he is the one who came up with the idea of Architectural Process to reduce the complexity of existing systems and their integration, as well as the lack of documentation on the Architecture. The highlights of this framework are

Analogy behind this Framework comes from Building Industry (Civil)

Players – Owner (Who pays for the project), Builder ( Who co-ordinates the things) and Control board (Who ensures the construction follows the local regulations)

Focus of the Artifacts: What, How, Where, Who, When and Why, and Players to Artifact mapping. Eg: Owner and Builder should know “What” but only Builder would know “How”. Only Owner might know “Why”.

The matrix of Zachman Framework is as below.

TOGAF (The Open Group Architecture Framework) :

This Framework divides Enterprise Architecture into four different parts based on the expertise on their fields.

Business Architect

Application Architect

Technical Architect

Data Architect

Though this is told as Architecture framework it works mostly as a development method for Architecture. This is a process of creating artifacts for your architecture. This process drives to create proper documents at each phase. Below are the phases involved in the TOGAF process.

So, the above way the life cycle of an Architecture will Iterate. There are some certifications also available for both Frameworks, Check them out if you are looking for one -> TOGAF and Zachman.