Worker Roles on Azure

Topics: Customizing Orchard
Oct 14, 2011 at 4:51 PM

Hi folks,

I'm interested to know whether Orchard has the ability to run outside of ASP.NET, specifically Azure Worker Roles. We have a number of loooong running processes (usually in response to something in an order workflow) that access various data sources.

We were thinking of using our own NHibernate mappings, etc. and then write the necessary modules to integrate these pieces into Orchard. That way the long running processes could live in their own isolated world without impacting Orchard, but now we're gradually coming to a point where we want to use data that is coming from other Orchard modules (comments, ratings, etc.). I don't really want to write additional mappings that deal with data we don't own.

My current thinking is that we initialize Orchard using the same kind of mechanism as the command line application and then access things in the same manner as we would in the web application. Is this at all viable? Or are there other approaches that we should be considering? Bear in mind that we have quite a substantial amount of (old) backend code that currently has no knowledge of Orchard with the exception of sharing the same underlying database...



Oct 14, 2011 at 5:04 PM

That is a possible scenario. The way I would think about it, would be to have a base class for Workers, or any mechanism that could turn a Background task into a worker on Azure.