Home

Awesome

<p align="center"> <img src="https://github.com/yevhen/Streamstone/blob/master/Logo.Wide.png?raw=true" alt="Streamstone's logo"/> </p>

Streamstone is a tiny embeddable 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.

Features

Installing from NuGet NuGet

To install Streamstone via NuGet, run this command in NuGet package manager console:

PM> Install-Package Streamstone

Building from source Build status

To build Streamstone binaries on Windows you will need to have Visual Studio 17 Update 3 or higher and .NET Core SDK 2.0 or higher. To build binaries on Linux use dotnet cli tooling (ie dotnet build).

Running unit tests

Windows/Linux/MacOs

Use Azurite npm package to run tests and example app against an emulated table storage service.

WARNING: Azurite doesn't fully emulate Azure Table Storage functionality so you may have some of the tests failing.

NOTE: Alternatively, you could run against real Azure by setting storage account connection string to Streamstone-Test-Storage user-level environment variable.

Design

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 always including stream header entity with every write, making it impossible to append to a stream without first having a latest Etag. Duplicate event detection 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).

Schema

<a href="https://raw.githubusercontent.com/yevhen/Streamstone/master/Doc/Schema.png" target="_blank" title="Click to view full size"><img src="https://raw.githubusercontent.com/yevhen/Streamstone/master/Doc/Schema.png" alt="Schema" style="max-width:100%;"/></a>


<a href="https://raw.githubusercontent.com/yevhen/Streamstone/master/Doc/Schema_VP.png" target="_blank" title="Click to view full size"><img src="https://raw.githubusercontent.com/yevhen/Streamstone/master/Doc/Schema_VP.png" alt="Schema for virtual partitions" style="max-width:100%;"/></a>

Usage

Essentials
Application
Demo

Limitations

While Streamstone allows you to pass any number of events to Stream.Write, the max batch size limit imposed by Azure Table Storage is 100 entities, therefore:

Other limitations of the underlying Azure Table Storage API:

WATS limitations on MSDN

Community

Gitter

License

MIT License