GithubHelp home page GithubHelp logo

shahabganji / eveneum Goto Github PK

View Code? Open in Web Editor NEW

This project forked from eveneum/eveneum

0.0 1.0 0.0 268 KB

Event Store backed by Azure Cosmos DB

License: MIT License

C# 60.06% Gherkin 38.03% JavaScript 1.92%

eveneum's Introduction

Build Status GitHub NuGet NuGet Twitter

Eveneum is a simple, developer-friendly Event Store with snapshots, backed by Azure Cosmos DB.

var database = "Eveneum";
var collection = "Events";

var client = new CosmosClient("connection-string");
var databaseResponse = await client.CreateDatabaseIfNotExistsAsync(database);
var containerResponse = await databaseResponse.Database
    .CreateContainerIfNotExistsAsync(new ContainerProperties(collection, "/StreamId"));

IEventStore eventStore = new EventStore(client, database, collection);
await eventStore.Initialize();

var streamId = Guid.NewGuid().ToString();
EventData[] events = GetEventsToWrite();
await eventStore.WriteToStream(streamId, events);
await eventStore.CreateSnapshot(streamId, 7, GetSnapshotForVersion(7));
await eventStore.ReadStream(streamId);

Project Goals

The aim of the project is to provide a straightforward implementation of Event Store by utilising the features of Azure Cosmos DB. The library will benefit from automatic indexing, replication and scalability offered by Cosmos DB.

  • Ability to store and read stream of events in a single method call. The library will handle retries and batching,
  • Ability to store and read snapshots, including support for reading a snapshot and only consecutive events,
  • Ability to customize the schema of documents stored in Cosmos DB to allow for rich querying capabilities,
  • Built-in optimistic concurrency checks,
  • "Cosmos DB Change Feed"-friendly design to enable building independent projections using Change Feed.

Wiki

All documentation is available in wiki

Stability

Eveneum has been used in Production in a multi-tenant system since Oct 2018, is considerred stable and is being maintained. Any bugs will be fixed as priority.

Support

Please create issues for all bugs / feature requests here.

If you're looking for training / mentoring in the areas of event-sourcing / CosmosDB than contact me directly.

eveneum's People

Contributors

jkonecki avatar thomasvandenbon avatar

Watchers

 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.