Closed pfrazee closed 6 years ago
Not immutable: append-only. It is still a mutable structure. Appending pendingLog
to log
in non-destructive operations should not be harmful, but that is definitely a naïve thought, I haven't dug into ssb-server's codebase so far to confirm it.
If it is not possible to do that, then you can act as if the messages in pendingLog
don't exist except for composing, maybe editing/deleting before committing and waiting for the other machine to be available (and then you receive them in log
).
@ssaavedra Yes, the log is mutable in the sense that new messages can be added to the end, but the existing messages are considered to be immutable. That's what I meant. While Bitcoin is built around the idea of competing forks and one winner ultimately being decided, I don't think there's any such provision in SSB.
I think things loosely work as follows:
These streams are, as far as I know, expected to only ever ship new messages, never to retract old messages. In the case of the user's inbox, it would make sense to include messages from pendingLog
in the inbox UI in some way. But those messages would potentially be removed later. That would potentially require quite some additional complexity.
Maybe there's a simple approach. A list of "pending operations" that's somehow shown somewhere, but not included in the UI. So your inbox still shows "1 message" in a conversation, but there's an icon in the top right that says "1 pending operation", and if you click on that, you can see that there is a new message "waiting to be sent". But I guess from a user experience point of view, this is much more complex than showing a message in the inbox view, and marking it as "pending confirmation" or something.
Presently, users can't share keypairs between devices, because doing so risks publishing two messages with the same
sequence
number, which is a feed-corruption event.Because identities are connected to keypairs, this forces users to create multiple separate identities. How can we solve this?