Background Services

Dec 16, 2008 at 2:28 PM
I was looking through the code and one of the more interesting features are the background services running inside the website.
I am thinking I can do something similar in a new project I am about to work on.
I really like the idea as it would eliminate having to remember were such and such service is installed or this console app running this job is installed doing multiple deployments etc..

Are running services like this a common occurance? How does it affect things like scalablity, such as moving into a web farm?

Thanks,
Joe

Coordinator
Dec 16, 2008 at 6:02 PM
It's decently scalable.  If you're running Oxite on one web server it should work just fine.  You can run into some troubles having it run inside the web application.  If the web app goes down, your service does too.  What's cool though is that it will come back up when your app does though and it's disconnected enough to pick up where it left off.

For web farms we'd recommend creating a scheduled task to run the background service directly (just build a command-line app that instantiates the services and executes them at the intervals you want [no need for the BackgroundServiceExecutor stuff]) on each node (or just one node in the farm) so it's a separate process and can run independently of the web app.  This is how we do it on Channel 9.