]> git.lizzy.rs Git - connect-rs.git/blobdiff - README.md
explain protobuf choice and bump version to 0.1.0
[connect-rs.git] / README.md
index 4f6cbe0593baa5d584a0f0f7499453192f625d61..21e441a2c2081343d5c4a4912b06a8bab718dc1a 100644 (file)
--- a/README.md
+++ b/README.md
@@ -1,8 +1,38 @@
-# connect
+# connect-rs
 
-This crate provides a distributed message queue abstraction over asynchronous network streams.
+[![Crates.io][crates-badge]][crates-url]
+[![Docs.rs][docs-badge]][docs-url]
 
-By using a message queue, crate users can focus on sending and receiving messages between clients instead of low-level networking and failure recovery.
+[crates-badge]: https://img.shields.io/crates/v/connect.svg
+[crates-url]: https://crates.io/crates/connect
+[docs-badge]: https://docs.rs/connect/badge.svg
+[docs-url]: https://docs.rs/connect
+
+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
+the problem of reliable, fault-tolerant message delivery over byte-streams. By using a message
+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
+are packed into a Protobuf `Any` type and then sent over the wire. Message recipients must
+decide what Protobuf message type it is, and correspondingly unpack the `Any` into a particular
+message type.
+
+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