I am using Visual Studio 2010 to develop Azure applications. I want to start a worker role inside of another worker role. Is this possible? Just like threads, I want to create another worker instance while the application is running. Can anyone help me? I am new to Azure platform and C#
3 Answers
I think your level of abstraction may be a bit off. Think of a worker role as a physical machine, not something like a windows service.
Once it's running you can do anything you would on a standard server so instead of "like threading", just do threading. (Personally I recommend using the .NET4 Task Parallel Library, it's awesome ;) )
The short answer is no you can't create a worker role inside another worker role.
You can use a worker role to control other worker roles through the management API (including deploying a service) which may be what you're trying to do.
It is possible that you can achieve what you're trying to do with threads without having to create a whole separate worker role role instance. Could you give us a little more information about what you're trying to do?