What is the correct way to collect user data in a manner which will enable having it available for model construction (offline) and for prediction (online) in recommendation systems? Assuming that:
- Prediction is done through multiple servers. Servers have some available memory but are considered stateless from a user data perspective. This means that users may interact with different machines during a session and user data should be available regardless of which machine the user has landed on.
- All metadata attached to articles and recommended items (such as classification, article text etc.) is available both online and offline. However, fetching this data requires a db call.
- Some user activity needs to be available for inference fairly quickly while other activity may be available few hours after it happened. For instance, after a user clicks on a recommendation, we would like to make this information available as soon as possible. On the other hand, it’s ok to have longer term browsing behavior data available for inference hours after the user has browsed that content.
- Data for all users is too large to hold in memory while training.
Question: The system should work at massive scale. What are the main technologies and the main data structures that one would use?