Apache HTTP Server module for storing and reading BLOBs to and from a cloud service.

View the Project on GitHub


Storing and reading BLOBs to and from a cloud service. The project will consist of a library, command line tool, Apache HTTP Server module and an Nginx module. Currently, the command line tool is work in progress.


Releases and Downloads

See Releases


The command line tool is controlled via env variables and command line arguments. Command line arguments take priority and overwrite env variables settings. If the action is set to WRITE_BLOB and neither MCS_PATH_TO_FILE nor –path_to_file is specified, the command line tool tries to read from stdin. Similarly, when then action is set to READ_BLOB, and neither MCS_PATH_TO_FILE nor –path_to_file is specified, the command line tool writes the blob contents to stdout.

Env variables


Command line arguments


Testing and fooling around

Creating a container

./mod_cloud_storage \
--azure_storage_key Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw== \
--azure_storage_account devstoreaccount1 \
--azure_container my-first-container \
--blob_store_url \
--test_regime true

Note the storage account is always called devstoreaccount1 by definition in all Azure Storage emulator implementations. The same holds for the storage key. Container and blob names are arbitrary.

Writing a BLOB to the container

Reading the BLOB from the container

./mod_cloud_storage \
--action READ_BLOB \
--azure_storage_key 'Eby8vdM02xNOcqFlqUwJPLlm\EtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/\K1SZFPTOtr/KBHBeksoGMGw==' \
--azure_storage_account 'devstoreaccount1' \
--azure_container mod-cloud-storage \
--blob_store_url localhost:10000 \
--test_regime true \
--blob_name 'testblob'

Neither MCS_PATH_TO_FILE nor –path_to_file was specified, so the content of the BLOB was written to stdout. Output (DEBUG):

 libcurl said: No error
Response Code: 200
Response Body followed by \n:Silence is golden.

Note that if a path to the file is specified, the content of the file is overwritten, not appended to.

Deleting the BLOB from the container

Exactly the same as reading the BLOB but for the action parameter:

--action DELETE_BLOB

Output (DEBUG):

 libcurl said: No error
Response Code: 202
Response Body followed by \n:(null)

Note that the current implementation deletes all blob’s snapshots too. Regarding leases, the current implementation does not deal with leases on blobs, so if there is a lease on the blob, the delete action fails.

Working with a real Azure storage

This project is maintained by Karm

Hosted on GitHub Pages — Theme by orderedlist