javahdfsdatabase-connectionjavadbimagesource

Passing images to Java


I am working on a project where I have extracted images from sensor and saved them to the operating system directory. I have a Java API for uploading images to the server.

I need to upload these images and some other data typically float data type to the main server.

I need to decide an inter-mediator such as a database where I store those images and make connection through java to upload them or use HDFS.

Can some body please advise me, which option will be best for storing images? Database or HDFS?

Note: Images are up to 150 thousand can be more in future.


Solution

  • I think the best way to do that is to keep the floats you need and metadata of the images in the database. For easier searching and querying and easier interaction with the Java. The actual images are best stored on a file system to decrease the transformation from and to the database. I believe a simple file system would be good enough for that size of images. You probably won't use any of the fancy HDFS functions like map reduce and stuff like that. But that's up to you.

    So in this case if a standard file system isn't good enough for you and you want something bigger then HDFS is the way to go. So the proper way would be a mixture of the two.