Initial import of overview from zapier monorepo
This commit is contained in:
commit
4620ec9b8a
21 changed files with 657 additions and 0 deletions
37
06-address-routing.md
Normal file
37
06-address-routing.md
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
# 6. Address routing (including unplanned functions)
|
||||
|
||||
NATS **addresses** (subjects) are the extension point. A new search, store, or job type is a new address plus a process that listens — not a new Zapier TCP client.
|
||||
|
||||
## Pattern
|
||||
|
||||
```text
|
||||
verae.access.<plane>.<area>.<resource>.<action> # ingress (one plane)
|
||||
verae.access.authz.check # authorization step
|
||||
verae.<area>.<resource>.<action> # internal bus
|
||||
verae.<area>.<resource>.reply.<correlationId>
|
||||
```
|
||||
|
||||
Planes: `zapier` | `web` | `api` | `leaf` | `staff`. Default deny. A leaf cannot `balance.adjust`; Zapier cannot `statement.get`; a browser cannot `archive.put`.
|
||||
|
||||
| Piece | Example | Meaning |
|
||||
|-------|---------|---------|
|
||||
| `verae` | — | Verae bus (not Zapier) |
|
||||
| `area` | `zapier`, `archive`, `search`, `store` | Product slice |
|
||||
| `resource` | `jobs`, `hashes`, `blobs` | Noun |
|
||||
| `action` | `watch`, `query`, `put`, `in` | Verb |
|
||||
| `reply.<id>` | — | Correlated response |
|
||||
|
||||
**Queue group** (work sharing): `area-resource-action` (e.g. `job-poller`).
|
||||
**No queue group** (fan-out): archive/tree **query** so every node sees every lookup.
|
||||
|
||||
## Adding something that does not exist yet
|
||||
|
||||
1. Copy the independent repo **[verae-nats-process](https://git.georgelambert.org/marchon/verae-nats-process)** (`packages/verae-nats-process`).
|
||||
2. Rename `verae.example.process.in` / `.out` / `.reply.*` in `src/subjects.js`.
|
||||
3. Add a row to that repo’s `ROUTING.md` and to [INDEX.md](INDEX.md).
|
||||
4. Register the process in `verae-fleet` (`min`/`max`, machines, roles).
|
||||
5. If an access plane must call it, add the subject to **verae-access-authz** policy for that plane only. Zapier still never sees NATS.
|
||||
|
||||
Do **not** invent a public NATS URL for Zapier. Do **not** reuse `verae.archive.query` as a queue group.
|
||||
|
||||

|
||||
Loading…
Add table
Add a link
Reference in a new issue