#event-sourcing #sql-server

eventful-sql-server

A library for event sourcing in Rust

4 releases

0.2.1 Jan 21, 2024
0.2.0 Jan 16, 2024
0.1.19 Dec 10, 2023
0.1.0-alpha.0 Jun 26, 2023

#1067 in Database interfaces

37 downloads per month

Apache-2.0

30KB
499 lines

eventful

This is an event sourcing system for rust. Inspired by Akka persistence, Titanclass edfsm, and Heiko Seeberger's EventSourced. I'll add links here soon to those projects and eventually some info about where this differs from those.

Usage

Don't use this yet. It's not nearly feature complete, is utterly untested, and is definitely not suitable for production use.

SQL Server Setup

create table journal
(
    offset         bigint      not null primary key,
    entity_type    varchar(32) not null,
    persistence_id varchar(32) not null,
    event_type     varchar(32) not null,
    message        varbinary(8000) not null,
    deleted        bit null default 0,
    event_date     datetime2   not null,
);

create table snapshot
(
    name   varchar(64) not null primary key,
    offset bigint      not null,
    value  varbinary( max) not null,
);

Dependencies

~18–29MB
~585K SLoC