Git Product home page Git Product logo

excessivelysimpleeventstore's Introduction

ExcessivelySimpleEventStore

NuGet version (ExcessivelySimpleEventStore) Build Status

Design

This first version was an attempt at making an EventStore library without ever working directly with one before. I felt I understood the concepts well enough, but didn't know the concrete designs/interfaces out there. So wanted to see how good of interface I could make in C# that would work how I'd want it to.

At times during this process I've messed up some concepts, and that could still be the case. Namely it is currently both a EventStreamStore and a CurrentStateStore... Need to decide if thats what I intend or not

The next step is to compare to other libraries/interfaces and see if they have accomplished anything more elegantly than I.

This is not currently optimized for speed, nor reliability, nor anything really. It is designed to be a very simple interface and usage that requires you to follow Event Sourcing principles. And allows you to do so without any extra overhead at all.

Usage

To use this, you must first implement a Controller, which is just a class which has various public methods matching public void {commandName}(IEventStoreAction<{yourDataType}> datastore, {yourCommandData} cmd)

yourDataType can be a full object tree that you'd need static storage of, your command methods are able to interact with that object, allowing you to debug those interactions

then you're able to create/load your datastore:

var datastore = new EventStore<MyController, MyDataType>(controllerInstance, x => x.Id.ToString(), fileSystem, dataStoreFilePath);

TODO list

  • Make a nuget
  • Compare with other frameworks, support/convert to their interface?
  • (Code) I could have a Func<TValue, TId> idSelector then a Func<TId, string> idNormalizer, which would allow me to make Get nicer to use
  • (Code) wait why did I decide this should all be strings?? Just so serialization is easier?
  • (Code) Add an overload of ExecuteEvent which is Expression<TController> (also with `ExecuteEvent<TControllerMethod, TEvent>)
  • [ ]

excessivelysimpleeventstore's People

Contributors

eibwen avatar

Watchers

James Cloos avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.