Chat Buffer #144

Closed
opened 2025-05-06 18:00:18 -04:00 by rainbownapkin · 6 comments
rainbownapkin commented 2025-05-06 18:00:18 -04:00 (Migrated from gitlab.com)

Temporarily store chat messages in a chat buffer so users aren't connecting to an empty chatroom.

Temporarily store chat messages in a chat buffer so users aren't connecting to an empty chatroom.
rainbownapkin commented 2025-05-06 18:00:18 -04:00 (Migrated from gitlab.com)

added #137 as parent issue

added #137 as parent issue
rainbownapkin commented 2025-05-06 18:00:53 -04:00 (Migrated from gitlab.com)

changed the description

changed the description
rainbownapkin commented 2025-06-11 08:28:49 -04:00 (Migrated from gitlab.com)

Started work on implementing chat buffer: 8821b5cff9

Started work on implementing chat buffer: 8821b5cff94617a1621dc73156118fc5c2b780f8
rainbownapkin commented 2025-06-11 08:30:19 -04:00 (Migrated from gitlab.com)

Implemented volatile chat buffer for channel chats. Standard chat messages now survive channel refresh and show up for newly connected users: 366df357b8

Next 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.

Implemented volatile chat buffer for channel chats. Standard chat messages now survive channel refresh and show up for newly connected users: 366df357b863d064adba1176fdb41f43e167cdeb Next 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.
rainbownapkin commented 2025-07-22 07:55:01 -04:00 (Migrated from gitlab.com)

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.

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.
rainbownapkin (Migrated from gitlab.com) closed this issue 2025-07-23 01:07:21 -04:00
rainbownapkin commented 2025-07-23 01:07:22 -04:00 (Migrated from gitlab.com)

Persistent chat buffer complete: c64b315fdf

Persistent chat buffer complete: c64b315fdf9fc76f797ff6a077405bbbdedd176a
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: rainbownapkin/canopy#144
No description provided.