Background tasks (continuous code) in the Cloud: Cloud Foundry beats AWS and Azure

Introduction

I have a background task collection I need run, continuously, but with different timer intervals for each task. It is a critical part of my web services and provides the data gathering and transformations the make the web service valuable. How should I package the code and where should I deploy it? Only in the cloud.

 

As the cloud space is moving faster than I can write this, any of this could be outdated by the time you reader it.

Consider Time, Money, and Ease of Deployment

In struggling with where to deploy the code, I considered the cloud cost, the time to learn and build the solution as well as any cloud gothchas. I’m now on my sixth cloud provider trying to determine if they are the best at background tasks. Why? Because background tasks are where the heavy lifting happens. I want to spend my time getting that heavy lifting correct and not fighting with the cloud environment.

Background Task Defined

Just to be clear, I consider a background task any code that runs continuously. Whether it has a UX or responds to http(s) is a detail at this point.  As long as I have the continuous part, I can work around the other caveats.

Timed Events (.Net Timer, Scheduled Task, or Cron) are critical

I’ve looked at the .Net Timer class inside code and the Scheduled Task (windows) and Cron (linus). I need the timer so it is critical, how I get it is less important. However, the farther toward IT-ish settings I go from my code, the higher a chance I will forget to update the live code, or verify the timing device. So the timer does need to be contained in code but I’ll be language and platform agnostic to get this.

Basic Cloud Companies don’t care about Background Tasks

Basic cloud companies are still writing their analysis and deployment tool code. They only care enough about background tasks to point you to a framework that might, kind of, if you look the right way, consider background tasks. Good luck there.

The Big Guys know Background Tasks are important

Amazon and Azure both have some strategy for Background Tasks.

 

AWS is more IT-ish in that you have to grab an Amazon Machine Image (AMI) then dink with the system control for timers (Cron or Schedule Tasks), then deal with a Daemon or Service (yours or someone else’s), then deploy to the AMI. I just want to Git Push and skip the IT headache so thanks but no.

 

Azure (gosh love ‘em) knows we love to write code and has provided the background task concept as a worker role. Awesome! Love it! The only caveat is that the Worker Role is a very specific project framework. You have to adopt and support the framework in order to deploy your background task. That is so close to ideal. But is there anything better?

Cloud Foundry is doing Background Tasks right

Cloud Foundry has a novel approach to background tasks. You write the code and they treat it as a task. Period. No framework, no IT settings. Just code. That is doing background tasks right. Granted I haven’t deployed yet but I’ll give Cloud Foundry the benefit of the doubt.

Did I leave someone out?

I probably left someone’s favorite company off this list. Cloud providers pop up so fast, it is hard to keep up. Sorry about that. If you know of a Cloud company that does background tasks just the way you like, leave a comment below so I can investigate.

Comments

Popular posts from this blog

Yet once more into the breech (of altered programming logic)

Simple WP7 Mango App for Background Tasks, Toast, and Tiles: Code Explanation

How to convert SVG data to a Png Image file Using InkScape