Data Providers

Data Providers encapsulate physical data storages. Data Providers decouple WACEL data structures from underlying storages. Data Providers not only allow WACEL to be easily extended to supported more backend services, but also enable additional scenarios such as failover, cache-aside pattern, data replication, backup & restore, etc.
The following Data Providers are provided out-of-box:
  • TableStorageDataProvider
This Data Provider is based on Windows Azure Table Storage.
  • WindowsAzureCacheDataProvider
This Data Provider is based on Windows Azure Cache.
  • InMemoryDataProvider
This Data Provider is based on a in-memory Dictionary.
  • CacheTableProviderPair
This Data Provider is a TableStorageDataProvider and WindowsAzureCacheDataProvider pair. When data is writeen, it's written to both providers. When data is read, it's retrieved from the cache and falls back to the table if there's a cache miss.
  • DataProviderChain
This is a provider chain that can chain any number of providers together. In current version it supports two consistency mode:
Strong consistency
A write is successul only if the data is successfully written to all storages. And data is retrieved from whichever storage that responds to the read request first. This mode provides faster readbacks.
No consistency
A write is successful if the data is successfully to any storages. And data is retrieved from the storeage that can provides latest version of the data. This mode provides faster writes.

Custom Data Providers

You can implement custom Data Providers by implementing the Microsoft.Ted.DataExtensions.Base.IDataProvider interface.

Last edited Nov 4, 2013 at 7:10 PM by Haishi, version 4