Skip to Main Content
Patterns of Distributed Systems
book

Patterns of Distributed Systems

by Unmesh Joshi
December 2023
Intermediate to advanced content levelIntermediate to advanced
464 pages
12h 35m
English
Addison-Wesley Professional
Content preview from Patterns of Distributed Systems

Chapter 13

Singular Update Queue

Use a single thread to process requests asynchronously to maintain order without blocking the caller.

Problem

When the state needs to be updated by multiple concurrent clients, we need it to be safely updated with one-at-a-time changes. Consider the example of the Write-Ahead Log pattern. We need entries to be processed one at a time, even if several concurrent clients are trying to write. Generally, locks are used to protect against concurrent modifications. But if the tasks being performed are time-consuming, such as writing to a file, blocking all the other calling threads until the task is completed can have severe impact on the overall system throughput and latency. It is important to make effective use ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Designing Distributed Systems

Designing Distributed Systems

Brendan Burns