How to handle the elapse of time for debounce logic in Convex?
The key challenge I’m facing in Convex is managing time-based logic to debounce email notifications. Ideally, the app delays notifications for a short period in order to group multiple messages into a single email.
Below are my current potential approaches for debouncing. Which do you recommend?
A) Convex actions to handle server-side logic for delayed email sending. My concern is whether actions are the right tool for managing time-based workflows and how they interact with Convex’s persistence model.
B) Convex scheduled functions to periodically check for new notifications and batch-send them to the client.
C) Convex Workflow component to orchestrate long-running processes, ensuring that the debounce logic executes reliably over time. I'm considering defining a workflow that delays email sending to batch multiple messages.
D) Some other approach?
