4

I have multimedia files and its metadata stored in a RDBMS (actually, the actual media files are stored in the FS, but let's not dwell on that).

I would like to present a filesystem view of this information, so that users can work using Windows Explorer and similar stuff on the database. I intend this access to be read-only, which I believe will simplify things greatly.

Basically, what I want to achieve is:

  • Have different views using different metadata criteria (i.e. have /by_author/{artist}/{record}/{audiofiles} and /by_record/{record}/{audiofiles}, for instance).
  • Have transparent reencoding (possibly cached) of media files (i.e. /wav/{wavfile}, /mp3/192/{mp3file), /mp3/320/{mp3file}, etc.)
  • Transparent generation of metadata in different formats (say, Excel, XML in different schemas, etc.)

I'm doing this in Java, btw.

My problems here are two-sided:

1)

What is a good way to implement the "model"? I've dabbled with some Repository, Asset, FileAsset, ContainerAsset interfaces and implementations, but they don't end up feeling quite right.

I'm interested in being able to delegate different parts of the filesystem to separate code (i.e. /{artist}/{record} and /{record} parts of the FS are implemented with different code and they both delegate to the same code to create the {record}/xxx stuff).

2)

What's the best alternative to "expose" this model? As I see, there are some alternatives:

  • Fuse for Java and Dokan for Java. I would need to implement two different wrappers, so it's a bit more work...
  • Use Alfresco's SMB implementation and just expose the VFS as a Samba share
  • Use Milton (a WebDAV implementation for servlet containers) and either use OS'es builtin WebDAV support or use something like a Fuse DAV FS to re-expose it as a FS

Of those, Fuse/Dokan seem the most work. Alfresco looks very nice but very complicated to get it working. Milton seems simpler, and WebDAV's semantics might even work better... but I'm not entirely sure.

Thoughts, ideas?

Alex

edit: The project is semi-abandonded now (meaning, it would be cool to do it, but no time for it right now). I think I'd write my VFS as an extension to commons-vfs and then adapt commons-vfs to Milton, Dokan, Fuse, etc.

4

1 回答 1

2

我会选择WebDAV。更少的代码和明确定义的标准

于 2009-11-26T21:34:57.877 回答