Open ceefour opened 11 years ago
It needs at least 8 URI generators, but not all of them used, and you must use URI templates (configured per tenant) instead of putting entire URIs in each image metadata.
8 URI templates are:
Plus each of above for HTTPS.
On first request to appserver, it checks if file is generated and exists in image server. If so then do a redirect.
If not exist, it generate first, save, then redirect.
Same like foursquare and facebook does it.
There should be 3 modes :
PREPROCESS
. This is what we're doing right now.BACKGROUND
. After an add, image transformation jobs are run in the background. Also during image repository initialization, untransformed images are transformed in background.ON_DEMAND
. After an add, no image transformation is run. During fetch, if no transformed image is found, a transformation job is run. If the transformation takes less than threshold (say 500 ms), then the image is returned. If the transformation takes more than threshold, then a null or not found image is returned. However when the transformation eventually completes, it should be good for next request. Threshold is not accumulated, i.e. it is per method call or image, not per "web request".