Total Views : 309
Updated On : Mon, Feb 19, 2018
As we have understood a bit about micro service term in part 1. Now I will elaborate technically with real time example.
Suppose we are developing an Online Room Booking system. so, first of all, we need to define essential parts and provide services for the application.
Such type system will have multiple modules-
Above I have mentioned main essential things, now we will think about tech system. Suppose there come 1 lac requests for booking, need to send 10 notifications per request and need to update rooms status and make payments secure, it has happened each second. So we need highly available service server. Otherwise, we will lose customers if the system is crashed or make delay responses.
So first we need to split our system services into small jobs and have to develop distributed approach
All above points will have APIs and communicate with different devices like mobile, web browser and internal servers etc. because of Inventory section is not directly related to Notifications and Marketing section is not related directly with Process booking systems. So we will make separate services even hosted on different servers.
Maybe all sections will have different data sources also like NoSQL (Mongo DB) or Relational DB (MS SQL) and to handle the async request by NodeJS environment. For searching need to develop the GraphQL structure to making efficient result and different languages too.
And all APIs will be accessible after called a Gateway API which will check security points and provide Token to communicate with small services APIs.
So main services will be distributed and Gateway API will call for every request to check request is valid and handle load balancing internally. So Gateway API plays role as mediator for security and load balancing at the server level and other API level and it makes request calling optimistic.
To use micro-services structure, increase servers and different modules in an application and need to manage deployment by a system. So it is increased system cost.
So the conclusion is, to make system availability and handle bulk requests without any delay, the system should be developed by micro service concept.
So guys if you are thinking to develop a huge application then microservices are a really good choice. Use them an and make fun.
Thank you for reading my thoughts