From 4f522e7e3568e214af212518a88b55cbeec58493 Mon Sep 17 00:00:00 2001 From: Chris Tsang Date: Sat, 30 Nov 2024 20:41:07 +0000 Subject: [PATCH] 0.5.2 --- CHANGELOG.md | 28 +++++++++++++++++++++++----- Cargo.toml | 2 +- README.md | 25 ++++++++++++++++++++++--- sea-streamer-fuse/Cargo.toml | 2 +- sea-streamer-redis/Cargo.toml | 2 +- sea-streamer-socket/Cargo.toml | 2 +- sea-streamer-types/Cargo.toml | 2 +- src/lib.rs | 25 ++++++++++++++++++++++--- 8 files changed, 72 insertions(+), 16 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 233e14c..ec4aa50 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,16 +5,34 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). -## Pending +## 0.5.2 - 2024-11-30 -### `sea-streamer-socket` 0.5.1 - 2024-09-02 +### `sea-streamer-types` + +* Added `From` and `FromIterator` for `StreamerUri` https://github.com/SeaQL/sea-streamer/pull/28 +* Impl `Default` for `Payload` +* Impl serde `Serialize` & `Deserialize` for `StreamKey` + +### `sea-streamer-socket` * Compile socket without stdio backend https://github.com/SeaQL/sea-streamer/pull/35 -### Enhancements +### `sea-streamer-redis` -* Added `From` and `FromIterator` for `StreamerUri` https://github.com/SeaQL/sea-streamer/pull/28 -* `Streamer::connect` now accepts `S: Into` +* Support nanosecond timestamp in Redis (under feature flag `nanosecond-timestamp`) +* Support custom message field +* Added `RedisProducer::send_with_ts` to specify custom timestamp +* Added `RedisProducer::flush_immut` +* Added `RedisProducer::trim` to perform `XTRIM MAXLEN` +* Fixed `capacity overflow` error in some cases + +### `sea-streamer-file` + +* Added a special `SEA_STREAMER_WILDCARD` stream key to subscribe to all streams in a file + +### `sea-streamer-fuse` + +* Added a `StreamJoin` component for joining multiple streams by timestamp ## 0.5.0 - 2024-04-24 diff --git a/Cargo.toml b/Cargo.toml index 9bc10e9..c0d1f5a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,7 +17,7 @@ members = [ [package] name = "sea-streamer" -version = "0.5.0" +version = "0.5.2" authors = ["Chris Tsang "] edition = "2021" description = "🌊 The stream processing toolkit for Rust" diff --git a/README.md b/README.md index 6ebfd7f..5787362 100644 --- a/README.md +++ b/README.md @@ -20,16 +20,16 @@ SeaStreamer is a toolkit to help you build real-time stream processors in Rust. 1. Async -SeaStreamer provides an async API, and it supports both `tokio` and `async-std`. In tandem with other async Rust libraries, +SeaStreamer provides an async and non-blocking API with no locks on the hot path. Supporting both `tokio` and `async-std`, you can build highly concurrent stream processors. 2. Generic -We provide integration for Redis & Kafka / Redpanda behind a generic trait interface, so your program can be backend-agnostic. +We provide integration for Redis & Kafka behind a generic trait interface, so your program can be backend-agnostic. 3. Testable -SeaStreamer also provides a set of tools to work with streams via unix pipes, so it is testable without setting up a cluster, +SeaStreamer also provides a set of tools to work with streams via unix files / pipes, so it is testable without setting up a cluster, and extremely handy when working locally. 4. Micro-service Oriented @@ -145,6 +145,20 @@ cargo run --bin consumer -- --stream $STREAMER_URI/hello2 kill %1 %2 ``` +With File: + +```shell +# Create the file +file=/tmp/sea-streamer-$(date +%s) +touch $file && echo "File created at $file" +# Produce some input +cargo run --bin producer -- --stream file://$file/hello & +# Replay the input +cargo run --bin consumer -- --stream file://$file/hello +# Start the processor, producing some output +cargo run --bin processor -- --input file://$file/hello --output stdio:///hello +``` + With Stdio: ```shell @@ -153,6 +167,11 @@ cargo run --bin producer -- --stream stdio:///hello1 | \ cargo run --bin processor -- --input stdio:///hello1 --output stdio:///hello2 ``` +## Production + +SeaStreamer File powers the event stream of [FireDBG](https://firedbg.sea-ql.org/). +We use SeaStreamer Redis heavily ourselves in production. + ## Architecture The architecture of [`sea-streamer`](https://docs.rs/sea-streamer) is constructed by a number of sub-crates: diff --git a/sea-streamer-fuse/Cargo.toml b/sea-streamer-fuse/Cargo.toml index 34e6846..c133aa6 100644 --- a/sea-streamer-fuse/Cargo.toml +++ b/sea-streamer-fuse/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sea-streamer-fuse" -version = "0.5.0" +version = "0.5.2" authors = ["Chris Tsang "] edition = "2021" description = "Stream processing toolbox" diff --git a/sea-streamer-redis/Cargo.toml b/sea-streamer-redis/Cargo.toml index d4c84c6..4d0d126 100644 --- a/sea-streamer-redis/Cargo.toml +++ b/sea-streamer-redis/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sea-streamer-redis" -version = "0.5.0" +version = "0.5.2" authors = ["Chris Tsang "] edition = "2021" description = "🌊 SeaStreamer Redis Backend" diff --git a/sea-streamer-socket/Cargo.toml b/sea-streamer-socket/Cargo.toml index d6824d7..17e982e 100644 --- a/sea-streamer-socket/Cargo.toml +++ b/sea-streamer-socket/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sea-streamer-socket" -version = "0.5.1" +version = "0.5.2" authors = ["Chris Tsang "] edition = "2021" description = "🌊 SeaStreamer backend-agnostic Socket API" diff --git a/sea-streamer-types/Cargo.toml b/sea-streamer-types/Cargo.toml index 1c91ca2..99ed622 100644 --- a/sea-streamer-types/Cargo.toml +++ b/sea-streamer-types/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sea-streamer-types" -version = "0.5.0" +version = "0.5.2" authors = ["Chris Tsang "] edition = "2021" description = "🌊 SeaStreamer Traits & Types" diff --git a/src/lib.rs b/src/lib.rs index bf80170..c9a1bcc 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -20,16 +20,16 @@ //! //! 1. Async //! -//! SeaStreamer provides an async API, and it supports both `tokio` and `async-std`. In tandem with other async Rust libraries, +//! SeaStreamer provides an async and non-blocking API with no locks on the hot path. Supporting both `tokio` and `async-std`, //! you can build highly concurrent stream processors. //! //! 2. Generic //! -//! We provide integration for Redis & Kafka / Redpanda behind a generic trait interface, so your program can be backend-agnostic. +//! We provide integration for Redis & Kafka behind a generic trait interface, so your program can be backend-agnostic. //! //! 3. Testable //! -//! SeaStreamer also provides a set of tools to work with streams via unix pipes, so it is testable without setting up a cluster, +//! SeaStreamer also provides a set of tools to work with streams via unix files / pipes, so it is testable without setting up a cluster, //! and extremely handy when working locally. //! //! 4. Micro-service Oriented @@ -145,6 +145,20 @@ //! kill %1 %2 //! ``` //! +//! With File: +//! +//! ```shell +//! # Create the file +//! file=/tmp/sea-streamer-$(date +%s) +//! touch $file && echo "File created at $file" +//! # Produce some input +//! cargo run --bin producer -- --stream file://$file/hello & +//! # Replay the input +//! cargo run --bin consumer -- --stream file://$file/hello +//! # Start the processor, producing some output +//! cargo run --bin processor -- --input file://$file/hello --output stdio:///hello +//! ``` +//! //! With Stdio: //! //! ```shell @@ -153,6 +167,11 @@ //! cargo run --bin processor -- --input stdio:///hello1 --output stdio:///hello2 //! ``` //! +//! ## Production +//! +//! SeaStreamer File powers the event stream of [FireDBG](https://firedbg.sea-ql.org/). +//! We use SeaStreamer Redis heavily ourselves in production. +//! //! ## Architecture //! //! The architecture of [`sea-streamer`](https://docs.rs/sea-streamer) is constructed by a number of sub-crates: