Streamstone is a small library targeted at building scalable event-sourced applications on top of Azure Table Storage. It has simple, functional style API, heavily inspired by Greg Young's Event Store.
- Fully ACID compliant
- Optimistic concurrency and idempotency support
- Custom stream and event properties you can query on
- Synchronous projections and snapshots
- Friendly for multi-tenant designs
To install Streamstone via NuGet, run this command in NuGet package manager console:
PM> Install-Package Streamstone
To build Streamstone's binaries, just clone the repository and build solution from Visual Studio, Alternatively, run the following command from solution's root directory:
> Nake.bat
For a list of available commands run Nake.bat -T
.
Streamstone is just a thin layer (library, not a server) on top of Windows Azure Table Storage. It implements low-level mechanics for dealing with event streams, and all heavy-weight lifting is done by underlying provider.
The api is stateless and all exposed objects are immutable, once fully constructed. Streamstone doesn't dictate payload serialization protocol, so you are free to choose any protocol you want.
Optimistic concurrency is implemented by making version part of RowKey identifier. Idempotence support is done by automatically creating additional entity for every event, with RowKey value set to a unique identifier of a source event (consistent secondary index).
- Provisioning stream [see]
- Opening stream [see]
- Writing to stream [see]
- Reading from stream [see]
- Additional entity includes [see]
- Optimistic concurrency [see]
- Idempotent processing [see]
- Custom stream metadata [see]
- Virtual partitions [see]
The write batch size limit, imposed by Azure Table Storage, is 100 entities, therefore:
- The maximum write batch size is 99 entities (100 - 1 header entity)
- With idempotency enabled, maximum write batch size is 49 events (100/2 - 1 header entity)
Other limitations of the underlying Azure Table Storage API:
- Maximum size of batch is 4MB
- Maximum size of entity is 1 MB
- Maximum size of property is 64Kb
- Maximum length of property name is 255 chars
- An entity can have up to 255 custom properties
Apache 2 License