After having comments and login, there will be data consistency issue. For example, upvoting in Comment View doesn't update the view in Home Feed View. By introducing Room, and by using Rx subscribing to the same Room item, the view will be updated automatically. Otherwise, we need to use some sort of EventBus which can be abused if not used properly.
Besides, Room can also serve as an offline cache. This is by no means a full blown offline support, it will simply show the last known data when offline. But mainly Room should be used as the cache to keep data consistency across the app.
Reddit data model comes with a unique id, that can be used as the primary key.
Migration strategy should be set to drop everything to prevent crash during schema change, since this is only for caching, we don't need to perform migration.
After having comments and login, there will be data consistency issue. For example, upvoting in Comment View doesn't update the view in Home Feed View. By introducing Room, and by using Rx subscribing to the same Room item, the view will be updated automatically. Otherwise, we need to use some sort of EventBus which can be abused if not used properly.
Besides, Room can also serve as an offline cache. This is by no means a full blown offline support, it will simply show the last known data when offline. But mainly Room should be used as the cache to keep data consistency across the app.
Reddit data model comes with a unique id, that can be used as the primary key.
Migration strategy should be set to drop everything to prevent crash during schema change, since this is only for caching, we don't need to perform migration.