Changed lines at line 4
4: - request with arbitrary bounding box
5: - original picture ratio is maintained
6: - delivering and caching of pictures in dimensions of a certain raster.
7: - picture fits into bounding box (no dimension will be larger, but can be smaller)
8: - picture is just scaled down
9: - allow browser side caching, even for different bounding boxes (using redirection)
10: - support extern storage of scaled pictures to allow mirroring. (redirection map)
11: - support explicit precaching (to be copied to a mirror)
12: 1 Specification
13: 1.1 Behaviour
14: 1.1.1 Request
15: A picture is requested with an picture name and a bounding box. The bounding box specifies the maximal size of the image. The Image Server has a configured raster in which it provides pictures. Lets assume the raster is set to 50 pixel. The picture size is scaled down to fit in the bounding box and then the width is rounded down multiple of 50. (The height is obviously scaled down as well) The needed version of the picture is looked up in the cache and is generated if needed. The file name contains the dimensions and the request is answered using redirection to that file. That allows browser side caching even for slightly different bounding boxes.
16: 1.1.1 Cache
17: The cache is an important part of the Image Server since it can reduce the server side load and the latency time. The cache has a space limit and the caching stategy is LRU (least recently used).
18: 1.1.1 Mirrors
19: A mirror should keep pictures in various sizes to save bandwidth or to gain faster access. It is also handy to be able to store the pictures on cheap webspace without CGI support. The Image Server has a mirror map where every mirror has a list of files it has. Furthermore there could be some information about the bandwith the mirror. If a file is mirrored on more than one mirror is redirected with a probability ratio that correspond to the bandwith ratio.
20: 1.1 Interface
21: 1.1.1 CGI
22: The request URL is:
23: {code:none}
24: \http://<host>/<path>/imgserv.cgi?src=<image src>&width=<width>&height=<height>
25: {code}
26: Where __<image src>__ is a complete URL or relative path identifier of the image to request. If the normal request URL of an image would be "images/1.jpg" than the __<image src>__ is "images/1.jpg" too. __<width>__ and __<height>__ are integers greater zero and denote the dimension of the requested image in pixel. Other units are not planed.
27: Examples:
28: {code:none}
29: \http://<host>/<path>/imgserv.cgi?src=images/1.jpg&width=800&height=600
30: \http://<host>/<path>/imgserv.cgi?src=http://<otherhost>/album1/slides/image1.jpg&width=800&height=600
31: {code}
32: 1.1.1 Configuration
33: TODO: describe the configuration file syntax and options
34: 1.1 Design
35: 1.1.1 Raster
36: We introduced a raster in which the images are scaled. This prevends the cache of filling up with various fine grained scaled versions of the same image. The raster width is an configuration option which belongs to the caching group.
37: This option must be fixed over an reasonable lifetime of the server. The client shouldn't get different scaled images for the same requested dimension. In particular, the server is not allowed to serve a "good matching" version of an images which is a cache hit.
38: 1.1 initial version
39: - request with arbitrary bounding box
40: - original picture ratio is maintained
41: - delivering and caching of pictures in dimensions of a certain raster
42: - picture fits into the requested bounding box and configured raster
43: - picture is just scaled down, never up
44: - serving scaled images per HTTP redirect to the location of an static image file
45: 1.1 future versions
46: - support extern storage of scaled images to allow mirroring. (redirection map)
47: - support explicit precaching (to be copied to a mirror)
48: 1 Design Decisions
49: 1.1 Raster
50: We introduced a raster in which the images are scaled. This prevends the cache of filling up with various fine grained scaled versions of the same image. The raster width is a configuration option which belongs to the caching group.
51: 1 Specification
52: 1.1 Behaviour
53: 1.1.1 Request
54: A picture is requested with an picture name and a bounding box. The bounding box specifies the maximal size of the image. The Image Server has a configured raster in which it provides pictures. Lets assume the raster is set to 50 pixel. The picture size is scaled down to fit in the bounding box and then the width is rounded down multiple of 50. (The height is obviously scaled down as well) The needed version of the picture is looked up in the cache and is generated if needed. The file name contains the dimensions and the request is answered using redirection to that file. That allows browser side caching even for slightly different bounding boxes.
55: 1.1.1 Raster
56: The raster with must be fixed over an reasonable lifetime of the server. The client shouldn't get different scaled images for the same requested dimension. In particular, the server is not allowed to serve a "good matching" version of an images which is a cache hit.
57: 1.1.1 Cache
58: The cache is an important part of the Image Server since it can reduce the server side load and the latency time. The cache has a space limit and the caching stategy is LRU (least recently used).
59: 1.1.1 Mirrors
60: A mirror should keep pictures in various sizes to save bandwidth or to gain faster access. It is also handy to be able to store the pictures on cheap webspace without CGI support. The Image Server has a mirror map where every mirror has a list of files it has. Furthermore there could be some information about the bandwith the mirror. If a file is mirrored on more than one mirror is redirected with a probability ratio that correspond to the bandwith ratio.
61: 1.1 Interface
62: 1.1.1 CGI
63: The request URL is:
64: {code:none}
65: \http://<host>/<path>/imgserv.cgi?src=<image src>&width=<width>&height=<height>
66: {code}
67: Where __<image src>__ is a complete URL or relative path identifier of the image to request. If the normal request URL of an image would be "images/1.jpg" than the __<image src>__ is "images/1.jpg" too. __<width>__ and __<height>__ are integers greater zero and denote the dimension of the requested image in pixel. Other units are not planed.
68: Examples:
69: {code:none}
70: \http://<host>/<path>/imgserv.cgi?src=images/1.jpg&width=800&height=600
71: \http://<host>/<path>/imgserv.cgi?src=http://<otherhost>/album1/slides/image1.jpg&width=800&height=600
72: {code}
73: 1.1.1 Configuration
74: TODO: describe the configuration file syntax and options
75: 1 Implementation
76: 1.1.1 Raster