Standard (30 minutes) on Wednesday, 24 November 2010 15:30 - 16:00 in room Room 1
TAGS: Databases, Perl, Web & Online Technologies, database, mysql, perl,blobs
For quite some time I have liked the idea of storing files in the database as blobs. At first it seemed like herecy, but as time went on I saw the conveniences and advantages (yes ... really). There are some real advantages to counting your files as "data" and hence throwing them at the database.
With this in mind, I set myself to the task of creating a library (started off as a pile of scripts) that takes the pain out of submitting and retrieving blobs from the database. There are quite a few gotchas when doing this for the first time, but my idea was that you don't have to worry too much about this as blobik should take care of it for you.
Blobik is mainly a perl project with support for Postgres blobs (both bytea and oid types), and MySQL next (Author has done some stuff with MySQL blobs in the past so this isn't too scary).
As time has gone on, this has certainly turned into a "Because you can" project but there are some useful things about not being glued to filenames and directories when thinking about file storage.
Our main production usage of blobik is to monitor a set of files in a remote samba-mounted location to detect changes in those files. Blobik is smart enough to not re-injest a file if it hasn't changed (creating a sort of hardlink within the existing table structure) so you can snoop a remote location as often as you want without the overhead of storing lots of useless data.
If you are interested and have had much to do with blobs, come on down.
All delegates attending this session must bring and ensure:
Andrew Boag is the Sydney Director of Catalyst IT. After completing a Computer Science degree at Otago University in NZ, Andrew fled to Moscow where he spent 7 years involved in IT roles in local media and banking.
Andrew has a background in perl, PHP and ruby development but finds himself more and more involved with business development and management since arriving in Sydney in 2008 (someone has to do it ... :)