What is microservice? Who invented it ??
Tags: microservices
Published: 2023-07-22 11:03:09

##Microservices are a software architecture patterns.
These patterns are used to design and develop applications as a **collection of small, loosely coupled, and independent services**. In this approach, an application is divided into multiple individual services, each responsible for performing a specific function or feature.

There is no single inventor for microservices, but there are many claims for it. As per wiki, in early 2005, Peter Rodgers introduced the term "Micro-Web-Services" during a presentation at the Web Services Edge conference. 
The term "microservices" gained popularity in the early 2010s.

Actually, microservices pattern is influenced by many other architectural patterns. If we look into different architectural pattern we have, we will observe it.

##Below are few key influencers 

**1. Service-Oriented Architecture (SOA):** SOA is an architectural style that dates back to the late 1990s. It promoted the **idea of building applications as a collection of loosely coupled services**. While SOA and microservices share some similarities, microservices are considered a more granular and lightweight approach.

**2. Domain-Driven Design (DDD):** Introduced by Eric Evans in his book "Domain-Driven Design: Tackling Complexity in the Heart of Software" in 2003, DDD focuses on **modeling software systems based on the business domain**. DDD principles have influenced how microservices are often organized around specific business domains.

**3. Continuous Delivery and DevOps:** The rise of continuous delivery and DevOps practices in the mid-2000s encouraged a more agile and automated approach to software development and deployment. These practices paved the way for the **idea of developing and deploying small, independent services**.

**4. Representational State Transfer (REST):** RESTful architecture, proposed by Roy Fielding in his 2000 doctoral dissertation, provided principles for designing networked applications. **RESTful APIs are commonly used in microservices to enable communication between services.**

##Characteristics of Microservices

**1. Modularity:** Each service represents **a distinct and self-contained module**, which can be developed, deployed, and scaled independently of other services.

**2. Independence:** Microservices **can be written in different programming languages and use various technologies**, making it easier to choose the best-suited tools for each specific task.

**3. Decentralization:** Unlike traditional monolithic architectures, microservices promote a decentralized approach, **where each service handles its own data and business logic.**

**4. Interoperability:** **Communication between microservices** usually takes place via well-defined APIs, making it easier for them to work together and interact with one another.

**5. Scalability:** Since **each service operates independently**, it allows for **better scalability and performance optimization**. You can scale only the services that require more resources, rather than scaling the entire application.

**6. Resilience:** Microservices can improve the resilience of an application since the **failure of one service doesn't necessarily bring down the entire system**. **Fault isolation** allows other services to continue functioning.

**7. Continuous Deployment:** Microservices facilitate continuous deployment and integration since **each service can be developed and deployed independently** of others.

However, implementing microservices also introduces some **challenges**, such as **managing distributed systems**, handling **communication between services**, and dealing with potential **data consistency** issues.

Microservices are particularly popular in modern software development, especially in cloud-based and large-scale applications, as they offer greater flexibility, scalability, and the ability to adapt to changing business requirements.