AT4 — Precomputation vs. On-Demand
Every system that has an algorithmic core has made a choice about when to do the work. The load balancer can precompute routing weights (AT4: precomputation) or decide on every request (on-demand). The session cache precomputes nothing — it stores and retrieves. The dependency resolver precomputes the install graph at resolve time so that install time is fast.
The tradeoff is always: spend time now (precomputation) to save time later, or defer the work and pay it on every request. Naming the algorithm lets you name this tradeoff precisely.
AT12 — Tradeoffs (the meta-tradeoff)
The method in this chapter is itself a tradeoff. Analysing a system as an algorithm gives you performance clarity at the cost of implementation detail. You will know the O-notation of the session cache lookup but not the memory layout of the underlying hash table. For most architectural decisions, the O-notation is what matters. For memory pressure problems, you need to go one level deeper.