Darren Hartford [mailto:[EMAIL PROTECTED]] wrote:
> Outside of JBoss, with Content Management Systems, the most 
> common problem is how to handle large amounts of data,

That's what RDBMSs are designed to do well.  There are plenty of
databases out there that contain terabytes of data in tables.

> The best approach to this is to have two keys in your 
> database - one that is the unique identifier of the file you 
> are looking for, the the second is the actual pointer to the 
> file.  This way, if you HSM and move files to CD/DVD, you're 
> system still maintains integrity of the unique identifier for 
> lookups, but the pointer can change as-needed.

That approach is exactly the one I described (and implemented, in
blissful ignorance), and it has exactly the problems I pointed out.

If your application crashes (or your network goes down, or whatever)
after writing the database row, but before writing the file, your
database will contain invalid data (a pointer to a nonexistent or
outdated file).  If it crashes after writing the file, but before
writing the database row, you'll have lost a file (it will be there on
disk, but there will be no pointer to it in the database).  Worse yet,
your application could crash while it's in the middle of writing a file,
in which case you're left with a corrupt file.

Database transactions are designed to handle exactly those situations.
Filesystems aren't.

In my experience, backing up a database that's designed in the way you
suggest is a nightmare (see my previous message), while backing up a
self-contained database is simple.

In short, I think it's a mistake to think that you can beat databases at
their own game.  It's sensible to use them for what they're good at:
quick access in huge data sets, and referential integrity guaranteed by
the ACID properties of transactions.  No filesystem can compete on those
criteria.

> There are a lot of content management/HSM products already 
> out there, but I personally have not found one within Open 
> Source world that would satisfy my requirements, maybe you'll 
> have better luck and share with us? :-)

I haven't found a good general-purpose OpenSource CMS either; I've ended
up writing ad-hoc systems for specialised purposes.

Benjamin



-------------------------------------------------------
This SF.NET email is sponsored by: FREE  SSL Guide from Thawte
are you planning your Web Server Security? Click here to get a FREE
Thawte SSL guide and find the answers to all your  SSL security issues.
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0026en
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to