From 5073c967a0f47fad5d16b4fbadeca0f59bcd4d11 Mon Sep 17 00:00:00 2001 From: Sachandhan Ganesh Date: Thu, 4 Feb 2021 11:38:17 -0800 Subject: [PATCH] explain protobuf choice and bump version to 0.1.0 --- Cargo.toml | 2 +- README.md | 17 +++++++++++------ src/lib.rs | 16 +++++++++++----- 3 files changed, 23 insertions(+), 12 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 47d39d5..d17cccb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "connect" -version = "0.0.8" +version = "0.1.0" edition = "2018" authors = ["Sachandhan Ganesh "] description = "message queue abstraction over async network streams" diff --git a/README.md b/README.md index 41ce2a7..21e441a 100644 --- a/README.md +++ b/README.md @@ -8,8 +8,8 @@ [docs-badge]: https://docs.rs/connect/badge.svg [docs-url]: https://docs.rs/connect -This Rust crate provides a reliable, fault-tolerant, and brokerless message-queue abstraction over -asynchronous network streams. +This Rust crate provides a simple brokerless message-queue abstraction over asynchronous network +streams. ## Why? When building networked applications, developers shouldn't have to focus on repeatedly solving @@ -17,6 +17,10 @@ the problem of reliable, fault-tolerant message delivery over byte-streams. By u queue abstraction, crate users can focus on core application logic and leave the low-level networking and message-queue guarantees to the abstraction. +## Examples +Please use the [examples](https://github.com/sachanganesh/connect-rs/tree/main/examples) +provided to help understand crate usage. + ## Protobuf This crate relies on the use of [Protocol Buffers](https://developers.google.com/protocol-buffers) due to it being widely adopted and industry-proven. All messages are Protobuf messages that @@ -24,10 +28,11 @@ are packed into a Protobuf `Any` type and then sent over the wire. Message recip decide what Protobuf message type it is, and correspondingly unpack the `Any` into a particular message type. -## Examples -Please use the [examples](https://github.com/sachanganesh/connect-rs/tree/main/examples) -provided to help understand crate usage. - +Protobuf was chosen when the library hit a roadblock with Rust's `TypeId` potentially not being +consistent between Rust compiler versions. The crate requires a consistent way to determine what +type of message is received, so it can appropriately deserialize the message from network bytes. +Until the Rust ecosystem around reflection improves, the crate will use Protobuf to fill the +void. ## Feature Status diff --git a/src/lib.rs b/src/lib.rs index 8550027..4f1fe18 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,5 +1,5 @@ -//! This crate provides a reliable, fault-tolerant, and brokerless message-queue abstraction over -//! asynchronous network streams. +//! This crate provides a simple brokerless message-queue abstraction over asynchronous network +//! streams. //! //! # Why? //! When building networked applications, developers shouldn't have to focus on repeatedly solving @@ -7,6 +7,10 @@ //! queue abstraction, crate users can focus on core application logic and leave the low-level //! networking and message-queue guarantees to the abstraction. //! +//! # Examples +//! Please use the [examples](https://github.com/sachanganesh/connect-rs/tree/main/examples) +//! provided to help understand crate usage. +//! //! # Protobuf //! This crate relies on the use of [Protocol Buffers](https://developers.google.com/protocol-buffers) //! due to it being widely adopted and industry-proven. All messages are Protobuf messages that @@ -14,9 +18,11 @@ //! decide what Protobuf message type it is, and correspondingly unpack the `Any` into a particular //! message type. //! -//! # Examples -//! Please use the [examples](https://github.com/sachanganesh/connect-rs/tree/main/examples) -//! provided to help understand crate usage. +//! Protobuf was chosen when the library hit a roadblock with Rust's `TypeId` potentially not being +//! consistent between Rust compiler versions. The crate requires a consistent way to determine what +//! type of message is received, so it can appropriately deserialize the message from network bytes. +//! Until the Rust ecosystem around reflection improves, the crate will use Protobuf to fill the +//! void. mod reader; pub(crate) mod schema; -- 2.44.0