Welcome to Azure Blob Pusher
File uploader allows bulk upload of files from client to Azure blob storage. FileSystemWatcher notices new files in configured directory. SQL Express database tracks files as they are pushed up to blob storage and then processed. Local Directory is cleaned up after acknowledgement.
What's it all about?
Many business problems to be solved with cloud computing involve pushing documents of some sort to cloud storage and then processing those documents. It may be financial data, electrical meter data, media, and so on.
This sample was created to demonstrate how a Windows client can be used to push files directly to Azure blob storage in a controlled and audited way.
The overall workflow is as follows:
- drop file into a directory that is being watched by a FileSystemWatcher
- a database record for tracking the file is created
- program pushes the file to Azure blob storage - into a service account and container that is designated in the app.config file
- the database tracking record is updated to say the file was uploaded
- a message is dropped into an Azure queue - notifying an Azure process of the event
- presuming that an Azure process works on the file, it would then drop a message into an acknowledgement queue
- the client picks up the acknowledgement message and
- cleans up the file and
- notes in the tracking record that the Azure process acknowledges receipt
On the server side, (the Azure process referred to above) the only thing I'm doing with the file is copying it to local storage on the instance to simulate some processing, then acknowledge the receipt (queue message back to client).
The source code is provided as a sample. I did some error checking but it is far from bullet proof.
Additional details are provided on my blog http://blogs.msdn.com/b/golive