Skip to content

Components

This page gives a current high-level map of Cullinan's main runtime components.

For the contract behind automatic discovery and registration, read Framework Semantics. The short version is: Cullinan guarantees module-top-level decorated components whose decorators run during import, not arbitrary local class definitions created later.

Runtime overview

1. Application orchestration

  • Responsibility: module graph discovery, ownership resolution, runtime activation, draining, and active-app lookup
  • Main package: cullinan.application
  • Key APIs: Application, module, Application.current(), Runtime

2. Core container

  • Responsibility: dependency registration, resolution, scopes, lifecycle, request context
  • Main package: cullinan.core
  • Key APIs: ApplicationContext, Definition, ScopeType, Inject, InjectByName

3. Service layer

  • Responsibility: business logic and long-lived framework-managed services
  • Main package: cullinan.core (@service) with advanced Service/registry helpers under cullinan.core.services
  • Key APIs: service, Service

4. Controller layer

  • Responsibility: route declaration and handler methods
  • Main package: cullinan.web.controller
  • Key APIs: controller, get_api, post_api, response_build

5. Web Runtime

  • Responsibility: normalized request/response model, routing, dispatch, middleware, exceptions
  • Main package: cullinan.web.gateway
  • Key APIs: WebRequest, WebResponse, Router, Dispatcher, MiddlewarePipeline, WebRuntime

6. Adapters

  • Responsibility: bind the Web Runtime to a specific server environment
  • Main package: cullinan.transport.adapter
  • Key APIs: WebAdapter, TornadoAdapter, ASGIAdapter
  • Positioning: backend integration layer behind Cullinan's semantic Web facade

7. Parameters and model binding

  • Responsibility: map path/query/body/header/file inputs into handler arguments
  • Main package: cullinan.web.params
  • Key APIs: Path, Query, Body, Header, File

Suggested reading order

  1. Architecture
  2. Application Runtime Model
  3. Framework Semantics
  4. Dependency Injection Guide
  5. Web Runtime Guide
  6. Testing & Verification