daita-technologies / interface

React-based user interface for the DAITA platform.
http://app.daita.tech
GNU Affero General Public License v3.0
1 stars 0 forks source link

Caching mechanism #127

Open ttattl opened 2 years ago

ttattl commented 2 years ago
ttattl commented 2 years ago

In this problem, also we need to think about the image for the visualization and image for the storage. Should we create another clone image (with small size) for visualize (and connect with front end)? I am thinking...

pcaversaccio commented 2 years ago

Not 100% sure yet, but thumbnails (a small image representation of a larger image) can be a good solution here. It's nearly always best to generate thumbnails server-side. It's fast and doesn't duplicate computation over multiple clients. In most cases, I would probably create a cloud function to generate thumbnails of a fixed dimension and set it up to be triggered by a storage event. But am also thinking...

pcaversaccio commented 2 years ago

@ttattl check out this from Cloudflare: https://developers.cloudflare.com/images/image-resizing/resize-with-workers/. That can be really useful!

pcaversaccio commented 2 years ago

We need to keep in mind whenever we build this caching mechanism that the images of the client should not be shared across third-party providers if possible due to security reasons.