w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
How to let worker role app to access files from web role instance

You could make use of either blob storage or azure file service for that purpose.

Since you're migrating an existing application, I would recommend going with azure file service. Basically what you will do is create a share and map that share as a network drive on both web role and worker role when the role starts. Web role will then write a file to this share using standard file API. To notify the worker role that a file is there to be processed, web role could write a message to a queue which is being polled by worker role. Upon receipt of the message, worker role will read the file and process that file.

You may find this blog post useful regarding azure file service: http://blogs.msdn.com/b/windowsazurestorage/archive/2014/05/12/introducing-microsoft-azure-file-service.aspx.

© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.