Page 2 of 2 FirstFirst 12
Results 11 to 15 of 15

Thread: Where a uploaded image file shall be store?

  1. #11
    Join Date
    Jun 2006
    Posts
    2

    Default Beware the BLOB (size limit) ;)

    As we all know, BLOB sizes are limited to 4GB, which will suit most of us, but not all. If you're dealing with large, large files, you're gonna have to judge whether it'll fit into a BLOB. Friendly caveat.

  2. #12
    Join Date
    Mar 2006
    Location
    A place to call home
    Posts
    76

    Default

    In my current project, we store all of our files in the filesystem and the references in the database.
    What we did before choosing type of storage was:
    1) Defined what types of images we had to deal with. With "types" I mean size.
    2) How many images the system should be able to store.
    3) Developed some test cases for storing as BLOB, BFILE(we use Oracle) or in the filesystem.

    The tests showed that for very small images (<10k), BLOB was fastest. For images >10k<300k, BFILE and FS was best. For Images >300k, FS CLEARLY was the best!

    First, most of ours pictures is quite big(>1Mb). That's one reason for us to choose FS for persistence.

    Second, we have a LOT of images. For the moment, we have about 400 million of them and it increases with about 60-80 million per year.
    If we should store all of the images in our database, well, we would get a REALLY BIG database to do backup(and maybe, restore) on!

    Cheers

  3. #13
    Join Date
    Jan 2005
    Location
    Bucharest, Romania
    Posts
    5,403

    Default

    The main advantages of the filesystems (especially on linux machines) is that one can get a very advanced fs that supports journaling and is getting more and more close to db reliability. Ofc, one can't still do queries but as Wesslan pointed out, for files bigger then 300KB or for a large number of files, the advantages are compeling.
    As for the 4GB limit - most filesystems have the same restriction; when dealing with such big data files, it's best to adjust the environment accordingly (imagine just what type of bandwidth is required to upload/download 4GB).
    Costin Leau
    SpringSource - http://www.SpringSource.com- Spring Training, Consulting, and Support - "From the Source"
    http://twitter.com/costinl
    Please use [ c o d e ] [ / c o d e ] tags

  4. #14
    Join Date
    Aug 2007
    Posts
    4

    Default how to compress image file size

    Is there a way to compress an image file size in Spring?
    Sorry if this is way out of the thread, just can't get an answer to this.
    Pls help

  5. #15
    Join Date
    Sep 2006
    Location
    UK
    Posts
    8,424

    Default

    You can compress data in Java but it's not a Spring thing. Try googling it.
    Last edited by karldmoore; Aug 27th, 2007 at 02:36 PM.
    Barracuda Networks SSL VPN Lead Developer
    http://pramatr.wordpress.com
    http://twitter.com/karldmoore
    http://www.linkedin.com/in/karldmoore
    Any postings are my own opinion, and should not be attributed to my employer or clients.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •