Skip to content

Commit

Permalink
Merge c95c7fd into 3241c34
Browse files Browse the repository at this point in the history
  • Loading branch information
AmandaKhol committed Oct 22, 2020
2 parents 3241c34 + c95c7fd commit 14f4b2e
Show file tree
Hide file tree
Showing 5 changed files with 56 additions and 1 deletion.
Binary file added docs/imgs/Microservice_Architecture.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/imgs/productivity_martin_fowler.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion docs/index.md
Expand Up @@ -13,7 +13,7 @@ microservices with Python which handles cross-cutting concerns:
PyMS is powered by [Flask](https://flask.palletsprojects.com/en/1.1.x/), [Connexion](https://github.com/zalando/connexion)
and [Opentracing](https://opentracing.io/).

Get started with [Installation](installation.md) and then get an overview with the [Quickstart](quickstart.md).
Get started with an [Introduction to Microservices](microservices.md) and then the [Installation](installation.md). Get an overview with the [Quickstart](quickstart.md).

## Motivation

Expand All @@ -38,6 +38,7 @@ Nowadays, is not perfect and we have a looong roadmap, but we hope this library

## Index
* [Installation](installation.md)
* [Introduction to microservices](microservices.md)
* [Quickstart](quickstart.md)
* [Configuration](configuration.md)
* [Services](services.md)
Expand Down
53 changes: 53 additions & 0 deletions docs/microservices.md
@@ -0,0 +1,53 @@
# Introduction to Microservices

Typically, the application structure is based on a monolithic architecture scheme. In this architecture, all the elements implemented are included in a single application. The monolithic architecture has some disadvantages, such as it becomes more difficult to solve problems and add new functionalities as the application grows. The microservicies architecture pattern is proposed in order to solve these problems.

![Productivity](imgs/productivity_martin_fowler.png)

*Figure 1: Microservice vs Monolith architecture. Source: [Martin Fowler](https://www.martinfowler.com/bliki/MicroservicePremium.html)*

## What are the microservices?

Microservices - also known as the *microservice architecture* - structures an application as a collection of services. The idea is to split the application into a set of smaller, interconnected services instead of building a single monolithic application. Thus, each microservice is a small application.

Ideally, a microservice or service has to be specialized in solving the problems of a single domain using the best available technology. In addition, each service must have an API in order to facilitate communication and interaction with the other microservices. The microservices architecture propose a new type of relationship between the application and the database. Instead of sharing a single database schema with other services, each service has its own database schema. Having a database schema per service is essential if you want to benefit from microservices, because it ensures loose coupling.

Normally, the communication with the client is mediated by an intermediary known as an API Gateway. The API Gateway is responsible for tasks such as load balancing, caching, access control, API metering, and monitoring.

![Application implemented following the microservices architecture](imgs/Microservice_Architecture.png)

*Figure 2: Example of application implemented following the microservices architecture. Source: [Microservices.io](https://microservices.io/)*

Companies using microservice architecture: Netflix, Amazon, Ebay, Uber, Sound Cloud, etc.

## Beneficts

* If one microservice fails, the whole system does not crash
* Facilitates scalability of the application.
* Gives developers the freedom to independently develop and deploy services.
* Different programming languages can be used in different modules.
* Easy to maintain, modify and reuse.
* The most recommended technology can be used for each problem.
* Easy to scale and manage development teams.

## Disadvantages

* Testing can be difficult due to distributed deployment.
* If the design is not done properly, this architecture could lead with latency problems, load balancing, etc.
* High memory consumption
* Complexity in integrating and managing a large number of services.
* The members of a development group must have good background training.


## Additional resources
1. [Microservices](https://microservices.io/) (ENG)

1. [Microservices Guide by James Lewis and Martin Fowler](https://www.martinfowler.com/microservices/) (ENG)

1. [Wikipedia: Microservices](https://en.wikipedia.org/wiki/Microservices) (ENG)

1. [Workshop Module 1: Introduction to Microservices](https://www.youtube.com/watch?v=jMDufMYAsmw) dotNet (ENG)




1 change: 1 addition & 0 deletions mkdocs.yml
Expand Up @@ -5,6 +5,7 @@ repo_name: GitHub
site_author: Alberto Vara
nav:
- Home: index.md
- Introduction to microservices: microservices.md
- Installation: installation.md
- Quickstart: quickstart.md
- Configuration: configuration.md
Expand Down

0 comments on commit 14f4b2e

Please sign in to comment.