Documentation
¶
Overview ¶
Package federation will be the federation module: peer trust, outbox delivery, federated repositories, replication, Access federation and topology.
Role ¶
federation module, module root. Only app imports a module root; other modules reach federation through federation/api (decision 0044, dependency rules). Its storage skeleton (the module's ports, models and store adapters) sits in subpackages ahead of its phase; skeleton modules get no constructor until then (decision 0044, composition and HTTP).
Inputs ¶
None yet. Planned: the Deps that app passes to New, among them the outbox that the sync sender reads as one consumer per peer (target layout, lines 736-739).
Outputs ¶
None yet. Planned: module.go with New(Deps). The module's layers are its subpackages: api, core/peer, core/pairing, core/sync, core/federated, core/replication, core/accessfed, core/topology, adapters/peer and adapters/http.
References ¶
- Context map, federation row, as https://github.com/weaveplatform/artifactweave/issues/958 records it: owns peer trust, outbox delivery, federated repositories, replication, Access federation and topology; phases P11, P13, P14 and P37.
- Target layout: docs/research/architecture-options/5-modular-monolith.md, "Full package tree", lines 85-104 and 331-346, and "Webhooks and events (P11, P13)", lines 717-744.
- Decision 0044: docs/research/decisions/0044-modular-monolith-migration.md, "Placeholders" and "Composition and HTTP".
- Decision 0021: docs/research/decisions/0021-peer-trust-and-sync-protocol.md.
- Decision 0022: docs/research/decisions/0022-federated-repositories.md.
- Decision 0025: docs/research/decisions/0025-platform-federation-and-topology.md.
- Plan: docs/implementation/plan.md#p11-projects-webhooks-retention-replication, #p13-peer-trust-and-federated-repositories, #p14-platform-federation-and-topology, #p37-advanced-replication-and-interoperability.
Status ¶
Placeholder: implemented by P11, P13, P14, P37.
Directories
¶
| Path | Synopsis |
|---|---|
|
adapters
|
|
|
http
Package federationhttp will serve the federation module's REST endpoints: pfed, grid, federation and replication.
|
Package federationhttp will serve the federation module's REST endpoints: pfed, grid, federation and replication. |
|
inmem
Package inmem is the in-memory implementation of the federation module's stores: replications and their runs, peers and pairing nonces, federated repository members and full syncs, Access Federation targets, platform federations and topologies.
|
Package inmem is the in-memory implementation of the federation module's stores: replications and their runs, peers and pairing nonces, federated repository members and full syncs, Access Federation targets, platform federations and topologies. |
|
peer
Package peer will serve and call artifactweave's own peer API, /artifactweave/peer/v1.
|
Package peer will serve and call artifactweave's own peer API, /artifactweave/peer/v1. |
|
sql
Package sql is the SQL implementation of the federation module's stores: replications with their sealed passwords and their runs, peers and pairing nonces, federated repository members and full syncs, Access Federation targets, platform federations and topologies, with the module's registration with the SQL layer.
|
Package sql is the SQL implementation of the federation module's stores: replications with their sealed passwords and their runs, peers and pairing nonces, federated repository members and full syncs, Access Federation targets, platform federations and topologies, with the module's registration with the SQL layer. |
|
sql/migrations
Package migrations holds the federation module's migration stream: the SQLite and PostgreSQL schema of the tables the module's SQL adapter owns.
|
Package migrations holds the federation module's migration stream: the SQLite and PostgreSQL schema of the tables the module's SQL adapter owns. |
|
storetest
Package storetest is the contract suite of the federation module's stores: one set of expectations that every implementation of the replication, peer, federation and platform federation stores must meet.
|
Package storetest is the contract suite of the federation module's stores: one set of expectations that every implementation of the replication, peer, federation and platform federation stores must meet. |
|
Package api will be the federation module's published interface: peers, federated repositories, replications, topology and the module's events.
|
Package api will be the federation module's published interface: peers, federated repositories, replications, topology and the module's events. |
|
core
|
|
|
accessfed
Package accessfed will federate access entities over peers: users, groups, permissions and tokens.
|
Package accessfed will federate access entities over peers: users, groups, permissions and tokens. |
|
federated
Package federated will manage federated repositories: members, the conflict rule, lag and replay.
|
Package federated will manage federated repositories: members, the conflict rule, lag and replay. |
|
model
Package model holds the federation module's entity values: replications and their runs, paired peers and pairing nonces, the stream names and conflict stamps of the peer protocol, federated repository membership and full syncs, and the platform federation records (Access Federation targets, platform federations and topologies).
|
Package model holds the federation module's entity values: replications and their runs, paired peers and pairing nonces, the stream names and conflict stamps of the peer protocol, federated repository membership and full syncs, and the platform federation records (Access Federation targets, platform federations and topologies). |
|
pairing
Package pairing will pair instances through the documented service_trust pairing endpoints.
|
Package pairing will pair instances through the documented service_trust pairing endpoints. |
|
peer
Package peer will hold peer identities and keys, and sign and verify the requests that peers exchange.
|
Package peer will hold peer identities and keys, and sign and verify the requests that peers exchange. |
|
port
Package port declares the federation module's store ports: replications, peers and pairing nonces, federated repository membership and full syncs, the platform federation records, and Store, the part of the metadata store the module uses.
|
Package port declares the federation module's store ports: replications, peers and pairing nonces, federated repository membership and full syncs, the platform federation records, and Store, the part of the metadata store the module uses. |
|
replication
Package replication will run repository replication: single push and pull first, then multi-push and event replication.
|
Package replication will run repository replication: single push and pull first, then multi-push and event replication. |
|
sync
Package sync will deliver outbox events to peers: the sender, acknowledgements, idempotent apply and the full-sync fallback.
|
Package sync will deliver outbox events to peers: the sender, acknowledgements, idempotent apply and the full-sync fallback. |
|
topology
Package topology will hold platform federations and the grid topology: which instances form the platform, and how healthy they are.
|
Package topology will hold platform federations and the grid topology: which instances form the platform, and how healthy they are. |