We are moving a web app over to Azure and would like some feedback on our strategy. Azure is new to us and so we want to make sure that we are going down the right path. Note that we're using VS 2010.
Our current app has two parts: 1) a standard web app for the user interface and 2) a windows app that runs on the server. The windows app wakes up every 2 minutes, looks for any new records in a SQL table, processes them and then sleeps. The windows app also tells us the number of records processed, processing time, etc so that we can see the general health of the system. Both apps read/write files stored on the server. (Yes, this should probably be a service but we wanted the interface so we can quickly see overall health. We have a service that checks to make sure the interface is running and restarts it if there's a failure.)
Porting the web app to Azure is straight forward and we've done some testing on it within VS without any problems. We need some advice on the windows app and setting up/accessing the files.
Here's our strategy. All advice is appreciated.
1 - Create a worker role for the windows app. 2 - Set this worker role as the startup project. 3 - The worker role will create the Azure cloud drive (for file access) and pass the drive letter to the web app. We'll establish the connection within onstart. 4 - Make certain that the worker role is persistent so that we don't lose the cloud drive.
Two additional questions:
1 - It appears that a worker role can have a user interface but perhaps we're misreading something. If we attempt to add the windows app to the solution we receive a number of errors. We also tried to create a worker role and set it as a Windows Form Application but that immediately produced an error about their being no 'Main' method which was a warning flag to us that we shouldn't be doing this. What are we missing here?
2 - If the worker role is set as the startup project, will it need to start the web app or will that start automatically once the worker role has completed its startup processing?