You need to design a data architecture where
- data is becoming immediately available for analytics and visible on the dashboard after saving (less than 1 minute delay)
- there is a guarantee that even if there is a glitch and some data is lost in the process where we make the data available for analytics immediately, eventually we fix it and make that data available there anyway (less than 1 hour of data inconsistency)
- ML model is periodically retrained
- ML model is retrained only on consistent data
- analytics dashboard has access only to a subset of data
- analytics dashboard doesn't recalculate all aggregates every time it's opened
- information on the connections between files and pieces of data in the service database is stored in the very same database (e.g., if we process mortgage applications, every mortgage application stores a list of relevant files and paths to them)
- data in the service database and in the folder is not used for analytics and ML training directly as it can affect the web application performance