The Cloud Ninja Multi-Tenant Metering Block (CNMB) tenant-level meters, application level aggregates, rich query model based on OData, extensibility to implement customer meters of various Windows Azure resources such as bandwidth, storage, SQL Azure, and compute.
It comes with out-of-box meter providers for bandwidth, storage, SQL Azure, and compute. In future, Microsoft will add providers for Tomcat and CDN.
CNMB includes HTML5 portal to visualize tenant and app level usage. But all data can be queried using OData API, which enables interesting mash-ups in PowerPivot and integration with external systems like billing.
The first Cloud Ninja sample included some metering capabilities along with many other SaaS concepts such as monitoring, scaling, provisioning, etc.
Features of CNMB include:
- Easy to Use: CNMB works with existing multi-tenant SaaS application in a non-intrusive manner. It needs simple configuration to point to SaaS application’s storage account and SQL Azure database and simple regular expressions to associate tenants with resource consumption.
- Economical: CNMB can be deployed in a single web role, which hosts UI, Web Services, and metering workers. Data schema is optimized so that 1GB SQL Azure database can hold an entire year’s worth data for thousands of tenants.
- Standards Based: All data in and out is via authenticated OData API. OData allows rich query model on top of meter data. We support both JSON and Atom payloads. This enables 3rd party apps like PowerPivot and external systems like billing to consume meter data through industry standard API.
- Extensible: CNMB has multiple levels of extension points from writing your own tenant resolver, defining customer meters, and developing customer meter providers.
You can try Live Demo here. The live demo is currently metering Cloud Ninja application. When you try the demo, check out links on home page to app-level, tenant-level usage, PowerPivot dashboard, and OData feed.
You can also download full source code from CodePlex.