Today, IBM announced a new collaborative development initiative with Lightbend, a provider of a reactive application development platform for building distributed apps. When trying to learn more about that platform, I found a great presentation from the Lightbend CTO Jonas Bonér where he describes the concepts behind reactive microservices.
- Building microservices is relative easy. The more difficult part is everything that happens between the services in distributed systems. That’s where orchestration frameworks like Kubernetes and the Lightbend platform come to rescue.
- Microservices should minimize synchronous invocations (for example, through REST) for intra-microservices communications to ensure the best possible isolation and autonomicity. Instead, developers should consider using asynchronous communication between the services. This is why reactive libraries like the ones from the ReactiveX programming family and streaming projects like Kafka and gRPC have become so popular.
- I also like Jonas’ statements about state. Sometimes when reading about cloud native apps it feels like you should not have any state. But as Jonas points out you need state and if you don’t handle it in your service, some other component needs to do it for you, which makes it worse.
I’ve used reactive programming in an Angular app over the last year and really like the observer pattern and such. It has helped me to structure my code much better and isolate different services/components from each other. In my Angular app this mechanism works nicely together with Redux and the concept of functional programming.
I’m keen to learn more about reactive programming for back-end services. If you want to find out more about reactive microservices and the Lightbend platform you can attend this webinar and try their technologies.