We need to build reports in our system. We can't build them online on tables, because of 2 reasons:
- Complicated logic
- We want to move reports to another system (just publish some facts them and they build reports)
So, we need to collect facts about user actions. Today we have some job, that analyze CDC changes. But this approach has some problems:
- CDC change is not a fact we need, we must do some operations
- Slow processing of CDC changes
But it helps us to collect all actions (even made by sql update script) and it's async (has no influence on user operation perfomance).
Another way - collect facts on Business Logic layer, and send them to another system or save to table. But it's synchronously operation, and difficult to collect facts made by sql scripts.
So, what is the optimal way to do it? Requirements:
- Collect all changes/facts (even made by sql scripts)
- Has little influence on user operations perfomance