Company
Date Published
Author
Chris Bell
Word count
1520
Language
English
Hacker News points
None

Summary

Knock offers a flexible notifications infrastructure that allows developers to schedule, batch, and deliver notifications without the need for custom code, enhancing user engagement and retention. The blog post delves into the creation of a batched notification engine, where multiple notifications are combined into a single message within a specific time frame, as opposed to sending individual notifications for each event. It discusses two primary approaches to designing such a system: "batch on write," which accumulates notifications as they occur, and "batch on read," which processes unsent notifications periodically. The post highlights the advantages of the batch on write approach, despite its complexity, for scalability and efficiency. The design involves using a relational database to manage notifications and batches, addressing potential issues like race conditions and retries, and allowing for advanced features such as user-specific batch windows and early batch flushing. Knock provides a comprehensive solution that automates these processes, supporting multiple channels and user preferences, and offers a free tier for users to explore its capabilities.