Refactoring a WCF Service hosted as Windows service that uses local directory structure for PaaS Azure deployment
-
23 iulie 2012 20:34
Hello All,
I have a WCF service hosted as a Windows service. This was originally running on a server managed at our data center. But now this needs to move to Azure. I am expecting to change the hosting of the WCF service from Windows service to IIS in line with the information that I have read up on Azure. This is easy. But I have an issue with the way the service works functionally. The service relies on a local directory structure and a set of xml/txt files for its configuration data (not app.config). What is the best way to re-factor the service implementation.
Can Azure Storage be used to simply store these files say as BLOBs. But the issue is these files are pretty small (say in the range of 100KB), so why use the storage part. I also do not want to build a complete adaptor to read the information in the files and then store them in a RDBMS (say using SQL Azure). What are my best options?
Regards
S.Basheer
Toate mesajele
-
23 iulie 2012 20:52Membru care oferă răspunsuri
You can store the configuration in blob storage and use a startup task /RoleEntryPoint.OnStart to create the appropriate configuration structure for the app. Putting the configuration in blob storage means that you can change it without redeploying the package. You could use a configuration setting to reinitialize the "locally cached" configuration whenever you update the blob.
The idea is that you use the startup task/OnStart to ensure that each role instance is in the correct state when application processign commences.
-
24 iulie 2012 06:47
Make sure that you configurations are cached on the role start. Also implement a monitoring mechanism for changes in the blob path. so that you could referesh your cache timely.
Refer to the blog on implemeting cache referesh by monitoring azure blobs.
This would reduce your transactions and results in lowering the cost of transactions.
Please mark the replies as Answered if they help and Vote if you found them helpful.- Editat de Veerendra Kumar 24 iulie 2012 06:48
- Marcat ca răspuns de Arwind - MSFTModerator 30 iulie 2012 09:06