Re: Video storage in Postgres?

From: Robert Treat <xzilla(at)users(dot)sourceforge(dot)net>
To: pgsql-advocacy(at)postgresql(dot)org
Cc: Lukas Kahwe Smith <smith(at)pooteeweet(dot)org>, JoshuaKramer <josh(at)globalherald(dot)net>
Subject: Re: Video storage in Postgres?
Date: 2007-08-17 14:19:43
Message-ID: 200708171019.44051.xzilla@users.sourceforge.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-advocacy

On Friday 17 August 2007 01:58, Lukas Kahwe Smith wrote:
> JoshuaKramer wrote:
> > In all seriousness, what advantages accrue by serving video from the DB?
>
> Well all the advantages people associate with LOBs:
> - single place for all data
> * for backups
> * for replication
> * for ACLs
>
> I often just care about the first two, in which case I simply employ a
> mod_rewrite rule, that points to the on disc version of the file and
> fals back to serving directly from the database (but also dump a file to
> the proper location on disc).
>

Don't forget about ACID garauntees. When inserting video into a db, you have
the garauntee that if something goes wrong the meta-data rolls back and your
in a complete state. When keeping video on the fs, if an error occures when
writing the file, you have to have some application code to ensure that
everything in the db cleans up appropriatly. This is not impossible, but
letting the db do it for you is certainly easier.

That said, most video sites end up employing some type of cacheing system to
get video's sent around (think akami), so it becomes moot to force everything
into the db, since they aren't going to serve all that video from the db
anyway.

--
Robert Treat
Build A Brighter LAMP :: Linux Apache {middleware} PostgreSQL

In response to

Responses

Browse pgsql-advocacy by date

  From Date Subject
Next Message Bob Zurek 2007-08-17 15:55:53 Re: Video storage in Postgres?
Previous Message Bob Zurek 2007-08-17 14:03:22 Re: Video storage in Postgres?