The Microservice Architecture

Microservices is yet another new term that is been talked about much by many in the IT arena. There has been many projects which use this style of architecture in building enterprise level applications. There have been many positive results and feedbacks regarding the microservice architecture.

The microservice architectural is an approach where we develop a single application as a suite of small services, each running in its own process and communicating with lightweight mechanisms. Each services are built around business capabilities and these are independently deployable.

 

SOA vs Microservices

Many today say that Microserivces is just another name for SOA architecture pattern. Well that could be true in one way but not really. Yes there are certain similarities between SOA and microservices. The SOA architecture is a broader framework. Some experts even consider that microservices is just a subset of the whole SOA architecture.

Normally SOA uses dependent ESB’s, whereas microservices use faster messaging mechanisms. SOA also focuses on imperative programming, whereas microservices architecture focuses on a responsive-actor programming style. Today there is a high demand for Scalable, adaptable, modular, and quickly accessible cloud-based applications, so many developers prefer using the microservices approach in building high end enterprise level applications.

 

Monolithic vs Microservices

The natural way and the most use way for building enterprise level applications have been the monolithic way. All the logic for handling request runs in a single server. One can horizontally scale the monolith by running many instances behind a load-balancer. Using the monolithic approach of developing an application can be very successful, but makes the life a developer so stressful. Change cycles of a monolithic applications are tied together. So making a small changes means it requires the whole application to be rebuilt and deployed.

The solution-

Define a new architectural pattern which structures the application as a set of loosely coupled, collaborating services. These services using synchronous protocols such as HTTP/REST. Each of these services could have its own databases as well. So that it can be more decoupled from other services.

pic1pic2

Java-EE-Microservices-2

Example of a Microservice architecture

One of the main industries that use the microservice architecture is the e-commerce industry. A normal e-commerce application consists of a store front with some backend services for checking credit, maintaining inventory and shipping orders. Having microservice architecture for this kind of an application will be reliable.

Microservice_Architecture

This has many benefits

  • Each microservice is relatively small, so it speeds up the application start time.
  • Services can be deployed independently of other services.
  • This helps to scale further development.
  • Each service and be developed and deployed independently.

Deployment patterns of Microservices architecture

  • Multiple service instances per host.
  • Service instance per host.
  • Service instance per VM.
  • Service instance per Container.
  • Serverless deployment
  • Service deployment platform

Applications that use microservice architecture

  • Netflix
  • eBay
  • Amazon
  • The UK Government Digital Service
  • com.au
  • Forward
  • Twitter
  • PayPal
  • Gilt
  • Bluemix
  • Soundcloud
  • The Guardian
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s