c# - Reading/writing transient files in an Azure Worker Role -


we have multi-tenant system consisting of azure web role, worker role , desktop/mobile apps. each client app allows uploading images routed tenant-specific azure blob storage account.

the azure worker role polls these files , processes them. use third-party sdks processing require either file system path or stream. providing stream directly blob storage trivial sdk expects spit out physical metadata files our app consumes.

this problem since sdk black box , not provide alternative. there way have local storage within worker roles transient files. storage required few seconds per worker role iteration , may recycled/discarded if role recycled or shut down. in addition, files rather large (500mb+) blob latency not desired.

searching around revealed hacky workarounds, best of appears wraps blob storage let our role access file system.

is there way have access file system similar web role app_data folders?

you can use roleenvironment.getlocalresource() within azure worker role named handle local file storage:

roleenvironment.getlocalresource()

this avoid hardcoding of specific file paths may change on time, etc.

good luck!


Comments

Popular posts from this blog

html - Styling progress bar with inline style -

java - Oracle Sql developer error: could not install some modules -

How to use autoclose brackets in Jupyter notebook? -