docs(adr): take one outer form for every room record
The owner asked that the record form be decided by what mature projects do. Every system in which others define stored record types has one outer form from its first release, and those that added extension later carry two models for good. Uniform means a shared outer form with content still checked by schema, so core types keep a short reserved name and need no fallback, and deletion strips content and keeps a skeleton as Matrix and XMPP do. The cost a string type name adds to every record is recorded as the counter-evidence.
This commit is contained in:
1 parent
2af8b23926
commit
151cd1c96c
2 files changed
+57
-14
No files matched your search
@@ -136,10 +136,36 @@ owner ends another. The full place and simple sharing are two views of one
|
||||
session. A program is marked at an authenticated enrollment. The pilot is your
|
||||
paired experiment at watch media or the stage handoff.
|
||||
|
||||
Two things remain. The owner asked for the scaffolding to be designed ahead,
|
||||
so I am putting your envelope measurements to the owner as the reason to
|
||||
reserve the path through the compatibility rule and not to wrap every record
|
||||
now. And you found that an authorized history read does not require presence
|
||||
One of your outcomes I am reopening, on evidence. You deferred the uniform
|
||||
record form and measured what a draft costs. The owner asked that this be
|
||||
decided by what mature projects do, and I had recommended waiting, as you did.
|
||||
A survey of the specifications says otherwise. Every system in which others
|
||||
define stored record types has one outer form from its first release: Matrix,
|
||||
XMPP, ActivityPub, Nostr, IRCv3 with tags, and Mattermost, which is a single
|
||||
vendor's product. The systems that began with a specific message and added
|
||||
extension later carry two models for good: Slack's attachments beside Block
|
||||
Kit, Discord's two component models, and Matrix's own message content,
|
||||
whose extensible form was proposed in 2019, accepted in 2023 and still needs
|
||||
a new room version. Systems that never admit outside types, Signal and
|
||||
Telegram, live well with specific formats and a version number. We intend to
|
||||
admit them, so the record now takes the uniform form.
|
||||
|
||||
The same survey answers your two costs:
|
||||
|
||||
- **Bytes.** Uniform means a shared outer form, not untyped content. Every
|
||||
such system still checks its own types by schema. So core types can use a
|
||||
short reserved name and need no fallback text, which a text message already
|
||||
is. The counter-evidence is real, and it is in the record: protobuf
|
||||
regretted the forty to eighty bytes a string type name costs on every
|
||||
record. Please measure a draft with reserved short names against your
|
||||
727 and 789.
|
||||
- **Deletion.** Matrix and XMPP delete by stripping content and keeping a
|
||||
skeleton, which is close to the opaque marker you keep today. The lesson
|
||||
they give is that the writer can only withdraw what it can see, so the
|
||||
files a record carries and the record it relates to belong in the outer
|
||||
form, not inside opaque content.
|
||||
|
||||
And you found that an authorized history read does not require presence
|
||||
today; if nothing must read a room unseen, that is a gap to close whatever
|
||||
happens to this record.
|
||||
|
||||
|
||||
@@ -42,16 +42,21 @@ holds what survived both.
|
||||
| A participant process | A bot or API client | More than a person can do on the wire |
|
||||
| The operator's machine | Providers | Decide admission or order |
|
||||
|
||||
2. **Built-in records keep their compiled forms.** A generic record for a
|
||||
community kind, with a namespaced name, an opaque payload and a fallback
|
||||
text, is added as a capability when the first extension needs it. Wrapping
|
||||
every present record in one envelope was measured: a short signed message
|
||||
grew from 727 to 789 bytes, a store of a thousand short messages grew by
|
||||
about a fifth, and an append-only record conflicts with how deletion
|
||||
removes a body, a thumbnail and a quote today. What has to hold before
|
||||
release is the compatibility rule of
|
||||
[ADR-0017](./0017-contracts-fixed-before-release.md), so that such a
|
||||
capability can be added without breaking a released client.
|
||||
2. **One outer form for every room record.** Every record the writer orders
|
||||
carries a namespaced type, a version, typed content, and the references the
|
||||
writer has to see: the files it carries and the record it relates to.
|
||||
Built-in records are the types the core reserves. The writer checks their
|
||||
content by schema, as it does today, and a short reserved name keeps their
|
||||
cost small. A community type carries opaque content and a required
|
||||
fallback text. A record of an unknown type is ordered, stored and shown as
|
||||
its fallback. Deleting a record strips its content and withdraws the files
|
||||
and quotes its references name, and a skeleton stays. Every system that
|
||||
lets others define stored record types has one outer form from its first
|
||||
release, and those that added it later carry two forms for good. A first
|
||||
draft cost about sixty bytes on a short signed message; reserving short
|
||||
names and asking no fallback of core types should reduce that, and the
|
||||
form joins the contract of
|
||||
[ADR-0017](./0017-contracts-fixed-before-release.md).
|
||||
3. **Each owner undoes its own registrations.** A lifetime owner releases its
|
||||
listeners and the leases it borrowed when it ends, as
|
||||
[ADR-0015](./0015-browser-session-lifetime-owners.md) decided. Ending one
|
||||
@@ -116,3 +121,15 @@ definition and no second provider or consumer.
|
||||
what complete access to internals cost.
|
||||
- [Extending Caddy](https://caddyserver.com/docs/extending-caddy): modules
|
||||
compiled in, with provision, validation and cleanup.
|
||||
- [Matrix client-server API](https://spec.matrix.org/latest/client-server-api/)
|
||||
and [room version 11](https://spec.matrix.org/latest/rooms/v11/): one event
|
||||
form for every type, a reserved namespace, and redaction that strips content
|
||||
and keeps a skeleton.
|
||||
- [XEP-0424, Message Retraction](https://xmpp.org/extensions/xep-0424.html):
|
||||
the archive keeps a tombstone in place of the retracted message.
|
||||
- [Mattermost post model](https://raw.githubusercontent.com/mattermost/mattermost/master/server/public/model/post.go):
|
||||
one post form with reserved system types and prefixed custom types.
|
||||
- [Extensions over Any](https://protobuf.dev/design-decisions/extensions-over-any/):
|
||||
what a string type name costs on every record.
|
||||
- [Discord message resource](https://docs.discord.com/developers/resources/message):
|
||||
a closed set of types, with a second component model added beside the first.
|
||||
Reference in new issue
Block a user