Android – changes the repository schema of data on the server over time

I am paying attention to the clean building proposed by the famous Robert C. Martin. The aerial view of the clean building is as follows:

Strictly follow the above steps. If there is data in the local data source, the data in the remote data source may never be synchronized from the remote data source. How to modify it to process this case? I came up with an idea, but I hope to find a better solution

My idea is to track the last synchronization time of each record in the local database. If the last synchronization time exceeds the threshold time, it will be synchronized automatically

resolvent:

With the help of rxjava, your idea is in line with what we are using: Dan Lew nicely explained at

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>