For certain projects, my team uses a componentized and distributed system architecture based on CQRS and Event Sourcing. We find that for complex domains that add significant business value, this sort of architecture is worth the extra investment as it helps ensure that:
- The system scales.
- The system is easier to maintain.
- If the business change their mind or introduce new requirements, it is easier to deal with.
- When things do go wrong, the system degrades instead of going offline completely.
- DR environments are relatively easy to build.
We do all this using Microsoft’s PaaS offering as we like to run each component on its own stack, and Windows Azure allows us to easily deploy, update & maintain everything. However… for our team members to build & test components in this environment, there needs to be a way for them to run the system locally. Given the architecture, this might involving running many roles and instances (processes) that are all communicating with each other via a messaging system built on top of Azure Blob Storage. Unfortunately we’ve found the Azure Storage Emulator has significant short comings in this type of environment. It doesn’t scale very well, utilizes lots of system resources and suffers from a number of stability issues. This has ultimately been chewing up lots of developer man hours in maintenance and troubleshooting.
LightBlue is a development framework that abstracts our dependency on the Azure platform. It provides a light-weight hosting mechanism allowing both worker & web roles to be deployed (without packaging) in a dedicated process. This approach has yielded the following advantages:
- Faster build times. We found the packaging step required to deploy to the Azure Emulator is very slow. LightBlue does not require packaging.
- Much faster blob storage access. Under low/moderate load, we’ve found the Azure Storage Emulator consistently takes ~1 second and regularly takes up to 10 seconds to be retrieve a blob of less than 1 KB.
- Slow & buggy compute emulator UI. It’s just gone.
- No limits. The Azure emulator limits the number of roles, deployments you are running.
- Reduced Hard Drive usage. The Azure Emulator seems to use a lot of disk space.
- Reduced CPU usage. We found that the Azure Storage Emulator used a lot (or all) of the CPU resources available on our developers machines.
- More Stable. The Azure Storage Emulator regularly falls over under load.
- We consider LightBlue to be in the “experimental quality band” (it has been in development for 9 days).
- We do not advise moving your projects over to it at this stage, however we do encourage you to try it out and let us know what you think.
- Do not expect future versions of the API and emulator to offer any level of compatibility with this early release.
- LightBlue is currently dependent on Autofac (IoC Container), I’m advocating a different approach here.
- Azure Queues / Topics are not yet supported (coming!).
- The “Getting Started” documentation is a bit sparse, we’re working on it!
I’ll keep you up to date as development progresses. Kudos to Colin Scott for all his hard work and late nights on the project.