Answer the question
In order to leave comments, you need to log in
Question about photo gallery architecture
I am writing something like a photo gallery and would like to upload all the original photos to the "cloud", the thumbs remain on the server.
In this regard, the question is:
Use-case: The user wants to download 3 original photos.
In such cases, either download one at a time, or zip on the server and give the archive.
One is not interesting, we give the archive.
Option 2:
1. zip on the server and upload from there
2. zip on the server, upload to the cloud and upload from there
What is better? Are there other options? Or even score on the clouds?
Answer the question
In order to leave comments, you need to log in
Have you figured out how the user will choose these three pictures? If he wants to erase the first and last? This question should be considered before zip, otherwise your zip will go down the drain without a choice. Or will you show all the pictures at once? What if there are a thousand of them?
if everything is on different servers ...
then maybe
make archiving a separate operation from downloading. that is, make queues
- the user presses to download, he is given: wait, the link will appear / or come to his mail.
- the record gets into the queue - that such and such pictures need to be archived
- a certain script is launched (whether by cron, it doesn’t matter), reads the queue, performs archiving tasks, and updates the record in the queue that the archive is ready
- another script (by cron, or by Ajax request - which is not very scalable) selects ready-made archives from the queue and sends the user a link to the browser, or to the mail.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question