Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where is the best place to do data aggregation for UI in microservices architecture

Tags:

I am building an application using microservice architecture. It has five Rest API and one UI(single page application) microservices.

enter image description here

Could anyone advise me which is the best option to do the data aggregation?

  1. Make UI application as a static web application and do all API requests from the front end (from the browser using javascript framework) and all data aggregation do in front end itself and render?
  2. Make UI application as a dynamic web application and do all API request and data aggregation in web application backend?
like image 598
Dinusha Avatar asked May 04 '17 14:05

Dinusha


People also ask

What would be some sources of data for 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).

What is the best way to send data between two microservices?

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.


1 Answers

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.

like image 165
Oswin Noetzelmann Avatar answered Sep 21 '22 10:09

Oswin Noetzelmann