I want to simplify the creation of background tasks in Azure everyone.

Background tasks have always been difficult in asp.net applications. For simple scenarios you can periodically call a URL or spin up a background thread. Both of these options have issues and both are far from ideal. For example when calling a URL there are limits on the amount of time that a request can run, it breaks the request correlation with a Unit of Work and you need to manage an external component as part of your application. For background threads it's a little better but IIS is still a request driven service and there are [dangers when implementing recurring background tasks](http://haacked.com/archive/2011/10/16/the-dangers-of-implementing-recurring-background-tasks-in-asp-net.aspx). There's work being done at the moment to support background tasks natively in IIS but that's still in the distant future. Today the recommended approach is to use a Windows Service and that's fine because it's not PAAS, there is no reason not to use the whole server.

Azure faces similar issues when it comes to background tasks, simple tasks are easy but if you want anything bigger you jump all the way to a Worker Role. However even if you do use these methods they still have their share of problems.

Simple tasks can be run with Azure Mobile Services Task Scheduling but even those have a few problems. Such as when tasks are long running. It also means you have half you task logic in your main application and half in the form of scripts that manage the rest of the work. I'd like a background service that stays all in one place.

Worker Roles are fair too heavyweight most of the time and frankly they're usually overkill. They require an entire dedicated virtual machine when I'd much rather share a single VM between by website and service. Then later have the ability to scale them independently if I need to.

I think that azure needs a third option. The ability to deploy a service using PAAS that can run in a shared or reserved/standard environment. This should behave exactly like the current Azure Website in that it can run in a shared mode or on a reserved VM with other Websites I'm hosting in Azure. Then that service and my websites could run all in one VM for a cost effective stagey or across as many dedicated VMs as I wanted.

So I have two questions:

1. What is the best way of doing this today, is there an option that I've missed?
2. Is Azure going to add a service like this in the future?