Skip to content

Latest commit

History

History

README.md

libhttpserver v2.0 — architecture docs

Architecture references for the v2.0 (feature/v2.0) codebase. Every topic is a Markdown page (Mermaid + tables, renders inline on GitHub); the two spatial diagrams additionally have a rich, self-contained HTML companion (no external assets, light/dark aware) for the full colour-coded detail.

Diagrams

PageRich companionWhat it shows
class-map.mdclass-map.htmlwebserverwebserver_impl composition root (5 state collaborators + 7 behavior services + MHD adapter), per-request state, response_body hierarchy, filesystem layout
request-flow.mdrequest-flow.htmlthe MHD callback spine, body-accumulation loop, WebSocket branch, four-tier route resolution, and where the 11 hook phases fire

Deep dives

PageForCovers
threading.mdcontributorsDR-008 concurrency contract, full mutex inventory, lock ordering, Helgrind lane
errors.mdcontributorsDR-009 propagation, every 4xx/5xx origin, the handler-exception path, config knobs
hooks.mdAPI usersthe 11 phases, context fields, short-circuit vs observe, hook_handle, recipes
features.mdpackagers / API usersHAVE_* detection, gated symbols, features(), feature_unavailable, build matrix

Colour language (shared by the two diagrams): composition-root = blue · state collaborator = amber · behavior service = teal · MHD C-ABI adapter = purple · domain / value type = slate.

Keeping these current

These describe feature/v2.0 as of the DR-014 decomposition. They are hand-authored, not generated — when the composition root's collaborators, the callback spine, the route tiers, or the hook phases change, update the affected Markdown page and, for the two diagrams, its .html companion (and redeploy the live Claude artifact to keep the shared link in sync).