简体   繁体   中英

Storing large dynamic database on ios device or just make rest api calls?

I am creating an app for an existing website. Website is similar to IMDB, Netflix so there is large database with film,actors,users,ratings etc. I am just wondering what would be more efficient way to access the data, should I store part of the film data in the local storage or relay entirely on Rest api calls to retrieve the data. Data is being updated quite often and I guess this would require update off the app local database on regular basis.

Any advice is appreciated. Thanks

I think that the best approach for you is just to pull the data when needed. Each user only search for maximum 2-3 movies or so right? Because the data is updated in regular bases, so he could check out a movie (with ranks and such) and after 5 minutes the local data is no longer updated, so he will need to pull it again, so the best way I think is to grab the data each time.

Good luck!

Why don't you use both method? When user request a specific information with REST api, store the data in the local storage. Just update the local data when the data on server side is updated.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM