docs: resolve the server + web questions — iroh retires the Go server
Decisions banked after the iroh spike (M1/M2 proven) + reviewing iroh's WASM browser support: - The Go server is retired entirely post-iroh. iroh subsumes every networking role (STUN/TURN→holepunch+relay, signaling→connect(), SSE→iroh relay, presence→iroh-gossip). Replacement is off-the-shelf: self-hosted iroh-relay (supernode #1) + a tiny account→{EndpointId} rendezvous for gossip bootstrap. - Web is not a reason to keep a server. The future web client is tethercore compiled to wasm32 as a relay-only iroh peer (no holepunch in-browser; reaches peers via the relay, E2E). iroh-gossip compiles to WASM, so discovery works in-browser unchanged. The MeshEvent seam makes it a build target, not a project: feature-gate transports → web build is "engine + IrohTransport only". - Migration is graceful: IrohTransport runs alongside SSE/RTC/LAN as another MeshEvent source until it wins, then they retire. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -199,7 +199,14 @@ prefer-direct (relay saw only presence), and E2E (relay carried only ciphertext)
|
||||
`/api/turn-cred` (HMAC ephemeral creds) + web client. **⚠ The deployed binary
|
||||
is ahead of this source** (integrated TURN, advanced web client, built from an
|
||||
uncommitted tree ~2026-05-21). Do **not** redeploy `server/` as-is — it would
|
||||
regress TURN. Recovering that source is an open task.
|
||||
regress TURN. **Decided (post-iroh): the Go server is retired entirely.** iroh
|
||||
subsumes every networking role it has — STUN/TURN → holepunch + relay,
|
||||
RTC signaling → `endpoint.connect()` (gone), SSE relay → iroh relay, presence
|
||||
→ `iroh-gossip`. Its replacement is *off-the-shelf*: a self-hosted **iroh-relay**
|
||||
on the homelab (supernode #1) + a tiny `account → {EndpointId}` rendezvous for
|
||||
gossip bootstrap. Web is not a reason to keep it (§6.3: web = WASM build of the
|
||||
core). Migration is graceful, not big-bang — `IrohTransport` runs *alongside*
|
||||
SSE/RTC/LAN as another `MeshEvent` source until it wins, then they retire.
|
||||
|
||||
What's **Mesh** today: identity (weak), LAN/RTC/SSE transports, mDNS + relay
|
||||
discovery, E2E channel, presence/reachability. What's **Sync** today: message
|
||||
@@ -253,10 +260,17 @@ The hard networking kernel exists. To become a general substrate:
|
||||
stateless message-passing; a backbone is replicated state.
|
||||
2. **An app API / SDK.** A clean surface: declare data, subscribe, send. The
|
||||
thing a developer building app #2 actually touches.
|
||||
3. **Web target = WASM.** The Rust core compiles to WASM, but the browser
|
||||
sandbox limits web peers to WebRTC / WebSocket / WebTransport (no raw
|
||||
UDP/TCP/mDNS — same wall as iOS's multicast entitlement). Web is a
|
||||
first-class but transport-limited peer.
|
||||
3. **Web target = WASM (resolved by iroh).** The future web client is just
|
||||
`tethercore` compiled to `wasm32` as a **relay-only iroh peer** — same core,
|
||||
no bespoke server bridge ever. A browser iroh endpoint can't holepunch
|
||||
(sandbox: no UDP), so it always reaches peers *through the relay* (E2E, relay
|
||||
blind); `iroh-gossip` compiles to WASM too, so discovery (§ M3) works
|
||||
in-browser unchanged. The `MeshEvent` seam makes this a *build target, not a
|
||||
project*: native transports (LAN/mdns, webrtc-rs, reqwest) don't compile to
|
||||
WASM and don't need to — feature-gate the transports and the web build is
|
||||
"engine + `IrohTransport` only, `default-features=false`, `wasm32`." Cost:
|
||||
browser peers lean on the relay (no P2P offload) — trivial for clipboard,
|
||||
relay-carried for big files.
|
||||
4. **Capabilities / permissions (target).** Multi-user needs object-capabilities
|
||||
(UCAN), not ACLs.
|
||||
5. **Persistence / offline-first (target).** Local store + sync-on-reconnect
|
||||
@@ -335,7 +349,12 @@ and crypto and getting it subtly wrong.
|
||||
- [ ] DHT + multi-supernode peer-relay (mostly *adopted* via Iroh/libp2p, not built).
|
||||
- [ ] Rotatable rooms/keys/identities + stable-handle directory indirection.
|
||||
- [ ] Private discovery (OPRF/PSI lookup; ZKP ownership proofs).
|
||||
- [ ] Capability model (UCAN); offline mailbox; web (WASM) peer.
|
||||
- [ ] Capability model (UCAN); offline mailbox.
|
||||
- [ ] **Web client = `tethercore` on `wasm32`** — relay-only iroh peer, same
|
||||
core, no server bridge. Gated on feature-gating the transports (iroh-only
|
||||
build) + the IrohTransport (M4). A build target, not a project.
|
||||
- [ ] **Retire the Go server** once IrohTransport wins — replace with a
|
||||
self-hosted iroh-relay (supernode #1) + a tiny gossip-bootstrap rendezvous.
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in New Issue
Block a user