Here’s an updated, list-style index.md (in English) without any Tutorials section and with a clear pointer to the math details in the workload samplers.
AsyncFlow is a discrete-event simulator for Python async backends (FastAPI/Uvicorn–style). It builds a digital twin of your service—traffic, topology, and resources—so you can measure latency, throughput, queueing, RAM, and more before you deploy.
⚠️ The package README withpip install& a Quickstart will land after the first PyPI release.
- High-Level API — The two entry points you’ll use most:
AsyncFlow(builder) andSimulationRunner(orchestrator). - Components — Public Pydantic models for topology:
Client,Server,Endpoint,Edge,LoadBalancer,NodesResources. - Workload — Traffic inputs:
RqsGeneratorandRVConfig(random variables). - Settings — Global controls:
SimulationSettings(duration, sampling cadence, metrics). - Enums — Optional importable enums: distributions, step kinds/ops, metric names, node/edge types, LB algorithms.
- Builder Guide — Programmatically assemble a
SimulationPayloadin Python with validation and examples. - YAML Input Guide — Author scenarios in YAML: exact schema, units, constraints, runnable samples.
- Dev workflow Guide — Describes the development workflow, repository architecture, branching strategy and CI/CD for AsyncFlow
Prefer formal underpinnings? The Workload Samplers section includes mathematical details (compound Poisson–Poisson and Normal–Poisson processes, inverse-CDF gaps, truncated Gaussians).
-
Simulation Input (contract) — The complete
SimulationPayloadschema and all validation guarantees (graph integrity, step coherence, etc.). -
Simulation Runner — Orchestrator design; build → wire → start → run flow; sequence diagrams; extensibility hooks.
-
Runtime & Resources — How CPU/RAM/DB are modeled with SimPy containers; decoupling of runtime logic and resources.
-
Metrics
-
Time-Series Architecture — Registry → runtime state → collector pipeline; why the
if key in …guard keeps extensibility with zero hot-path cost.
-
Time-Series Architecture — Registry → runtime state → collector pipeline; why the
-
Workload Samplers (math) — Formalization of traffic generators: windowed user resampling, rate construction
$\Lambda = U \cdot \text{RPM}/60$ , exponential inter-arrival via inverse-CDF, latency RV constraints.
Every run boils down to this validated input:
SimulationPayload(
rqs_input=RqsGenerator(...), # workload
topology_graph=TopologyGraph(...), # nodes & edges
sim_settings=SimulationSettings(...),
)Build it (via Builder or YAML) and hand it to SimulationRunner to execute and analyze.