I’m writing some code for a local conference about Kotlin and Vert.x integration.
Maybe it is possible to switch from callback hell to actor style, i wrote some code about this.
This is the reference:
Because the actor must elaborate messages sequentially, I managed backpressure of Vertx ReadStream: when a new message arrives the stream is paused, after message elaboration the stream is resumed.
The concurrency is around the actors, not inside the actors.
Disclaimer: the code isn’t fully working and it is designed only for demostrative purpose. Please share your feedback about it. Thank you.