Knowing how to perform reporting
Reporting is important to the business; to be able to analyze and monitor business outcomes, we must have a good reporting strategy. In most cases, reporting with monolithic applications and databases is a straightforward process. All we do is write stored procedures with complex joins and aggregates on the data to create views of the data. This is not possible in a distributed world; we do not have access to joins as the data is physically separated. So, how do we carry out these complex joins in a distributed microservice architecture? Well, the answer to that question is that we carry out the joins on the application layer in memory, not on the data layer. These joins are conducted in a reporting service using an API composition pattern.
The API composition pattern
A composition pattern calls each of the respective query services of each microservice that queries the database. Then, the API Composer service executes the joins on the data in...