and Traffics › Throttling: Initial Solution with Limitations › Debouncing: Design and Implementation › Result: Application and Improvements › And More: Room For Further Improvements
busy chats with incessant updates › Wasted notifications immediately followed by round-trips to fetch events › Heavy storage usage to identify users to notify each time
for chats TaskHandler for messages PublishTask (type, target) Processor … via Kafka Streams Asynchronous Distribution and Delegation of Event Handling › Publish-tasks are asynchronously distributed and delegated to “publish-server” via Kafka Streams › Tasks are divided and distributed by their types and targets, e.g. which chatrooms they are for
delivered at max for how long 3. Let “urgent” updates bypass rate-limiting, if necessary 1. Notify only the latest updates about all types of entities, at least once in a while Requirements in light of OpenChat’s business logic
events can be delivered at max for how long 3. Let “urgent” updates bypass rate-limiting, if necessary › Override PublishTaskDebouncer<T>#execute with customized handling logic 1. Notify only the latest updates about all types of entities, at least once in a while › Tweak the current implementation › Use Bucket4j and Caffeine Solutions for the requirements
particular busy chats with incessant updates › Wasted notifications immediately followed by round-trips to fetch events › Heavy storage usage to identify users to notify each time