mirror of
https://github.com/edu4rdshl/Strata.git
synced 2026-07-17 23:24:46 +00:00
docs: document the single-instance daemon contract
Add a "Single instance" note to ARCHITECTURE explaining the two layers that keep exactly one daemon on the bus: the extension skips spawning when the name is owned, and the daemon requests it with DoNotQueue (exits if taken, never steals/orphans). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
parent
107de1c3ff
commit
2dc15a4849
1 changed files with 11 additions and 0 deletions
|
|
@ -71,6 +71,17 @@ The extension listens for `notify::g-name-owner` on the D-Bus proxy. When
|
|||
the daemon's `dev.edu4rdshl.Strata` name becomes owned, the panel triggers
|
||||
its initial fetch. No polling, no fixed delays.
|
||||
|
||||
### Single instance
|
||||
|
||||
Exactly one daemon should serve the bus name. Two layers enforce it: the
|
||||
extension skips spawning when `GetNameOwner` shows the name is already owned
|
||||
(so a daemon started out-of-band, e.g. via a systemd user service, is reused),
|
||||
and the daemon itself requests the name with `DoNotQueue` -- if the name is
|
||||
already taken it errors out and exits rather than queueing or stealing it.
|
||||
It deliberately does not use `ReplaceExisting`: taking the name from a running
|
||||
instance would orphan that instance (zbus does not terminate a replaced owner),
|
||||
so the late starter bows out instead.
|
||||
|
||||
## Ingest path
|
||||
|
||||
```
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue