VIrtual Directories: Providing one asset repository for multiple applications

I was looking at an article I wrote a while back and was reminded of a feature of Flash Media Interactive Server, I like a great deal, the virtual directory for streams. Its quite an old feature. It allows the developer to create a folder anywhere on the Server machine and set a name value pair as an identifier to this folder. As a result any FMIS ( or any earlier server FCS or FMS) application can access the streams in this folder by prefixing the required stream with this variable name,
e.g aStream,play("VDir:"+ RecStrm),
Till now this feature could only be set my making changes to the "Streams" tag in the VHost.xml configuration document:

/Streams >


to use this your server code may be:

aStream,play("radiostreams:"+ RecStrm),

FMIS now offers the ability to programatically set up a virtual directory from the server script. The Stream static method Stream.setVirtualPath(id, path).
It is used in the following manner:

Stream.setVirtualPath("JamSession", "C:/Documents and Settings/aYo/My Documents/My Music");

A particularly useful use case is an FMIS radio station, with each music channel set up as a separate instance of the application, or even a separate application altogether. Nonetheless all instances share a single music vault set up as a virtual directory. Were this not the case each channel would have to have its own streams folder which will definitely need to duplicate data, an unnecessary waste of disc space.

aYo Binitie II

No comments: