1
votes

I recently started a project that involves the development of a microservices architecture with Spring Cloud and Netflix OSS. The microservices are RESTful and produce JSON responses.

The goal is to compose the JSON results of each microservice (they may be dependencies among them, e.g. Service_B needs the output of Service_A in order to complete its computation) and present it to the end-user with a UI (i.e. Angular.js single page).

As a reference, I followed the guide of callista enterprise, in which the composition of three sample microservices (product, recommendation, review) is done by another microservice called "product-composite" that basically performs a sequence of http calls to the other microservices.

At this point I'm a little bit confused about this composition/orchestration approach since it does not scale and requires a substantial change each time a new microservice is added to the architecture.

The question is: what is the best/appropriate approach to compose/orchestrate microservices in a structured flow?

I looked for composing each service in a single Angular.js page but I'm concerned about exposing each microservice to the outside, since the desiderata is to call a single API endpoint (let's say /report) and obtain the whole computation required.

Another option seems Spring Integration but I cannot find documentation that clarifies how to map this kind of architecture with this technology.

Any tips, guides, references and suggestion will be really appreciated. Thanks for your support.

Luca

1
Why do you think that it will not scale and you need to change a lot when a service comes in? - daniel.eichten
Yes, please describe how it doesn't scale. - spencergibb
Hi guys thanks for the response. Well in fact I'm concerned about this approach in the sense that, in the tutorial that I followed the product-composition service performs a sequence of blocking http requests to the other microservices before giving the result. Isn't this approach inefficient in the case of a complex chain of calls (a sort of bottleneck)? On the other hand, if a new service is included, I need to change the code of the composition service. Do you think that my reasoning is faulty? - Luca
Any news on that? :) - Luca

1 Answers

0
votes

Your question centers more around service orchestration and not scaling. There is no denying that if you add more services you will end up changing the orchestration layer - no way around this. For service orchestrations tied to specific UI requirements - please refer the BFF pattern (backend for frontend). Scaling is a different aspect - this is more about the system configuring itself as and when more instances are made available with minimal to NO intervention.