Crates.io | aol |
lib.rs | aol |
version | |
source | src |
created_at | 2024-06-19 16:37:23.392192 |
updated_at | 2024-10-31 19:58:50.588086 |
description | Generic purpose append only log implementation. |
homepage | https://github.com/al8n/aol |
repository | https://github.com/al8n/aol |
max_upload_size | |
id | 1277100 |
Cargo.toml error: | TOML parse error at line 18, column 1 | 18 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include` |
size | 0 |
When developing infrastructure softwares, write-ahead log or append-only log plays an important role, and people re-implement same
funcationalities multiple times, but actually, the core for append-only log is just atomic append
, append_batch
, replay
, and rewrite
.
This crate provides generic purpose append-only log implementation based on std::fs::File
.
aol::fs::AppendLog
:
Generic purpose append-only log implementation based on std::fs::File
.
It is good for:
64
bytes.Pros:
+----------------------+--------------------------+-----------------------+
| magic text (4 bytes) | external magic (2 bytes) | magic (2 bytes) |
+----------------------+--------------------------+-----------------------+-----------------------+-----------------------+
| op (1 bit) | custom flag (7 bits) | len (4 bytes) | data (N bytes) | checksum (8 bytes) |
+----------------------+--------------------------+-----------------------+-----------------------+-----------------------+
| op (1 bit) | custom flag (7 bits) | len (4 bytes) | data (N bytes) | checksum (8 bytes) |
+----------------------+--------------------------+-----------------------+-----------------------+-----------------------+
| ... | ... | ... | ... | ... |
+----------------------+--------------------------+-----------------------+-----------------------+-----------------------+
[dependencies]
aol = "0.3"
aol
is under the terms of both the MIT license and the
Apache License (Version 2.0).
See LICENSE-APACHE, LICENSE-MIT for details.
Copyright (c) 2024 Al Liu.