Building a faster server side system in a micro-service architecture using Async IO
Vignesh R (~vignesh80) |
In today's world micro-service architecture is prevalent in any firm. When there is a need for micro-services to communicate we achieve it through REST calls or any network calls. Imagine a system where a micro-service has to call another micro-service 30-40 times in a single request. This would be a synchronous execution where the calls are sequential and the control in the main micro-service is paused until the called micro-service responds. But imagine if we could make this asynchronous and let the main micro-service do its part and let the control pass back only after the response is received. That is if a micro-service wants to make 40 api calls, it will place the 40 api calls without waiting for the response of each api call and the response is processed once it is returned from the server. This can be achieved with the help of Python's Asyncio Package. Note it is not thread implemented. It works under the concept of event loop and with async/await keywords.
Knowledge in Python and Micro-service Architecture.
I am Vignesh. Working as a Senior Software Engineer in Kissflow. I am Passionate about Programming especially programming in Python.