weida
Lines and stations read off cargo metadata at 92c768a; every segment is a dependency between two workspace crates. Publication state from crates.io. Pending segments from README.md.
What it is
L0L1L2
It is built in layers. L0 is a stream core: ZeroMQ's idea rebuilt on QUIC, whose primitives are unidirectional and bidirectional streams and datagram flows with exactly the guarantees QUIC gives — ordered bytes within a stream, none across streams, flow control, a transport delivery receipt, and cancellation by reset. L1 is the ZeroMQ/nanomsg pattern family as thin wrappers over L0: Req/Rep, Push/Pull, Pub/Sub, PAIR, SURVEY and BUS — the whole nanomsg set — and RADIO/DISH for lossy fan-out of segments; only RADIO/DISH adds wire vocabulary (DATA key 13, SUBSCRIBE key 2). L2 is a RabbitMQ-analog broker, weida-broker: queues at endpoint paths, publisher confirms, an absolute per-subscription credit, and consumer settlement with requeue when a consumer is lost. The redelivery count on the wire, relaying a consumer's report to the producer and retiring a queue are still to come.
The cursor
A completion is a cursor, not a verdict: a level plus an absolute byte offset, reported on a unidirectional stream of its own that never shares a stream with payload. So a Push producer gets a reliable Accepted without an exchange, a reader learns how far the far end got rather than only whether it finished, and no pattern changes shape to gain any of it.
State
Status: alpha. weida, weida-core, weida-protocol, weida-runtime, weida-winpipe, weida-broker, weida-raft, weida-openbao, weida-http-codec and weida-http are published on crates.io, all at 0.1.0-alpha.16. The other eighteen members are not published: weida-c, weida-py-core, every Python binding, the other five protocol libraries with their codecs, and weida-testkit, which only tests use. The one exception on crates.io, weida-zmtp 0.1.0-alpha.2, is an old release that receives no updates. The Python package weida goes to pypi.org with every v* tag from 0.1.0-alpha.16 on, as wheels for manylinux x86_64 and aarch64, macOS 11 arm64 and win_amd64 and with no sdist. The JavaScript package weida goes to npmjs.org with every v* tag from 0.1.0-alpha.14 on, with prebuilt libweida for linux-x64, linux-arm64, darwin-arm64 and win32-x64; up to 0.1.0-alpha.13 it was @tuco86/weida on the forge's npm registry. Wire protocol version 0 is experimental and breaking changes are permitted within 0.x. Phase status lives in docs/IMPLEMENTATION.md §1.
From README.md.
Quick start, without writing a program
$ cargo run -q -p weida --bin weida -- serve --echo 'weida://127.0.0.1:7443/echo'
weida://sha256:22ed30a8…9f25@127.0.0.1:7443/echo$ printf 'hello weida' | cargo run -q -p weida --bin weida -- request 'weida://sha256:22ed30a8…9f25@127.0.0.1:7443/echo'
hello weidaFour verbs: serve (with --echo, --sink or --pub), request, send and sub. The payload is on stdin and stdout and nothing else is, so weida request … | sha256sum means what it looks like; addresses, receipts and topics go to stderr. The address serve printed is the whole client configuration, exactly as in the section below. Every transport works the same way — weida+unix://%2Ftmp%2Fs.sock/echo for a socket, weida+pipe://NAME/echo for a Windows pipe — and the exit code names the error a script can act on: 3 refused, 4 unknown endpoint, 5 no reply, 6 untrusted, 7 connection lost. weida --help lists every option, including sub --framing line|raw|nul|length, because a newline after each payload is readable and is not framing.
Identity in one line
A weida peer is its public key. The server generates an identity and prints an address that names it; the client trusts that address and nothing else:
$ cargo run -p weida --example transform_server -- --bind 127.0.0.1:7443
weida://sha256:22ed30a8…9f25@127.0.0.1:7443/transform
weida://sha256:22ed30a8…9f25@127.0.0.1:7443/echo$ printf 'hello weida' | cargo run -p weida --example transform_client -- 'weida://sha256:22ed30a8…9f25@127.0.0.1:7443/transform'
HELLO WEIDANo certificate file changes hands, no CA exists, and a peer with any other key is refused with Untrusted(sha256:…) naming the key that answered. --identity PATH keeps the server's key across restarts so the address stays stable; --cert-out PATH plus transform_client --ca PATH is the same exchange through a trusted certificate and a plain address instead. In code: Identity::generate(), Trust::by_address() / Trust::pin(fp) / Trust::anchor(pem), ServerTls::require_client(trust) for mutual identity or ServerTls::require_client(ClientTrust::AnyKey) for clients whose key is their only identity, and IncomingMeta::peer to see who sent what.
Expected on stderr: delivered — QUIC's transport receipt for the request, not an application acknowledgement — and a trace id that also appears in the server's log line for the request.
Lines
| Line | Stations | Document |
|---|---|---|
| weida |
| Architecture |
| ZMQ |
| ZeroMQ (libzmq 4.3.5) — feature parity |
| NNG |
| nanomsg/NNG (SP v1, measured against NNG 1.4.0-rc.0) — feature parity |
| MQTT |
| MQTT 5.0 (OASIS Standard 2019-03-07, measured against rumqttd 0.20.0 and rmqtt 0.23.1) — feature parity |
| AMQP |
| AMQP 1.0 (OASIS Standard, 29 October 2012) — feature parity |
| NATS |
| Core NATS (client protocol, `nats-server` 2.14) — feature parity |
| base |
| 0014 — Four parallel library workstreams, and bindings that follow each library |
Destinations
- Guide
0. The question: C8B1. One transfer, and what you may say about it2. Many peers, and the drop
- Reference
8 documents
ArchitecturePatternsweida wire protocol, version 0GuaranteesFailure modelInvariantsThe store interfaceImplementation
- Decisions
46 documents
0001 — Sequence field — scope and layer0002 — Control and bulk traffic — separation against head-of-line coupling0003 — Flow-control credit — unit and layer0004 — Durability levels for `Stored` and `Replicated`0005 — The refusal race — closed as documented behaviour0006 — Guarantee sets and explicit managed-resource boundaries0007 — The topic namespace — opaque paths, segmented topic filters0008 — Session identity — the proved fingerprint, and nothing elseand 38 more
- Libraries
19 documents
AMQP 1.0 for Python (python-qpid-proton 0.40.0) - feature parityAMQP 1.0 (OASIS Standard, 29 October 2012) — feature parityHTTP (hyper 1.12.0, h3 0.0.8) — feature parityMQTT 5 for Python (paho-mqtt 2.x) — feature parityMQTT 5.0 (OASIS Standard 2019-03-07, measured against rumqttd 0.20.0 and rmqtt 0.23.1) — feature parityCore NATS for Python (nats-py 2.15.0) - feature parityCore NATS (client protocol, `nats-server` 2.14) — feature parityNNG for Python (pynng 0.9.0 over NNG 1.11.0) — feature parityand 11 more
- Adapters
3 documents
MQTT 5.0 — retired mappingNNG / SP v1 — retired mappingZMTP 3.1 — retired mapping
- Status
1. What exists, layer by layer2. The product line3. The measurements that decided something4. What comes next5. What needs a human
- README
DocumentsCratesQuick start, without writing a programIdentity in one lineOther patternsNo reactor of your ownBuild and testThe websiteLicense