I am working micro service architecture and figuring out what is the best way to get complex data from a micro service. So for example : Let's say micro service A is owning data based on any CRUD operations, there are X,Y,Z services which requires some sort of aggregated info and conditional info from micro service A, what is the best way to go implement it ?
- One could be writing methods in A which generate realtime data and send back to other micro services
- Second could sending events from micro service A to other micro services to update their view of data, and reflect that back to other micro services
FYI I am using mongoDB as data base and node.js as application.