-
Notifications
You must be signed in to change notification settings - Fork 12
Home
AtomEventStore is a .NET library that uses the Atom Syndication Format to provide a server-less implementation of an Event Store.
It was created to solve a particular set of problems:
- It should support Test-Driven Development (particularly Outside-In TDD, or GOOS-style TDD) without adding much overhead.
- It should work well with Platform-as-a-Service solutions such as Microsoft Azure.
- It should be scalable.
- It should be lock-free.
- It should be reusable.
- It should be reasonably efficient.
As always in software development, there are trade-offs involved, so while AtomEventStore is designed mainly with the above goals in mind, it's not optimized for low latency, efficient storage, or fastest possible transmission times. It's also not designed to handle concurrent writes; the applications using AtomEventStore are expected to address this problem through applications of the Single Writer pattern.
Despite its priority is first and foremost to be scalable, AtomEventStore still strives towards being reasonably efficient where possible.
Since there's no server component, the client must perform all filtering and projection of an event stream. That involves reading the events from storage into memory, which, depending on the storage mechanism in use, may take some time. However, if the client knows that it isn't going to need to read the entire event stream, the choice of reading forwards or backwards through the event stream may impact performance. Therefore, AtomEventStore includes both a forward-reading Iterator and a backwards-reading Iterator.
Additionally, both Iterators utilize a read-ahead strategy where they pre-fetch the next Atom Feed page to read once enumeration starts in earnest. Still, in order to prevent too many unnecessary pre-fetch operations, pre-fetching first kicks in when the Iterator moves past the first element in a sequence. Thus, peeking at the head of the sequence doesn't trigger a pre-fetch.
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.