What is MicroService? A modern approach to develop software applications

In this blog, we will explore MicroServices in details. What are MicroServices? Why industry is moving towards Micro Services? So, let's start by knowing MicroServices. With the growing technologies IT industry is moving towards easy scaling, robustness solution and continuous deployment.

Micro Services are a self-contain process which offers unique business capabilities. Micro Services makes complex and large application deployment process easier.

Essentially, microservice architecture is a process of developing software projects as a suite of small, independent services in which each service runs a unique process and communicates through a well-defined, lightweight mechanism to full-fill business need.

Let's understand MicroServices by exploring below topics.
  1. What is Microservice?
  2. Issue with traditional application approach
  3. Microservice Architecture
  4. Why Microservices?
  5. Features of Microservices
  6. Microservices and SOA
  7. Example of MicroServices in Industry
  8. Limitations and drawbacks of MicroServices
  9. Microservices in Azure

1. What is MicroService?

MicroService is an approach to break down large software into independent and loosely coupled modules where each module can communicate with each other.

Microservice is not a web microservice, it is a business logic microservice, a database logic service.

You can define Microservices with below points.
  • Microservices are high-level architectural style and a variant of SOA to develop an application as a collection of loosely coupled services.
  • Microservice is a method of developing software applications which are independently deployable, scalable and runs a unique process.
  • Microservice application isolates functionality into smaller services.
  • Microservices are one of the growing methods of developing software applications.
  • Microservices scales out each service independently across multiple VMs.

2. Issue with traditional application approach

The monolithic application process can be scale up by deploying clones on multiple VMs. A traditional application development has all its functionality within a single roof.

Then what is the issue with that?

  • As your application grows, your code, package, solution size also grow with it, which may cause issues like testing, integration, code analysis, deployment.
  • If you are facing an issue in a particular module and planning to implement in a higher version then complete solution will be affected and that is too big risk. For eg - Your application is in .net framework 3.5 and for some reason you want to use .net framework 4.5 for a single module because of easy implementation. This is not possible, you have to change the framework for your complete project and it is not easy.
  • A single or a minor change requires the deployment of the complete application or that process which in turns include integration, testing, and deployment. This may cost more to deploy a minor change in a single module. 

monolithic vs microservice approach


Here, MicroServices comes into the picture. Let's understand this by below image.

In below image, each colored boxes represent a set of a process of logic.

Let's take an example of a banking application. Below modules combination make a banking application.

1. Credit and Debit
2. Check Balance
3. Customer Management
4. SMS/Email Alert

In traditional application development, a process is a set of multiple logics. A change in a single logic for eg Credit or in Debit requires testing and deployment of full application which puts your production application at risk.


microservice benefits

3. Microservice Architecture

As we know Microservices segregates the functionality into smaller services. Now, look at below image, each colored boxes are small services which run independently. In Microservice, scaling can be possible by deploying each service on multiple VMs with multiple instances.

microservice architecture

4. Why MicroServices?

As we all know that "invention is the mother of necessity". Same condition apply on MicroServices introduction in IT industry.

Project scalability is the major challenge for every software project and MicroService made it easier.

MicroServices could be a good choice to develop an application because of below reasons.
  • Loosely coupled
  • Independent and focused on task
  • Language neutrality
  • Single or small distributed system
  • Quick and Easy deployment
  • Easy to understand code
  • Easy debugging
  • Easy Scaling and integration with third party api/service

5. Features of MicroServices

  • It consists of smaller services.
  • Each service communicates with other services or processes using protocols like HTTP or HTTPS
  • Each Microservice must be deployable independently.
  • MicroServices can be scale-out independently i.e. scale-up what needed.

6. Microservices and SOA

SOA (Service Oriented Architecture) is all about a distributed system in a larger context whereas Micro Services offering distributed system in a smaller unit which runs independently. SOA is the standard that IT industry follows to develop distributed application. Although SOA is a smart approach to develop distributed applications but SOA pattern lacks in cloud computing in context of scaling, deployment.

7. Example of MicroServices

Netflix, eBay, Twitter, Amazon, Paypal are one of those large scale web applications which have already evolved from monolithic to MicroServices architecture.

8. Limitations and drawbacks of MicroServices

Although, MicroServices have advantages over traditional monolithic approach but there are few drawbacks of Micro Services too.

  • Multiple modules, component management can be tedious task sometimes.
  • Micro Service require more co-ordination and communication.
  • Testing could be little bit complex as the applications is distributed in a broader area

9. MicroServices in Microsoft Azure Cloud

Microsoft Azure offers Azure Service Fabric which is a distributed platform to manage MicroServices in cloud. Azure Service Fabric makes it easy to package, deploy and scale Microservices. Azure Service Fabric provides a lightweight and sophisticated distributed build which is easy to scale in Azure Cloud environment.
I will focus on Azure Service Fabric in my upcoming blogs.

Watch a flash video about MicroService.


If you like this blog on Microservice, then please like us on Facebook or subscribe this blog.

You may read some popular blogs on SharePointCafe.Net

Comments

Popular

SharePoint Interview Questions and Answers

Calling ASP.Net WebMethod using jQuery AJAX

What is Cloud Computing - A guide for beginners

How to Crop and Upload image using JQuery