I am using ASIHTTPRequest library for my iOS project. My app is about download a ebook (with 150+ jpg files). I have two options:
- Zip all images and just request a single zipped file (around 200MB).
- Request images each by each (it will become 150+ requests).
Which option is the best if I have more than 1000 users request the ebook simultaneously each day?
This is not exactly an 100% answer to your question, but speaking from experience, I believe you will find it helpful.
I did a somewhat similar app once where I was supposed to update (redownload) a very large number of xml files (up to a couple of thousands).
The one-by-one method was rather slow but with a good
NSOperationandNSQueuemanagement, it worked ok, with no UI freezes or crashes on the first iPad. I believe it took me at most 15-20 minutes for the max number of files (somewhere over 5000 operations, with 5 concurrent downloads each), on wifi connection.When I tried the zip method, to see if it would be faster / better, it made the iPad 1 crash due to high memory usage. And the zip size was about 100 mega if I remember correctly
I would suggest you to go with the first option. 1000 requests per day is not such a high number and this way the user doesn’t have to wait for the whole archive to be downloaded, but can read the already downloaded pages without delay.