Crates.io | madeleine |
lib.rs | madeleine |
version | 0.2.1 |
source | src |
created_at | 2023-06-16 21:11:53.023785 |
updated_at | 2023-06-16 21:14:40.833642 |
description | Transparent object persistence with predefined operations and state containers. |
homepage | https://github.com/Evernorth/madeleine-rust |
repository | https://github.com/Evernorth/madeleine-rust.git |
max_upload_size | |
id | 892573 |
size | 80,098 |
WARNING: I am very early alpha and not even feature-complete yet! Do not use me, but feel free to chip in to lend a hand.
I'm a Rust library for building stateful applications with persistent state containers.
My inspiration comes from Ruby's madeleine
gem and, transitively, the earlier Java Prevalayer library.
Using Madeleine, you model applications purely as predefined operations on a protected data structure. These operations are called commands and which may mutate the state of a protected data structure called a system. Using this model, every command which gets executed is transparently serialized and added to an append-only log in which their order is retained. Since the commands are the only things capable of altering the system, this constitutes a complete history of how the application's current state came to be. As every command log is persisted to disk, an application can exit or crash with the understanding that it may replay the command log on resumption without apparent effect. In other words, it could conceivably pick back up right where it left off.
To see it in action, check out the examples
directory for sample code.
This installation method requires a recent version of Cargo which supports cargo-add
:
cargo add madeleine
For older installations of Rust, you can either use cargo-edit
or simply add the dependency to you Cargo.toml
manually:
madeleine = "0.2.0" # Or latest version
Madeleine
interfaceIf you have questions, concerns, bug reports, etc, please file an issue in this repository's Issue Tracker.
Please see the CONTRIBUTING.md file for info on how to get involved.
Madeleine is Open Source Software released under the Apache 2.0 license.