Re: Video storage in Postgres?
От | Robert Treat |
---|---|
Тема | Re: Video storage in Postgres? |
Дата | |
Msg-id | 200708171019.44051.xzilla@users.sourceforge.net обсуждение исходный текст |
Ответ на | Re: Video storage in Postgres? (Lukas Kahwe Smith <smith@pooteeweet.org>) |
Ответы |
Re: Video storage in Postgres?
|
Список | 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
В списке pgsql-advocacy по дате отправления: