Content-Length: 201069 | pFad | http://github.com/Eveneum/Eveneum/wiki

43 Home · Eveneum/Eveneum Wiki · GitHub
Skip to content
Jakub Konecki edited this page Nov 30, 2023 · 13 revisions

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));

var stream = await eventStore.ReadStream(streamId);

Check Quick Start for more info.

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 benefits 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.

Major versions

4.x, 5.x, 6.x

Current major version of Eveneum is 6.x. It uses Cosmos DB SDK 3.35.4 and supports transactional writes. This version is actively worked on and should be a default choice for new projects.

2.x, 3.x

Those major versions use Cosmos DB SDK 3.1.1. Please consider upgrading to 4.x as there are no breaking changes in API.

The support for non-partitioned collections in Cosmos DB has been removed in version 2.x, as the non-partitioned collections are being retired from Cosmos DB. If you need to support non-partition collections, please use version 1.x.

1.x

This version uses Cosmos DB SDK 2.x and supports both partitioned and non-partitioned collections. This version is not actively maintained with only bug-fixes being considered.









ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/Eveneum/Eveneum/wiki

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy