The Difference between Web Services and Micro Services

Micro Services and Web Services are two different concepts of Application Development Architecture.

What is Web Service?

Web Service is a connection technology, a way to connect services together into a Service Oriented Architecture (SOA). It is a service which exposes an API over HTTP.
Web Services allow applications developed in different technologies to communicate with each other through a common format like XML, Jason, etc. Web services are not tied to any one operating system or programming language. For example, an application developed in Java can communicate with the one developed in C#, Android, etc., and vice versa. 

What is Micro Service?

Micro Service is independently deploy-able service modeled around a business domain. It is a method of breaking large software applications into loosely coupled modules, in which each service runs a unique process and communicates through APIs. It can be developed using messaging or event-driven APIs, or using non-HTTP backed RPC mechanisms.
Micro Services are designed to cope with failure and breakdowns of large applications. Since multiple unique services are communicating together, it may happen that a particular service fails, but the overall larger applications remain unaffected by the failure of a single module.

Example

Let us understand these concepts with the help of an example of Online Shopping Center.

Monolithic Architecture

 Here are few points to note :

1. A single web service is communicating to web application and database.
2. Failure of web service will cause to stop the entire application
3. All the modules are built in single EAR (Enterprise Archive)

Micro Services Architecture :

Here are few points to note :

1. All the components of the web application are developed independently, single functional responsible, fine-grained clearly scoped services.
2. Failure of one component will not cause to stop whole application


Here are few points to note :

1. "micro" in Micro Services, the basic concept is that each service performs a single function.
2. Applications built as Micro Services can be broken into multiple component services and this service can be a Web Service, which should run unique process and then redeployed independently without compromising the integrity of an application.
3. In a monolithic service oriented architecture deployment, each small change meant that the entire monolith needed to be rebuilt and this, in turn, meant that re-builds weren't happening as rapidly as they should.

 

Comments

Popular posts from this blog

SQL basic interview question

gsutil Vs Storage Transfer Service Vs Transfer Appliance