Whats a good structure to save and retrieve locations of images?
Posted
by
Goot
on Programmers
See other posts from Programmers
or by Goot
Published on 2014-03-02T15:18:10Z
Indexed on
2014/06/01
3:48 UTC
Read the original article
Hit count: 252
I got a java-ee application, where I collect informations about movies. Im my backend I provide data like the name, description, genre and a random uuid.
I also got lots of related files, which are stored on a file server. Including some screenshots, the dvd or bluRay cover and video trailers.
My current approach is:
When saving the files to the fileserver, I retrieve the movies random uuid (which is the primary key btw.). I then rename the files screenshot_[UUID]_1
, screenshot_[UUID]_2
... etc.
Now, there are lots of other ways to handle this, like saving all filenames in a database or creating a dir structure on the fileserver for every uuid and, e.g., return all images in the "[uuid]/screenshots" folder via REST.
I expect about 30k requests a day, so the service has to be pretty performant.
Whats the best way to solve this?
© Programmers or respective owner