They sure had fun building it though.
They sure had fun building it though.
Ed: I'm an idiot.
If your query was exposed as a REST API you could have easily accessed it via a micro-service. And MongoDB has a pretty powerful and easy to use query language. I could've answered your query in about 5s.
Sounds more like a business or process limitation.
The reality is you don’t need that sort of query exposed as an API, but you do need that data to be exported regularly into a CRM and marketing automation tools.
Let's say the report needs data from across two microservices, one is backed by mongodb and one is mysql, and both services have been crud endpoints but not ones that will give you the full data you need. This is a pretty typical scenario! So you could make new endpoints, but then you still need to "join" the data in code. Or you could set up data pipelines to sync data into into a data warehouse, where you query across everything.
Or you could have kept everything in a monolith, and this would have actually been a 5 second SQL query.