Summary
This chapter concludes our journey into the design patterns in Kotlin. Vert.x uses actors, called verticles, to organize the logic of the application. Actors communicate between themselves using Event Bus, which is an implementation of the Observable design pattern.
We also discussed the Event Loop pattern, how it allows Vert.x to process lots of events concurrently, and why it’s important not to block its execution.
Now, you should be able to write microservices in Kotlin using two different frameworks, and you can choose what approach works best for you.
Vert.x provides a lower-level API than Ktor, which means that we may need to think more about how we structure our code, but the resulting application may be more performant as a result. As often happens, it’s a tradeoff between performance and developer experience. Do you want to work with a database in a typesafe manner? Looking for the most idiomatic Kotlin framework? Then pick Ktor. But if you...