tokio-cqrs-es2-store

Crates.iotokio-cqrs-es2-store
lib.rstokio-cqrs-es2-store
version0.3.0
sourcesrc
created_at2021-08-30 04:01:43.14614
updated_at2021-09-22 23:59:04.261663
descriptionAsync implementation of the cqrs-es2 store.
homepage
repositoryhttps://github.com/brgirgis/tokio-cqrs-es2-store
max_upload_size
id443997
size192,902
Bassem Girgis (brgirgis)

documentation

https://docs.rs/tokio-cqrs-es2-store

README

tokio-cqrs-es2-store

Async implementation of the cqrs-es2 store.

Publish Test Latest version docs License


Provides async interfaces to different database implementations for the CQRS system store.

Design

The main components of this library are:

  • IEventDispatcher - an interface for async events listeners
  • IEventStore - an interface for async event stores
  • IQueryStore - an interface for async query stores

Features

  • with-postgres - async Postgres store
  • with-mysql - async MySQL store
  • with-sqlite - async SQLite store
  • with-all-sql - all SQL drivers
  • with-mongodb - async MongoDB store
  • with-all-doc-db - all doc DBs drivers
  • with-redis - async Redis store
  • with-all-kv-db - all key-value DBs drivers
  • with-all-async - all async drivers (default)

Installation

To use this library in an async application, add the following to your dependency section in the project's Cargo.toml:

[dependencies]
# logging
log = { version = "^0.4", features = [
  "max_level_debug",
  "release_max_level_warn",
] }
fern = "^0.5"

# serialization
serde = { version = "^1.0.127", features = ["derive"] }
serde_json = "^1.0.66"

async-trait = "^0.1"

# CQRS framework
cqrs-es2 = { version = "*"}

# Sync postgres store implementation
tokio-cqrs-es2-store = { version = "*", default-features = false, features = [
  "with-postgres",
] }

# sqlx
sqlx = { version = "0.5.6", features = [
  # tokio + rustls
  "runtime-tokio-rustls",
  # PostgresSQL
  "postgres",
  "uuid",
  "json",
  # misc
  "macros",
  "chrono",
  "tls",
] }

tokio = { version = "1", features = [
  "rt-multi-thread",
  "time",
  "fs",
  "macros",
  "net",
] }

Usage

Full async store example applications:

Change Log

A complete history of the change log can be found here

TODO

An up-to-date list of development aspirations can be found here

Commit count: 39

cargo fmt