Cloud-Native Applications in Java
上QQ阅读APP看书,第一时间看更新

Aggregation by client

Aggregation at the last mile. This applies to web browsers or a reasonable processing capable user interface, which is showing content from various domains. This pattern is typically used in the home page that aggregates various subject areas. Also, it's the pattern popularly used by Amazon:

Benefits

The benefits of using the aggregation by the client pattern are as follows:

  • Decoupled approach at the services layer. Easier for agility and maintainability at each individual service.
  • Faster perceived performance at the UI layer, since the requests, can run in parallel to populate the various areas on the screen. More enhanced when there is a higher bandwidth available to fetch data in parallel.

Trade-offs

The trade-offs associated with the aggregation by the client pattern are as follows:

  • Sophisticated user interface processing capabilities, such as Ajax and single-page application required
  • The knowledge of aggregation is exposed at the UI layer, hence if the similar output was given as a dataset to a third-party, aggregation would be required