-
1. Re: Storing multimedia files
www.supernovasoftware.com Oct 15, 2008 8:59 PM (in response to gregtk)I prefer storing in the database because I do not have to code against the file system, operations are handled with transactions, and most of my binary content is generated and related to a specific entity in the system.
-
2. Re: Storing multimedia files
ericjava.eric.chiralsoftware.net Oct 15, 2008 9:59 PM (in response to gregtk)This is one of those classic questions. There is not one right answer to this. Intuitively, it would seem like using a JDBC + JBoss to serve multimedia is slower than using plain old file system + Apache, so if you have a high load of stuff to serve, you would want FS + Apache.
However... if the load really is that high, you'll want to be using a caching system on the front-end, so maybe at that point there is no speed advantage of using FS + Apache, because 99% of the hits will come out of the caching system.
On top of this, there is the administration complexity of one vs. the other. It is nice to have a bunch of media content in directories that you can look at, but in some ways it's even nicer to have all your media in a database that you can deal with with replication, DB backup tools, transactions, and all that stuff.
I guess this is an optimization question and one of the facts of optimization is, don't do it until you can prove that you need to, and when that happens, make sure you understand exactly what the performance constraints are.
-
3. Re: Storing multimedia files
sstrenn Oct 15, 2008 10:00 PM (in response to gregtk)I think that storing them in a web-accessible folder is very common. I'm not sure why that makes deployment
very difficult
- can you elaborate? -
4. Re: Storing multimedia files
ericjava.eric.chiralsoftware.net Oct 15, 2008 10:08 PM (in response to gregtk)One factor that makes it
very difficult
is that an EAR deployment doesn't have write-access to any of its own directories so there isn't even a clear way to do it in a normal deployment. Therefore the images need to be somewhere else, this all needs to be coordinated and configured, the image files and the DB entries related to them must be kept in sync, etc. It sure does make deployment into a pain.