logo
Kurashizu Blogwhere ideas flow
  • Home
  • News
  • Blog
  • About
  • Home
  • News
  • Blog
  • About

© 2026 Kurashizu. All rights reserved.

Admin·New Post·Service Status
Powered by Cloudflare·31.10.26
← Back to news

The Two Abstractions of System Design: Hide or Reduce

Original article
muratbuffalo.blogspot.com|76 points|9 comments|by ubolonton_|Sep 2, 2026

The Two Abstractions of System Design: Hide or Reduce

When discussing TLA+, I frequently emphasize that mastering abstraction is the single most critical hurdle for learners. This often sparks confusion: isn't abstraction the very foundation of software engineering, networking, and operating systems? After all, Abstract Data Types (ADTs) are taught in every introductory Computer Science course.

So, why is there such a glaring skill gap? Why do formal methods experts view this as the "make-or-break" skill for effective modeling?

The answer lies in a cognitive dissonance caused by a single term covering two fundamentally different concepts.

The Great Divide: Modularity vs. Modeling

We often conflate two distinct types of abstraction under one name:

1. Modularity Abstraction

This is the "textbook" version of abstraction. It focuses on encapsulation.

  • Mechanism: Drawing boundaries and hiding internal implementation details.
  • Examples: APIs, layered architectures, and ADTs.
  • Goal: To create a clean interface that shields the user from the complexity beneath.

2. Modeling Abstraction

This is the version used by physicists, mathematicians, and formal modelers. It focuses on reduction.

  • Mechanism: Identifying the most elegant, minimal description that preserves a specific property.
  • Goal: To strip away everything orthogonal irrelevant to the essence of the property being studied.

Comparing the Two Approaches

While Modularity abstraction is about interfaces, Modeling abstraction is about behaviors.

FeatureModularity AbstractionModeling Abstraction
Primary ActionEncapsulates / HidesReduces / Slices
DirectionVertical (Layered)Cross-cutting (Behavioral)
Focus"How" it is hidden"What" is essential
Relationship to LeaksTries to seal leaksLeverages the "leaks"
OutcomeEase of useProvable invariants

The "Leaky" Nature of Modularity

Modularity abstraction attempts to present complex, interleaved operations as if they were atomic. However, as Joel Spolsky famously noted:

"All abstractions are leaky."

His examples were all rooted in modularity:

  • TCP →\rightarrow→ hides IP
  • String libraries →\rightarrow→ hide character arrays
  • File systems →\rightarrow→ hide spinning disks
  • Virtual memory →\rightarrow→ hide the MMU/paging
  • SQL →\rightarrow→ hide query execution plans

By hiding these interleavings, modularity abstraction makes a system easier to use but often sacrifices opportunities for efficiency or concurrency.

The Power of Modeling

In contrast, modeling abstraction embraces the leak. It exposes fine-grained actions and specific orderings to prove that a system remains stable despite concurrency. The goal is to extract the maximum amount of safe concurrency possible.


Modeling Abstraction in Practice

The field of distributed systems is essentially a gallery of modeling abstractions. To model these, we use a "reductionist" checklist:

  • Identify the core property (e.g., Causality).
  • Discard Remove wall-clock time.
  • Keep only the ≺\prec≺ (happens-before) relation.
  • Define the minimal state required to prove the property.

Key Examples:

  • Lamport Logical Clocks: Discard physical time; retain only the happens-before relationship.
  • Hybrid Logical Clocks (HLC): Retain both causality and wall-clock time; discard the rest.
  • TrueTime: Represent time not as a point, but as a bounded-uncertainty interval: [tearliest,tlatest][t_{earliest}, t_{latest}][tearliest​,tlatest​].
  • Consensus: Reduce the entire problem to the act of agreeing on a single decision. (Paxos is a masterclass in this, moving from the abstract concept of Consensus →\to→ Voting →\to→ Protocol).
  • Linearizability: Ignore the noise of replication, caching, and retries to focus on the atomic appearance of operations.
  • The Log as the Database: Discard materialized state as the source of truth; retain only the ordered, append-only sequence of events.
  • MapReduce/Spark: Discard the complexities of orchestration, scheduling, and fault tolerance. Instead, keep a DAG of deterministic transforms over partitioned data.

Synthesis: When the Two Overlap

Occasionally, a piece of design is so brilliant that it serves both purposes. An artifact might act as a specification to refine against (Modularity) and a skeleton to reason from (Modeling) simultaneously.

Even when they coincide in a single artifact, their roles remain distinct: one is designed to hide the complexity to aid the developer, while the other is designed to reduce the complexity to aid the thinker.

Abstraction Concept 1 Abstraction Concept 2 Abstraction Concept 3

# Conceptual representation of the two abstractions
class System:
    def __init__(self):
        self.internal_state = "Complex Mess"

    # MODULARITY: Hide the mess
    def public_api(self):
        return "Clean Interface"

    # MODELING: Reduce to the essence
    def behavioral_skeleton(self):
        return {"essential_property": "Invariant X"}