O'Reilly logo

TypeScript Microservices by Parth Ghiya

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Reactive programming to up the odds

In order to make sure that we don't have to frequently change the client code, the API Gateway simply routes the client request to a microservice. It may make other requests by making multiple backend service calls and then aggregate all the results. In order to make sure that there is minimum response time, the API Gateway should make independent calls concurrently which is where a reactive model of programming comes into the picture. API Composition is needed in various cases like fetching the users past orders, where we first need to fetch the user details and then their past orders. Writing compositional logic using traditional asynchronous callbacks will soon lead to the problem of callback hell which ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required