I am in the process of reviewing an applicaiton that uses the IT2BE/Cybersack Streaming Bean. As you are no doubt aware this bean allows the user to stream media from the client to the server asyncronously and place it in either the file system or into a media field in a database.
The issue I have encountered is that streaming media to a database ie into a blob field is VERY space intensive - my current solution now has a mySQL media table with 14gb of data contained in the blob fields. Although this has not hit the performance too much, I am concerned that IF it breaks it will bring the solution crashing to the ground !
SO the question is whats better stream to the file system or a database ?
My observations so far are:
The blob solution works and has proven stable so far
Its hard to backup because its huge ! (MySQL admin crashes on the Mac, as does Navicat and the file wont open in any form of editor due to the size including vi)
Its getting slow again despite being indexed extensively
The file System
Basically its a database, but it does lend its self to file handling better
I have no idea if I can get the blobs extracted from the db to the file system other than manually
Its potentially easier to back up
I am basically in favor of the file system and would appreciate input or thoughts you may have on the subject.
Your question is very much database specific. What might be a nightmare for MySQL might be easy as pie for another RDBMS.
The same goes for backing up the huge load of data.
So in short your simple poll might not be that simple to answer.
ROCLASI:
Your question is very much database specific. What might be a nightmare for MySQL might be easy as pie for another RDBMS.
The same goes for backing up the huge load of data.
So in short your simple poll might not be that simple to answer.
Very good point! I guess added to which how you handle the database or at least the media in the database. With the benefit of hindsight I think some form of solution like XRaid would have made a huge difference!
I would go for the FileSystem. Maybe you could store a thumbnail (if applicable) along the filepath in the DB and store the real files on the disk.
A few points:
It is a lot easier to backup a filesystems than a 14GB table; you could also consider an incremental backup scheme;
If you run out of space you can just plug another disk or store the new files in another server or an external SAN. MySQL doesn’t support DB spaces and it could turn to a nightmare moving all the DBs to a new/larger disk;
You can get your files any way you want (ftp, smb, afp, http, php, etc) without the need to use the servoy client to download them back to the user;
I don’t like 3 points lists so this is just a placeholder