Composing a Seam
When building custom transport stacks, several kuilt-core APIs can look similar because they all "combine" something. The practical way to choose is: what goes in, and what comes out. They line up on one Connection↔Seam axis:
Type | Direction | Role |
|---|---|---|
| — | The point-to-point SPI a transport implements: a duplex, message-framed link between exactly two peers. Not a |
| Connection → Seam | One link whose two identities are known, presented as a 2-peer |
| Connections → Seam | Topology builder. N point-to-point links woven into one fully-connected N-peer |
| Seams → Seam | Transport multiplexer. Several |
| Seam → Seams | Channel splitter (byte-tagged). One |
| Seam → Seams | Channel splitter (string-keyed). Like |
Mesh vs. composite — opposite sides of the boundary
The two that invite the most confusion are meshSeam() and CompositeLoom, because both sound like "join several things into one Seam ". They sit on opposite sides of the Seam boundary:
meshSeam()is a topology builder (Connection → Seam) — it creates aSeamout of raw links that aren'tSeams yet.CompositeLoomis a transport multiplexer (Seam → Seam) — it consumes finishedSeams and bonds them.
So they don't compete: a mesh turns links into a session, while a composite bonds several sessions for one peer-set into a single multipath view. They don't even compose by type today — meshSeam() takes List<Connection>, not List<Seam> — so "a mesh whose every link is itself multipath" would be a new abstraction, not a tweak to either.
Where each one is documented
Connection,identified(), andmeshSeam()— the Fabric kit.CompositeLoomand bonding several transports — Multipath.MuxSeamchannel multiplexing — see Quilter, which uses it to let several replicators share one transport.NamedMux— used internally bygameHost/gameJoin/gameNode(see Consensus (Raft)) to multiplex the application-envelope channel over the game session's singleSeam. Consumers access it viaGameSession.appChannel(name).Writing the
ConnectionSPI for your own transport — the implementer tutorialdocs/extending-fabrics.mdin the repository.