VFS Implementation Ideas

I have multimedia files and their metadata stored in an RDBMS (in fact, the actual media files are stored in FS, but don’t stop there).

I would like to introduce a file system representation of this information so that users can work with Windows Explorer and other similar materials in the database. I assume that this access will be read-only, which I believe will simplify the situation.

Basically, I want to achieve:

  • They have different representations using different metadata criteria (for example, there is / by _author / {artist} / {record} / {audiofiles} and / by_record / {record} / {audiofiles}, for example).
  • Have transparent transcoding (possibly cached) of media files (eg / wav / {wavfile}, / mp3 / 192 / {mp3file), / mp3 / 320 / {mp3file}, etc.)
  • Transparent generation of metadata in different formats (say, Excel, XML in different schemes, etc.).

I am doing this in Java, by the way.

My problems are two-sided here:

one)

What is a good way to implement a β€œmodel”? I have worked with some repository interfaces, Asset, FileAsset, ContainerAsset and implementations, but they do not feel completely right.

I'm interested in being able to delegate different parts of the file system to separate code (that is, the / {artist} / {record} and / {record} parts of the FS are executed using different code, and they both delegate the same code to create the material { record} / xxx).

2)

What is the best alternative to "expose" this model? As I can see, there are several alternatives:

  • Fuse for Java and Dokan for Java. I would need to implement two different shells, so this is a bit more work ...
  • Use the Alfresco SMB implementation and simply expose VFS as a Samba share.
  • Using Milton (WebDAV implementation for servlet containers) and using OS'es native WebDAV support or using something like Fuse DAV FS to re-expose it as FS

Of these, Fuse / Dokan works best. Alfresco looks very pretty, but it’s very difficult to get it working. Milton seems simpler, and WebDAV semantics might even work better ... but I'm not quite sure.

Thoughts, ideas?

Alex

edit: the project is now half-closed (which means it would be great to do this, but now it does not have time). I think I would write my VFS as an extension for commons-vfs, and then apply commons-vfs to Milton, Dokan, Fuse, etc.

+4
source share
1 answer

I would go with WebDAV. Much less code and well-defined standards

+2
source

All Articles