I've recently started learning about microservice architecture. API gateway is a pattern usually proposed for aggregating data from different microservices which own their data stores. However I wasn't able to find anything about being able to do that in a configurable way.
Scenario: Customers should be able to define reports that use aggregated data from different microservices. This should be configurable by not changing the underlying source code.
Possible solution in monolithic architecture:
- Based on customer needs custom SQL Query kept in JSON file is prepared that feeds data to Reporting Framework.
Possible solution in microservice architecture I can think of:
- Having another Reporting microservice using events for synchronization on top of a Data warehouse where we keep information from other microservices. Then we can use simmilar solution as in the monolithic app.
Is there any other way of achieving this? If not are there any patterns ,frameworks , things to consider that can be useful in this scenario ?
Regards
-
1Your solution is pretty close to the right one - generally speaking the right approach is for your microservices to raise relevant events and for something to aggregate those events into the appropriate data structures for reporting.Ant P– Ant P2018年11月13日 14:06:41 +00:00Commented Nov 13, 2018 at 14:06
-
@AntP Have you seen somewhere an implementation example of such an approach ?cah1r– cah1r2018年11月21日 09:44:19 +00:00Commented Nov 21, 2018 at 9:44
1 Answer 1
At our company we are using peekdata.io Data Gateway API and Report Builder that let’s us expose data from several our databases to end users and developers internaly. I think it solves your problem or at least, I would look for a similar solution. We can change and grow the data structures internally, while the users can use the data without changes to them. Have a look, maybe it is not something you are looking for after all.