Taking into account all the responses I've seen so far (down to J. D. Mitchell) there is relatively little consideration being given to the transactional issues. I suggest that before you settle on a solution where performance is the priority you need to examine the issue of "What is the correct behavior?" where "correct behavior" in this case (i.e., where DB's are concerned) is to avoid inconsistencies. And of course it's corollary, which is "What is the cost of incorrect behavior?" Putting BLOB assets into the same DB as the data to which it is associated gives you the simplest implementation of "correct behavior". From past experience with Oracle I know that good performance with BLOB assets can be achieved. I can't speak specifically to other DB's, but historically, the performance problems started with not having enough control over how table spaces were allocated and managed as well as the general failure of the vendor to do a good BLOB support feature. I think it is a given that BLOB assets are always associated with other data elements. Putting BLOB assets onto the file system is really the splitting of the data into two DB's -- BLOBS on the file-system and other, conventional records, in the primary DB. Immediately this presents transactional problems. Without getting into every specific case let me generalize some of the issues: Each file upload to the file-system has to be in the same transactional scope as theHaving said all that, if I had my druthers, I would put BLOB assets into the primary DB. This solves all my correctness issues and easily keeps me in the game with respect to DB clustering, replication and backups. I would deal with the performance issues by
This could take a couple of different forms but the gist of it would be that the BLOB table spaces would be on the local disk/system with Apache/Tomcat and the other "conventional" data on the DB server. Perhaps the local disk is holding only the replication of the BLOB data? This particular analysis may not bear great fruit but it would be worth not leaving that stone unturned. Just an opinion. -J Andrew Huntwork wrote: I'm writing this web app that allows users to upload documents, such as word docs, images, etc, and then to download those documents again on request. the documents are not searched, interpretted, processed, version controlled, or anything else. just upload and download. i wonder if there's a general rule on whether one should stick such things into a db or onto the file system. |
- Re: [jug-discussion] storing blobs on file system o... Bryan . ONeal
- Re: [jug-discussion] storing blobs on file sys... Randolph Kahle
- Re: [jug-discussion] storing blobs on file system o... Andrew Huntwork
- Re: [jug-discussion] storing blobs on file system o... Randolph Kahle
- RE: [jug-discussion] storing blobs on file sys... Richard Hightower
- Re: [jug-discussion] storing blobs on file system o... Andrew Huntwork
- Re: [jug-discussion] storing blobs on file sys... Bryan . ONeal
- Re: [jug-discussion] storing blobs on file system o... Drew Davidson
- RE: [jug-discussion] storing blobs on file sys... Richard Hightower
- [jug-discussion] storing blobs on file system or in... John D. Mitchell
- RE: [jug-discussion] storing blobs on file system o... Jeffrey Peacock
- RE: [jug-discussion] storing blobs on file system o... Landon Clark
- RE: [jug-discussion] storing blobs on file system o... Tim Colson \(tcolson\)
- RE: [jug-discussion] storing blobs on file system o... Landon Clark
- RE: [jug-discussion] storing blobs on file system o... Richard Hightower