Latency, Video Edition

Latency, Video Edition

English | MP4 | AVC 1280×720 | AAC 44KHz 2ch | 9h 4m | 1.51 GB

Practical techniques for delivering low latency software.

From first principles to production-ready code, Latency teaches you how to make your software faster at every layer of the stack. You’ll learn what latency really is, how it differs from bandwidth, and why it matters for user experience. Then, guided by practical examples, you’ll apply Little’s Law, design lock-free algorithms, and architect caching systems that scale. You’ll discover how your code runs differently on distributed systems, databases, and operating systems, and understand the common latency-causing issues in each situation.

In Latency you’ll learn how to:

  • Define latency, distinguish it from bandwidth, and understand its impact on user experience
  • Model performance with Little’s Law and Amdahl’s Law, then measure and visualize delays
  • Optimize data access with colocation, replication, partitioning, and caching
  • Accelerate logic with algorithmic improvements, memory tuning, and lock-free concurrency
  • Minimize delays with asynchronous processing, predictive techniques, and speculative execution

Put simply, latency is the delay between a cause and effect. In practice, too much latency can create problems throughout a software system, ranging from inaccurate calculations and timeouts to impatient users simply abandoning your applications. Latency issues can be challenging to avoid and troubleshoot. This book balances theory with practical implementations, turning academic research into useful techniques you can apply to your projects.

From lost microseconds routing server messages to page loads that keep users waiting, latency can kill good software. This one-of-a-kind book shows you how to spot, understand, and fix unwanted latency in your applications and infrastructure.

Latency: Reduce delay in software systems shows you how to troubleshoot latency in existing applications and create low latency systems from the ground up. In it, you’ll discover high-impact fixes for measuring latency and advanced optimizations in memory management, concurrency models, and predictive execution. The tips and tricks, hands-on projects, and personal insights make this book as enjoyable as it is practical.

What’s Inside

  • How to model and measure latency
  • Organizing application data for low latency
  • Accelerating your code
  • Hiding latency
Table of Contents

1 Part 1. Basics
2 Chapter 1. Introduction
3 Chapter 1. How is latency measured
4 Chapter 1. Why does latency matter
5 Chapter 1. What latency is not
6 Chapter 1. Latency vs. bandwidth
7 Chapter 1. Latency vs. energy
8 Chapter 1. Summary
9 Chapter 2. Modeling and measuring latency
10 Chapter 2. Latency distribution
11 Chapter 2. Common sources of latency
12 Chapter 2. Compounding latency
13 Chapter 2. Measuring latency
14 Chapter 2. Putting it together – Measuring network latency
15 Chapter 2. Summary
16 Part 2. Data
17 Chapter 3. Colocation
18 Chapter 3. Internode latency
19 Chapter 3. Intranode latency
20 Chapter 3. Multicore architecture
21 Chapter 3. Putting it together – REST API with embedded database
22 Chapter 3. Summary
23 Chapter 4. Replication
24 Chapter 4. Availability and scalability
25 Chapter 4. Consistency model
26 Chapter 4. Replication strategies
27 Chapter 4. Asynchronous vs. synchronous replication
28 Chapter 4. State machine replication
29 Chapter 4. Case study – Viewstamped Replication
30 Chapter 4. Putting it together – Replicating a key value stor
31 Chapter 4. Summary
32 Chapter 5. Partitioning
33 Chapter 5. Physical partitioning strategies
34 Chapter 5. Logical partitioning strategies
35 Chapter 5. Request routing
36 Chapter 5. Partition imbalance
37 Chapter 5. Putting it together – Horizontal partitioning with SQLite
38 Chapter 5. Summary
39 Chapter 6. Caching
40 Chapter 6. Caching overview
41 Chapter 6. Caching strategies
42 Chapter 6. Cache coherency
43 Chapter 6. Cache hit ratio
44 Chapter 6. Cache replacement
45 Chapter 6. Time-to-live (TTL
46 Chapter 6. Materialized views
47 Chapter 6. Memoization
48 Chapter 6. Putting it together – In-application caching with Moka
49 Chapter 6. Summary
50 Part 3. Compute
51 Chapter 7. Eliminating work
52 Chapter 7. Algorithmic complexity
53 Chapter 7. Serializing and deserializing
54 Chapter 7. Memory management
55 Chapter 7. Operating system overhead
56 Chapter 7. Precomputation
57 Chapter 7. Putting it together – Benchmarking with Criterion
58 Chapter 7. Summary
59 Chapter 8. Wait-free synchronization
60 Chapter 8. Problems with mutual exclusion
61 Chapter 8. Atomics
62 Chapter 8. Memory barriers
63 Chapter 8. Wait-free synchronization
64 Chapter 8. Putting it together – Building a single-producer, single-consumer queue
65 Chapter 8. Summary
66 Chapter 9. Exploiting concurrency
67 Chapter 9. Concurrency models
68 Chapter 9. Parallel processing
69 Chapter 9. Transactions
70 Chapter 9. Concurrency control
71 Chapter 9. Putting it together – Sequential vs. concurrent execution
72 Chapter 9. Summary
73 Part 4. Hiding latency
74 Chapter 10. Asynchronous processing
75 Chapter 10. Asynchronous IO
76 Chapter 10. Deferring work
77 Chapter 10. Resource management
78 Chapter 10. Managing concurrency with backpressure
79 Chapter 10. Error handling
80 Chapter 10. Observability
81 Chapter 10. Summary
82 Chapter 11. Predictive techniques
83 Chapter 11. Prefetching
84 Chapter 11. Optimistic updates
85 Chapter 11. Speculative execution
86 Chapter 11. Predictive resource allocation
87 Chapter 11. Summary
88 appendix. Further reading

Homepage