Application Startup and Dataflow Architecture
April 5, 2023

Application-architecture noteOriginally posted 2023-04-05; rewritten here around startup structure and dataflow ownership.

Included: main entry points, construction order, long-lived state, event handlers, data pipelines, feedback paths, and what to inspect before changing a running system.

The Startup Path Defines the Runtime

In a large application, the entry point is not boilerplate. The startup path constructs the long-lived objects, state stores, schedulers, event loops, data feeds, network clients, model pipelines, and shutdown responsibilities that shape the rest of the run.

Event handlers are easier to read in isolation. They are also easy to misunderstand if the reader has not first seen what was constructed, who owns it, and which pieces survive for the lifetime of the process.

Read Construction Order

A useful first pass through an unfamiliar application is simple: read the entry point, list the objects created in order, mark the durable state, and draw the paths where data enters, changes, and leaves.

That map answers practical questions before a change is made. Which component owns the setting? Which worker observes the feed? Which migration changes the stored shape? Which event handler is only a leaf, and which one mutates state that later code depends on?

Data Work Is a Feedback System

Data science and machine-learning applications are also application architectures. Observations enter, models are trained or updated, recommendations leave, users or operators react, and new observations come back. The useful question is where that feedback is stored, tested, audited, and corrected.

Responsibility follows the path. A model output is not only a number; it becomes part of a product, workflow, decision, or user-facing loop. The architecture should make that loop visible enough to test and improve.