A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/GreanTech/AtomEventStore below:

GreanTech/AtomEventStore: A server-less .NET Event Store based on the Atom syndication format

A server-less .NET Event Store based on the Atom syndication format.

AtomEventStore is designed to be a lightweight Event Store implementation. It offers the following benefits:

Due to its flexible design and simple storage requirements, you can easily implement a storage implementation on top of your favourite storage mechanism: document databases, relational database, and so on. All you have to do is to implement a single interface with two methods! If you are interested in contributing a storage implementation, please first submit an issue to start the discussion.

AtomEventStore is easy to use, and is built on well-known abstractions already present in .NET.

You write events one at a time using the AtomEventObserver<T> class.

In this example, obs is an instance of AtomEventObserver<object>, and userCreated is represent an event:

When the call to obs.OnNext returns, the userCreated event has been written to storage.

Asynchronous writes can be done using the standard Task Parallel Library (TPL) model for asynchrony:

await obs.AppendAsync(userCreated);

Notice that since AtomEventObserver<T> uses the standard TPL model, you can use it with async and await.

When the task returned by obs.AppendAsync completes, the userCreated event has been written to storage.

You can read events either forwards or backwards. In both cases, reading events is based on the standard IEnumerable<T> interface.

var firstEvent = events.First();

The above example simply reads the first event in the event stream.

AtomEventStore is available via NuGet:

AtomEventStore follows Semantic Versioning 2.0.0.

The idea that an Event Store can be modelled as a Linked List was originally put to my attention by Yves Reynhout in his article Your EventStream is a linked list.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4