I am building an application using microservice architecture. It has five Rest API and one UI(single page application) microservices.
Could anyone advise me which is the best option to do the data aggregation?
We aggregate data from many different sources such as the US Census, County tax assessor's offices, NCES, FBI, NOAA, to name just a few. Most often, we aggregate data from one or more time periods (months, years) to a set of geographic areas (ZIP codes, neighborhoods or counties).
Using messaging to exchange lightweight data structures, often via a message broker that manages sessions and data queues. Via a shared data store, where the service might not communicate directly, but share a common source of information. Exchanging RESTful data, similar to the way they communicate with clients.
It sounds like the pattern you are looking for is API Gateway. Sometimes also called "Edge" or "EdgeService". It can be used to as a single entrypoint to your cluster and to aggregate service call results. Other use cases include central authentication and/or authorization as well as routing, monitoring and resiliency.
Some people only route external calls through a gateway, others route also internal calls through the gateway.
Here some technologies to look into:
Zuul from the Netflix stack. You have write a filter for aggregation. See this document.
Amazon API gateway - If you are running on AWS. You would typically use your own lambda service for aggregation.
Kong. Doesn't have native aggregation support, but you can forward to a separate aggregation service that you provide.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With