I’m looking into storing Zend Framework on Microsoft Azures Blob Storage. Azure Blob storage has a flat file system where as Zend Framework has a deeply nested structure.
I want to create a folder containing all Zend Framework files using the following naming convention / method.
eg: The Zend_Log_Writter class is stored at:
library/Zend/Log/Writer.php
In the new flat output folder the file would be named:
Zend.Log.Writter.php
I’ll use any tool that will accomplish the job linux or windows. I could write a PHP script that would do this but I’m guessing there is a piece of Linux Foo out there that could accomplish what I’m after with a few linked commands.
If I’m reading this question correctly, it sounds like you’re trying to map a file system to individual blobs in Windows Azure Storage. You’d need some type of in-between tier to map requested files to individual blobs (and php has a very robust SDK you can use for accessing blobs). One correction about blobs: it’s not exactly flat: The URI would be https://mystorageaccount/containername/blobname. You have one native directory (container), and you can then simulate further levels with the technique Pekka provided a link to.
However: To me, this mapping sounds like it may have performance implications, as well as transaction implications.
As an alternative, why not mount an NTFS-formatted Cloud Drive in a Windows Azure page blob? Your drive can be up to 1TB, accessible via drive-letter. It’s durable (meaning triple-replicated within the data center), and would let you then install pretty much anything to it (such as the file directory structure for Zend). Pretty easy to set up – maybe a dozen lines of code.
The one caveat to Cloud Drives: only one writer. You’d have to keep that in mind when scaling your web app to multiple instances. There are workarounds (such as having one Cloud Drive per instance), and taking advantage of caching (such as the new AppFabric Cache which recently went into production).
EDIT: Here’s a great Cloud Drive sample by Maarten Balliauw, demonstrating the steps needed for creating/allocating/mounting a Cloud Drive.