clowdr-app / clowdr

Midspace (formerly Clowdr) is a completely open-source virtual conference platform. Host complex events with hundreds of authors and presenters. Midspace includes automated livestreams, video chat, text chat, randomised networking and much more.
https://www.midspace.app/
GNU Affero General Public License v3.0
59 stars 20 forks source link

Adopt a reliable and precise event scheduler for event start and end events #84

Open EdNutting opened 3 years ago

EdNutting commented 3 years ago

At the moment we insert scheduled triggers for the start/end time of an event whenever the event times are edited. This can lead to lots of weird duplication scenarios that can cause bugs in livestreams. Instead, we should just run a cron job every minute that looks for upcoming events starting and ending. Need to come up with a clever way of making sure that events get picked up exactly once.

EdNutting commented 3 years ago

Can probably use a select-upsert to make sure we only setTimeout exactly once per event start/end. Maybe we should pick up the next two minutes worth of events every minute to give some leeway?

EdNutting commented 3 years ago

Possibly this has been implement as part of the playout service changes? @rossng

rossng commented 2 years ago

We still rely on scheduled triggers, and I've concluded that we need a proper system for precise/reliable event scheduling. Hasura isn't appropriate for this.