Chat Buffer #144
Labels
No labels
Bug
Cleanup/Refactor
Core Feature
Documentation
Feature
Performance Improvement
Security Improvement
UX/Accessibility
Unreproducable Bug
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: rainbownapkin/canopy#144
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Temporarily store chat messages in a chat buffer so users aren't connecting to an empty chatroom.
added #137 as parent issue
changed the description
Started work on implementing chat buffer:
8821b5cff9Implemented volatile chat buffer for channel chats. Standard chat messages now survive channel refresh and show up for newly connected users:
366df357b8Next is to make timed DB backups for channel messages, and a RAM-only buffer for global ones.
It's probably best that shutdown-related server announcements don't survive restart, and not really a big deal that toke messages don't either.
Chat messages should set off a 2-5 second timer that gets reset if a new chat is received before it goes off.
At the end of the timer, if no new messages have been received since the timer was last reset, the DB should save.
A second 5-10 minute timer run happen in the background along side the shorter one, that gets cut off short the moment the first timer completes (IE: whenever a DB transactions occurs.) If this timer ends, it means the chat room has been busy for 5-10 minutes without a save, and should be saved regardless of how busy it is.
This ensures that DB transactions occur as chats happen in slow rooms, while ensuring the DB isn't constantly saving on busy rooms.
Persistent chat buffer complete:
c64b315fdf