AlgoViz

Abstractions in system design

easy 22 min

An abstraction hides how something works behind a small, stable interface, so callers only need to know what it does.

What each level should show

The same question is judged differently for mid, senior and staff.

  • Mid

    Must show

    • Defines interface and implementation
    • Names the usual layers
    • Explains dependency injection

    Will be probed on

    • Repository against direct queries
    • How a fake helps tests

    Stands out

    Adds a cache as a wrapper without changing callers.

  • Senior

    Must show

    • Names what leaks and puts it in the contract
    • Keeps interfaces small and stable
    • Knows when a layer is not worth it

    Will be probed on

    • Timeouts behind an interface
    • Changing an interface safely

    Stands out

    Uses contract tests to prove two implementations agree.

  • Staff

    Must show

    • Places boundaries by change and ownership
    • Plans migrations across them
    • Weighs the cost of indirection

    Will be probed on

    • Boundaries between teams
    • Undoing a wrong abstraction

    Stands out

    Argues against a platform layer when no second user exists yet.