https://github.com/motoras/kekbit
Ultralight persistent data channels in rust
https://github.com/motoras/kekbit
data-channel ipc middleware-pipeline rust rust-library
Last synced: 8 months ago
JSON representation
Ultralight persistent data channels in rust
- Host: GitHub
- URL: https://github.com/motoras/kekbit
- Owner: motoras
- License: mit
- Created: 2018-11-13T19:51:24.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2022-02-18T11:09:37.000Z (over 4 years ago)
- Last Synced: 2025-07-12T00:05:10.873Z (11 months ago)
- Topics: data-channel, ipc, middleware-pipeline, rust, rust-library
- Language: Rust
- Homepage:
- Size: 282 KB
- Stars: 6
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Kekbit
[](
https://crates.io/crates/kekbit)
[](https://docs.rs/kekbit)
[](
https://www.rust-lang.org)
[](https://github.com/motoras/kekbit/blob/master/LICENSE)
[](https://github.com/motoras/kekbit/actions?query=workflow%3ABuild)
[](https://github.com/motoras/kekbit/actions?query=workflow%3AClippy)
[](https://codecov.io/gh/motoras/kekbit)
Mean and lean components for working with ultralight **persistent data channels** in rust. Channels could be used for communication, transaction journaling, live replication of an application state or as a backend for persisting software system images.
## Basic Concepts
### Persistent data channels
* A mechanism to sequentially persist data at a very fast rate
* They are **writer bound** - it is a writer which creates them and specify the particular structure of a channel such size, maximum record length, or timeout
* They have a fixed predefined capacity.
* Once a channel is closed, is full, or is abandoned it will never be used again for writing.
* They are byte-oriented sinks.
* They are backed by a file; using a RAM disk for storage such as tempfs or /dev/shm could provide blazing fast speeds.
* They always use little endian byte order.
### Writers and Readers
* Writers are components which push data into a persistent channel. For each channel there is only one writer.
* Write operation can be done in stages using a chain of handlers.
* Readers are components which poll data from a channel. Data available in the channel could be consumed multiple times, sequential or in parallel by multiple readers.
* The default implementations for both readers and writers are non-blocking.
* Readers also offer a straight `Iterator` API.
## Usage
Add this to your `Cargo.toml`:
```toml
[dependencies]
kekbit = "0.3.4"
```
See the [Examples](https://github.com/motoras/kekbit/blob/master/examples/README.md) for detailed usage.
## Compatibility
The minimum supported Rust version is 1.31. Any change to this is considered a breaking change.
## License
Licensed under MIT license ([LICENSE](LICENSE) or http://opensource.org/licenses/MIT)
### Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted
for inclusion in the work by you, shall be licensed as above, without any additional terms or conditions.