liveBook · Manning

Dependency graph

As explained in Fast by Default

A dependency graph is a graph that represents operations as nodes and their execution dependencies as directed edges.

A dependency graph represents operations as nodes and execution dependencies as directed edges. It distinguishes genuine sequential work from independent operations that can run in parallel. section 4.4.1

Use a dependency graph to shorten the critical path:

  • Draw each request or operation as a node. section 4.4.3
  • Add arrows showing which responses or results each operation needs. section 4.4.1
  • Run nodes with no path between them in parallel; keep genuinely dependent nodes sequential. section 4.4.1
  • Move nonessential work off the critical path through deferral, batching, or prefetching. section 4.4.3

Team dashboard

After obtaining a user ID, fetch the profile, notifications, and recent activity concurrently. Fetch team metrics only after the profile supplies the team ID. This removes the artificial waterfall caused by waiting for the profile before starting independent requests. section 4.4.1

Figure 4.3 A team dashboard dependency graph after optimization.

The optimized dependency graph makes the parallel branches and the single profile-dependent request visible. section 4.4.1

How Fast by Default covers it

How deep it goes
Explains nodes, dependency arrows, parallel branches, and critical paths, then stops short of formal graph algorithms.
Examples
Uses a team dashboard, independent user-data requests, profile-dependent team metrics, network waterfalls, and optimized request graphs.
What it assumes
Assumes familiarity with requests and responses while teaching how to expose their actual dependencies from the beginning.
What you can do after
Diagnose/debug with it by locating unnecessary sequential hops and restructuring independent requests for parallel execution.
How it connects
Connects dependency graphs with critical paths, parallel fetching, waterfall data fetching, batching, prefetching, and distributed tracing.

Also explained in

Compare how 9 books explain dependency graph →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Fast by Default. The section links point to the parts of the book it draws on.