Articles tagged with
coroutines

24 Jan 2022

How do coroutines work internally in Python?

Most of applications we create are basically loops. An average program waits for an event, then processes it following some business logic. Afterwards it begins waiting for another event to arrive. Java Servlets work this way too. Popular frameworks such as Spring allow us to only care about the business logic, while the framework takes care of the application main loop.


10 Feb 2020

Making Webflux code readable with Kotlin coroutines

Recently, our crucial microservice delivering listing data switched to Spring WebFlux. A non-blocking approach gave us the possibility to reduce the number of server worker threads compared to Spring WebMvc. The reactive approach helped us to effectively build a scalable solution. Also, we entered the world of functional programming where code becomes declarative: statements reduced to the minimum immutable data preferred no side effects quite a neat chaining of method calls causing it easier to understand.