GNU Artanis: Axiomatic Design and Module Independence
Introduction
These days, some young people have been analyzing GNU Artanis source code with ChatGPT using something they call "MIT Axiom Analysis". I don't really know what it is, but it sounds something like FR-DP mapping, which is at the core of Axiomatic Design.
However, they are not familiar with the correct FR-DP mapping of GNU Artanis. Although their matrix is still lower-triangular, which means a "decoupled design", I don't feel very good about this result.
In my mind, the design of GNU Artanis should be perfectly diagonal matrix.
So this article examines GNU Artanis through the lens of Axiomatic Design.
The objective is to understand how its Functional Requirements (FRs) map to Design Parameters (DPs), and whether changes to one module can affect the functionality provided by other modules.
The current architectural decomposition identifies 17 FR-DP pairs, covering runtime infrastructure, independent functional subsystems, and optional composition and extension mechanisms.
FR-DP Index
| No. | Functional Requirement (FR) | Design Parameter (DP) |
|---|---|---|
| 1 | Application Initialization | Application Bootstrap |
| 2 | Concurrent Task Scheduling | Ragnarok Runtime |
| 3 | Blocking Operation Isolation | Runner |
| 4 | Outbound HTTP Requests | HTTP Client / libcurl |
| 5 | Inbound HTTP Processing | HTTP Server Protocol |
| 6 | Route Matching | Route Engine |
| 7 | Handler Execution & Resource Lifecycle | Page Pipeline |
| 8 | Database Access & Connection Pool | DB Subsystem |
| 9 | Session, Cookie & Authentication | Session / Cookie / Auth |
| 10 | WebSocket Communication | WebSocket Protocol |
| 11 | Caching | Cache Subsystem |
| 12 | File Upload & POST Parsing | Upload / POST Parser |
| 13 | MIME Conversion & Serialization | MIME / Serialization |
| 14 | Request-level Persistent Cache | LPC Subsystem |
| 15 | Internationalization | i18n Subsystem |
| 16 | Declarative Feature Composition | OHT |
| 17 | Third-party Feature Extension | Plugin Registration |
The diagonal structure in Figure 1 is a source-grounded architectural hypothesis, not a completed proof of the Independence Axiom.
The Meaning of Design Coupling
An essential distinction must be made between two different forms of dependency:
- Runtime dependency: one module invokes another module, exchanges data with it, or participates in a shared execution workflow.
- Design coupling: a change to one module's design forces changes to another module in order to preserve the system's Functional Requirements.
These are not equivalent.
Axiomatic Design is concerned with the relationship between FRs and DPs. In this analysis, the relevant question is whether changing a DP affects the ability of another FR to be satisfied.
For software, we use a contract-preserving change test:
If a module's internal implementation changes while its public API, observable behavior, lifecycle guarantees, and concurrency semantics remain unchanged, must another module also be modified?
If the answer is no, the runtime relationship alone does not establish design coupling.
A module may call another module frequently and still remain independently replaceable. Conversely, two modules may have very few direct calls but remain tightly coupled through shared data structures, hidden assumptions, or lifecycle contracts.
Therefore, this analysis concerns change coupling, not a call graph or runtime dependency graph.
Architectural Decomposition
The 17 FR-DP pairs are organized into three architectural groups.
Runtime Infrastructure
The runtime infrastructure consists of:
- Application Bootstrap
- Ragnarok Runtime
- Runner
- HTTP Client
- HTTP Server
Ragnarok provides coroutine-style task scheduling. When non-blocking I/O cannot proceed, the current task is suspended. The runtime waits for the corresponding I/O readiness and subsequently resumes the task.
Runner serves a different purpose: it isolates traditional blocking operations that cannot be handled through the non-blocking event-loop model.
The HTTP Client and HTTP Server are distinct implementations. The client uses libcurl and can offload blocking requests to Runner when called from a Ragnarok task. The server uses non-blocking socket I/O and Ragnarok scheduling.
Their runtime cooperation does not automatically imply that their internal implementations are design-coupled.
Independent Functional Subsystems
The functional subsystems include:
- Route Engine
- Page Pipeline
- DB Subsystem
- Session / Cookie / Auth
- WebSocket Protocol
- Cache Subsystem
- Upload / POST Parser
- MIME / Serialization
- LPC Subsystem
- i18n Subsystem
These modules provide distinct capabilities and expose interfaces through which applications can use them.
Their presence in a common framework does not mean that one must be implemented through another.
For example, DB and Session are not inherently coupled. A particular Session backend may use a database, but this is a backend-specific integration choice rather than a mandatory dependency of the entire Session subsystem.
Similarly, Page Pipeline may participate in releasing DB connections or LPC resources at the end of a request. This runtime responsibility must not be confused with ownership of the DB or LPC implementation.
The relevant question is whether their resource lifecycle contracts can evolve independently.
Optional Composition and Extension
Two additional mechanisms complete the architecture:
- OHT (Option Handler Table)
- Plugin Registration
OHT provides dynamic handler dispatch, per-route feature composition, and a convenient declarative interface.
It is an optional shortcut, not a mandatory entry point for the functional subsystems.
Applications can use DB, Session, Cache, WebSocket, and other modules directly without going through OHT. They may alternatively choose to access those capabilities through Route Options.
Plugin Registration follows the same principle. A plugin may register a handler with OHT to gain convenient route-level integration, but it does not have to depend on OHT to exist or provide its own API.
Consequently, neither OHT nor Plugin Registration should be treated as a mandatory dependency of the underlying functional subsystems.
Why Runtime Dependencies Do Not Automatically Produce Design Coupling
Consider three examples.
OHT and DB
OHT can dispatch a DB-related route option and help associate a connection with a particular request.
However, DB can be used independently. If the DB implementation changes while preserving its public API and connection lifecycle contract, OHT does not necessarily need to change.
The runtime invocation relationship therefore does not establish design coupling.
DB and Session
A Session implementation may use a DB backend, but this is a specific implementation choice. Other Session backends can operate independently.
The existence of one integration path does not establish an inherent design dependency between the two subsystems.
Ragnarok and HTTP I/O
HTTP Server relies on Ragnarok's task scheduling facilities. This is an important runtime relationship.
However, the relevant design question is whether the HTTP Server depends on Ragnarok's internal implementation or on a stable task and scheduling contract.
If Ragnarok's internals change without changing that contract, the HTTP Server should not require corresponding implementation changes.
This relationship deserves source-level contract verification, but it should not be marked as design coupling merely because the server uses the scheduler.
Verification Targets
The current architectural hypothesis still requires source-level verification.
Potential coupling points include:
- Ragnarok and WebSocket task lifecycle contracts.
- Page Pipeline and DB/LPC resource cleanup contracts.
- HTTP Server and Route request/response contracts.
- Bootstrap and subsystem initialization contracts.
- Runner and Ragnarok suspension, resumption, and timeout semantics.
These are verification targets, not confirmed coupling relationships.
Conclusion
The current architectural hypothesis suggests that GNU Artanis separates functional implementation from functional composition.
Its subsystems can provide independent APIs, while OHT offers an optional dynamic dispatch mechanism and Plugin Registration provides an optional extension path.
The key methodological point is that runtime collaboration is not the same as design coupling.
A framework can contain extensive runtime interactions while retaining a highly modular design, provided those interactions are mediated by stable contracts and internal implementations can evolve independently.
Figure 1 captures this architectural hypothesis. Its diagonal structure suggests that each functional requirement has a corresponding primary design parameter, without identified cross-module design coupling.
The next step is to validate this hypothesis through contract-preserving change analysis, rather than infer coupling from imports or function calls.
Source Baseline
- Repository: https://github.com/NalaGinrut/artanis
- Commit:
22038c8d75c65308d27785d8c9d8c877b4d132ff