apple / apple/swift-distributed-actors
Serialization: Carrying type manifests to be optional, opt-in; DeadLetter message logging opt-in
- Dominant language
- Swift
- Stars
- 679
- Forks
- 84
- PR merge metrics
- No merged PRs in 30d
Description
Based on some recent discussions we'll loosen up the message metadata carrying:
- registering types is only necessary if we'd need to deserialize when the destination is dead
- we previously thought we always want to deserialize but really the use-case is just to log them, but we may not be allowed to do so in any case because privacy concerns of putting any message in the logs.
- the manifest becomes optional in the Wire.Envelope
- no manifest means that we'll only attempt decoding when the destination actor is alive, and that's fine for most users, it is also good for avoiding work of deserializing when a destination is dead.
- a type may register itself and use the mangled name infra etc
- if it also is `DeadLetterLoggable` it will be logged as full message
- if it is NOT `DeadLetterLoggable` we'll only log "message of type ..." etc, maybe just the name of the enum case etc?
Some debugging mode to log messages may be useful, we can enable this globally if needed.
Dead letters should not log entire messages because privacy, and can only do so when a type is `DeadLetterLoggable`.
Contributor guide
Assessment
This issue has not been assessed yet.