Event store library for .NET Core based on rdbms persistance.
A thin (but powerful) slice of library between your code and rdbms.
ALMOST READY FOR PRODUCTION USAGE
Manta is not available on NuGet, yet.
You can download source code from this repository and compile under Visual Studio 2017.
- Async all the way down
- No external dependencies
- Pluggable persistance storage
- Idempotent writes
- Support optimistic concurrency
- Support any kind of message serialization
- Support any kind of loggers through ILogger interface for Manta internal logging
- Support up-conversion of events to the newest version
- Subscriptions to one or many event stream sources for processmanagers/projections/others
- MS SQL Server - Manta implementation (with single-writer pattern)
- MS SQL Server - Manta.Projections implementation
last but not least, performance
- on i5 2500k with SSD benchmarked ~15,000 writes per second
- on i7 8700k with SSD benchmarked ~25,000 writes per second (reading streams are really fast)
SSD disk speed is an important factor
- Manta - InMemory implementation
- Manta.Projections - InMemory implementation
- Manta.PostgreSql - PostgreSql implementation
- Manta.MySql - MySql implementation
- Manta.SqLite - SqLite implementation
- Manta.Domain (as different repository)
- Manta.Domain - Conflict resolver, repository pattern, unit of work, e.t.c.
// Simple class representing event/message which will be stored
[DataContract]
public class SomeEvent
{
[DataMember(Order = 1)]
public string Name { get; private set; }
public SomeEvent(string name)
{
Name = name;
}
}
// Basic example of usage
ISerializer serializer = new JilSerializer(); // You can use any type of serialization method
ArraySegment<byte> payload = serializer.Serialize(ev);
string contractName = GetContractNameBasedOnEventType(ev.GetType());
var data = new UncommittedMessages(
SequentialGuid.NewGuid(), // correlationId
new []
{
new MessageRecord(
SequentialGuid.NewGuid(), // messageId
contractName,
payload)
});
await store.AppendToStream(
"stream-1",
ExpectedVersion.NoStream,
data);
More examples you can find on wiki.
If you're looking for documentation, you can find it here.
A contribution is welcome. Checkout contributing rules.