Wire pubsub through iroh-gossip
This commit is contained in:
parent
59c463eb40
commit
eec4c92145
8 changed files with 291 additions and 38 deletions
|
|
@ -38,16 +38,15 @@ geth control-ALPN authorization preflight before transferring payload bytes over
|
|||
`iroh-blobs`. KV now starts `iroh-docs` with `iroh-gossip` and the same native
|
||||
blob store, mirrors named KV stores into read-shared Iroh Documents namespaces,
|
||||
and sends read-only docs tickets only after geth control authorization succeeds.
|
||||
`geth status` reports CAS and KV as wired native backends. Pubsub still uses its
|
||||
explicit documented bootstrap equivalent until it is migrated to native gossip.
|
||||
Pubsub joins deterministic native `iroh-gossip` topics after the geth control
|
||||
path authenticates the peer-card endpoint binding and authorizes the topic
|
||||
capability. `geth status` reports CAS, KV, and pubsub as wired native backends.
|
||||
|
||||
Module ALPNs are registered through `geth-iroh`'s protocol router scaffold. The
|
||||
router owns the default protocol descriptors, rejects duplicate ALPN
|
||||
registrations, and returns explicit unknown-ALPN errors. The current daemon
|
||||
accept loop dispatches geth control, pipe, SSH-proxy, and native CAS blob
|
||||
streams directly, plus native docs and gossip streams used by KV. The next
|
||||
backend migration should attach application pubsub behavior to iroh-gossip
|
||||
instead of creating parallel endpoints.
|
||||
streams directly, plus native docs and gossip streams used by KV and pubsub.
|
||||
|
||||
The target product should use Iroh relay support for practical internet
|
||||
connectivity and mDNS/LAN discovery for local networks. These are connectivity
|
||||
|
|
@ -228,19 +227,18 @@ loop runs the same sync for local documents and known peers using
|
|||
per-peer/per-document cursors. Received Automerge documents are merged before
|
||||
being stored.
|
||||
|
||||
`geth-pubsub` currently supports local publish/subscribe snapshots through the
|
||||
daemon control protocol. Messages live in a bounded in-memory ring buffer and
|
||||
are lost when the daemon stops. This is deliberate: pubsub is a lossy wakeup and
|
||||
presence channel, not authoritative storage. Durable facts must be written to
|
||||
CAS, KV, document, or DB resources before pubsub is used as a wakeup. `geth
|
||||
pubsub pub <topic> <message> --node <node-id>` can publish to an imported peer
|
||||
over the protected Iroh control ALPN. The remote daemon validates endpoint/card
|
||||
binding and requires
|
||||
`pubsub.publish` on `resource:pubsub:<topic>` before recording the message in
|
||||
its local ring buffer. `geth pubsub sub <topic> --node <node-id>` can read an
|
||||
authorized peer's current snapshot for that topic over the same protected path
|
||||
when the caller has `pubsub.subscribe` on `resource:pubsub:<topic>`. Iroh-gossip
|
||||
replication and private topics are future work.
|
||||
`geth-pubsub` supports local publish/subscribe snapshots through the daemon
|
||||
control protocol. Messages live in a bounded in-memory ring buffer and are lost
|
||||
when the daemon stops. This is deliberate: pubsub is a lossy wakeup and presence
|
||||
channel, not authoritative storage. Durable facts must be written to CAS, KV,
|
||||
document, or DB resources before pubsub is used as a wakeup. `geth pubsub pub
|
||||
<topic> <message> --node <node-id>` first uses the protected Iroh control ALPN
|
||||
for authorization. The remote daemon validates endpoint/card binding and
|
||||
requires `pubsub.publish` on `resource:pubsub:<topic>` before recording the
|
||||
message and broadcasting it through a deterministic native `iroh-gossip` topic.
|
||||
`geth pubsub sub <topic> --node <node-id>` uses the same protected path, joins
|
||||
the gossip topic when the caller has `pubsub.subscribe`, and returns the peer's
|
||||
current daemon-lifetime snapshot. Private topics remain future work.
|
||||
|
||||
`geth-pipe` currently supports `pipe listen/connect/send/recv` against a
|
||||
daemon-lifetime runtime. `geth pipe connect <name> --node <node-id>` sends an
|
||||
|
|
|
|||
Loading…
Reference in a new issue