List:General Discussion« Previous MessageNext Message »
From:Johan De Meersman Date:February 12 2010 7:23am
Subject:Re: how things get messed up
View as plain text  
On Fri, Feb 12, 2010 at 8:05 AM, Martijn Tonies <m.tonies@stripped>wrote:

> Firebird uses 1 or multiple files per database, not per table, this file
> has
> a special "blob area", so to speak, and the records include a "blob ID".
>
> When a client/stored routine selects a blob that isn't available in the
> record
> data (stored "in between"), it then goes to the area where blobs are stored
> and gets it from there. Works quite well.
>
> As I said, a DBMS can do anything it likes with it's data as long as it
> returns
> it correctly.
>

As a matter of interest, FaceBook has basically written their own blob
engine for the storage of userpics. They basically append every new picture
to the end of a huge binary file (probably a raw device, really), and simply
put the start and end byte of the picture in an index.

Every webserver (you can imagine they have a few) that hasn't got a
requested image in it's local cache yet, then simply does a seek() to the
start byte and reads the necessary number of bytes to fetch the image.
Highly efficient, and very simple.

Also of interest is that they never actually clear images from the binary
storage - it would be too slow to reclaim the free space, and it's faster
and cheaper for them to just keep adding storage.

The main performance benefit of this over files-on-disk might well be that
you don't have the overhead of a filesystem, and thus no constant open/close
operations - the image serving daemon keeps the file open at all times.

-- 
Bier met grenadyn
Is als mosterd by den wyn
Sy die't drinkt, is eene kwezel
Hy die't drinkt, is ras een ezel

Thread
how things get messed upJohn G. Heim10 Feb
  • Re: how things get messed upBuford Tannen10 Feb
  • RE: how things get messed upIlya Kazakevich10 Feb
    • Re: how things get messed upCui Shijun11 Feb
      • RE: how things get messed upJerry Schwartz11 Feb
        • Re: how things get messed upJohan De Meersman12 Feb
    • Re: how things get messed upJoerg Bruehe11 Feb
    • Re: how things get messed upJochem van Dieten11 Feb
  • Re: how things get messed upMartijn Tonies11 Feb
    • Re: how things get messed upDavid Giragosian11 Feb
  • RE: how things get messed upJerry Schwartz11 Feb
  • Re: how things get messed upMartijn Tonies11 Feb
    • RE: how things get messed upJerry Schwartz11 Feb
    • Re: how things get messed upAnn W. Harrison12 Feb
  • Re: how things get messed upMartijn Tonies12 Feb
    • Re: how things get messed upJohan De Meersman12 Feb
  • Re: how things get messed upMartijn Tonies12 Feb
    • Re: how things get messed upJohan De Meersman12 Feb
      • Re: how things get messed upVikram A12 Feb
        • Re: how things get messed upJohan De Meersman12 Feb
          • Re: how things get messed upVikram A12 Feb
            • RE: how things get messed upJerry Schwartz16 Feb
              • RE: how things get messed upMartin Gainty16 Feb
                • Re: how things get messed upBarry Leslie17 Feb
              • Re: how things get messed upVikram A18 Feb
                • RE: how things get messed upJerry Schwartz18 Feb
                  • Re: how things get messed upJohan De Meersman18 Feb
  • Re: how things get messed upMartijn Tonies15 Feb
  • Re: how things get messed upMartijn Tonies15 Feb
    • Re: how things get messed upJohan De Meersman16 Feb
      • Re: how things get messed upPaul McCullagh17 Feb
  • Re: how things get messed upMartijn Tonies15 Feb
    • Re: how things get messed upAnn W. Harrison15 Feb
      • Re: how things get messed upJohan De Meersman16 Feb
      • RE: how things get messed upJerry Schwartz16 Feb
  • Re: how things get messed upMartijn Tonies18 Feb
RE: how things get messed upJerry Schwartz22 Feb
  • Re: how things get messed upVikram A24 Feb