Persistent chat history #1
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "push-sxmuwrnkqzkk"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Implement persistent chat history by saving messages into an SQLite database.
Since it has to be possible to correlate history with specific rooms, this also implements a table storing existing rooms and their metadata (currently only who created the room.)
Messages use bespoke snowflake IDs as their primary key, that is Unix timestamps coupled with a sequence counter. Our snowflake is tailored towards running on a single machine, and has 56 bits for a Unix timestamp (millis) with an 8 bit sequence counter for handling concurrent writes in the same millisecond. You would have to send 256 messages in a millisecond to cause a collision which is not realistic in our case.
7cd9e33551to7d9e9e398b7d9e9e398btoeb31667944eb31667944to4c030c99f0WIP: Persistent chat historyto Persistent chat history