Microservices on your mind with Github (Short and Precise)

Software Engineering

Hi all, My name is Mayank Maheshwari and I am on the path to becoming a better technical person.

# Microservices Microservices is a process of decoupling modules(functionality in programming) from each other and use each module independently.

Let's take a real example of world-class McDonald's service, do you know that McDonald's prepare burgers in 1 min. If you don't you might think of it as microservices. McDonald's assigns each employee with a single task and each employee can work independently and thus produces fast and accurate results so as microservices.

If you still didn't get any idea about Microservices, take the example of Github. Github is a platform to track changes in the repositories(folders that may or may not contains files) with help of GIT(a version control software).

# Monolithic Github uses the master branch to keep track of all the files and folders, It's called a monolithic (system or architecture) i.e. that contains everything in a single container.

# Why we should use Microservices instead of Monolithic From the Github Monolithic system, if we want to add some functionality and see that in production, we should do something like committing (add or change codes). Two downsides of committing the code in the master branch are undefined of whether it can affect or not other parts of the code and the complexity it can produce after the change. That's where we should use branches (microservices) in which we don't have to commit changes in the master branch, rather, we can make separate branches for independent development and testing so that after changes we can be assured of its correctness.

# Benefits of Microservices

1. Fast production- Large teams works on complex projects, microservices help them breaking complex work into small independent units.

2. Replacing Orthodox System- Microservices also helps in readable code structures, independent testing, and introducing new technologies like MVC (Model, View, Controller).

3. Reliable Softwares- Microservices maintain independent codebases so that each works independently without affecting others.

4. CI/CD- You heard it in DevOps, right? Same applicable with microservices as every independent codebase can be used to integrate and delivered at the production level through compilation, acceptance, capacity, and explorative tests.

5. Robustness- When a memory leak exists in a microservice, only this microservice is affected and crashes. The other microservices keep running.

# Trade-Offs of Microservices

1. Increased Attention- You have to monitor, test, and deploy several microservices.

2. Increased Latency- Many numbers of microservices lead to an increase in delay of sending and receiving data across all networks.

Thanks a lot for reading. Suggest anything you like or dislike.