educative.io

Educative

Avoiding maintaining a separate queue for each reader

per the suggestion that we have a counter to decrement the value after the message has been processed by each consumer doesn’t this open the possibility that a malicious client or even just a poorly implemented client could decrement more than it should? so then don’t we need to keep track of all the clients per message which effectively defeats the purpose of having n queues for n clients?


Course: Grokking Modern System Design for Software Engineers & Managers - Learn Interactively
Lesson: Design of a Pub-sub System - Grokking Modern System Design for Software Engineers & Managers

also this design introduces head of line blocking unless we’re getting the next message any particular client has not processed yet


Course: Grokking Modern System Design for Software Engineers & Managers - Learn Interactively
Lesson: Design of a Pub-sub System - Grokking Modern System Design for Software Engineers & Managers

sorry I see you go on to offer a second design… disregard above comments :laughing:


Course: Grokking Modern System Design for Software Engineers & Managers - Learn Interactively
Lesson: Design of a Pub-sub System - Grokking Modern System Design for Software Engineers & Managers