In Chapter 1, Introduction to Microservices, you learned that microservices are a single unit of autonomy. They exist in systems to form one large, usable application. Though it is important to have the appropriate communication protocols and coordination among them, it is equally important for each one to be solidly built internally. Therefore, we need to focus both on the inside world of microservices, that is, its internal implementation, and the outside world, that is, collaboration with other microservices.
We will introduce an important paradigm that can be applied to both the inside and outside world of a microservice. Although, in this chapter, the focus will only be on the inner implementation, and we will cover the following topics:
- The essence of being asynchronous and non-blocking
- Asynchronous code using Scala futures and promises
- Work...