samedi 16 mars 2019

Best approach to design image uploading with scale?

I am building an app which allows users to create posts like twitter. Each post can have upto 10 images attached. I need to store all images in its original size in Azure blob storage but also require 2 smaller size (thumbnail) versions to display previews in the app.

My backend is Laravel (PHP) and the app is android. I have some idea on how to do this but I struggling between many pros and cons of each approach. I am asking this here to know any tried and tested implementation.

Some constraints:

  • Post should only be created after all images are uploaded and thumbnail URL links are generated.

  • User should not have to stay in the app while image uploading/processing is in progress. Idea is to minimize user impact.

  • All images are to be stored in Azure blob storage. Backend service can be used temporarily for the purpose but files cannot be stored in these servers for long.

  • Only the owner of the post is allowed to create the image blobs. But the images can be read by public. This is anyway a functionality of Azure storage and doesn't require any custom work.

Some additional questions:

  • Where is the best places to process images to thumbnails - app or server ?

  • How does Whatsapp/Facebook/Twitter achieve this in their design ?

Let me know if you need any additional details for a better design approach. Please feel free to throw any idea or share any source where I can read up on something similar.

Aucun commentaire:

Enregistrer un commentaire