NStore started as a playground for experimenting with .net Standard, async and a simple API for a Sql/NoSql backed EventStore.
After years of experience running NEventStore in production we wrote NStore from scratch with a simpler and extensible API.
Build server | Platform | Build Status |
---|---|---|
AppVeyor | Windows | |
GH Actions | Linux | |
Azdo | Windows |
Setup the streams factory
var streams = new StreamsFactory(new InMemoryPersistence());
open the stream
var post = streams.Open("post/123");
append new data
await post.AppendAsync(new Favorited("users/200", DateTime.UtcNow));
read the stream
await post.ReadAsync(chunk =>
{
Console.WriteLine($"{chunk.PartitionId} #{chunk.Index} => {chunk.Payload}");
return Subscription.Continue;
});
Process the stream
var favs = await post.AggregateAsync<UniqueFavs>();
Console.WriteLine($"{favs.Count} users added '{post.Id}' as favorite");
Full source at src/NStore.Quickstart/Program.cs
The source comes with a Sample App to illustrate some basic stuff you can do.