views:

290

answers:

1

Hi all,

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.

+1  A: 

I'd go with WebDAV. A lot less code, and well defined standards

Javier
Yes, I was actually leaning towards WebDAV. Do you have any experiences with it?For instance, for reencoded files I wouldn't know the size of the file without reencoding... I would suppose WebDAV is the least troublesome for things like this...
alex
yes, i implemented most of it in Lua a long time ago. I don't remember many specifics beyond that the only hard part of the RFCs was the locking semantics.
Javier
I'm going read-only, so I suppose it will be pretty simple then...
alex
the problem with webdav it's not not supported like a real filesystem in windows or mac os. Sure finder/explorer can access it but it can be a bit ropey.
David Roussel
in mac WebDAV is a real, mounted FS. for windows there are some third party solutions, not sure if they're free or not
Javier