Skip to content

Conversation

@GioeleB00
Copy link
Collaborator

Release: v0.1.0-alpha — Public Preview of AsyncFlow

Why

First public preview of the AsyncFlow simulator. This sets the baseline for community feedback and early adopters.

What’s included (high-level)

  • Core simulator (SimPy-based) for async, distributed backends.

  • Topology graph: client, servers, load balancer, network edges with probabilistic latency.

  • Stochastic workload (active users × requests/min).

  • Inputs: full YAML schema or a Python builder with identical semantics.

  • ResultsAnalyzer with plotting helpers:

    • Latency histogram (mean/P50/P95/P99).
    • Throughput with overlays (mean/P95/max).
    • Per-server Ready Queue and RAM usage.
  • Examples:

    • Single server (YAML and builder).
    • Load balancer + two servers (builder and YAML).
  • Dev tooling:

    • scripts/dev_setup.(sh|ps1) (one-shot post-clone).
    • scripts/quality_check.(sh|ps1) (Ruff + MyPy).
    • scripts/run_tests.(sh|ps1) (unit/integration with coverage).
    • scripts/run_sys_tests.(sh|ps1) (system tests).
  • CI:

    • Main-branch workflow gating on lint, type check, unit/integration and system tests.

Known limitations (tracked for v0.1 line)

  • Simplified network (no bandwidth/payload/TCP).
  • One event loop per server (no multi-process model yet).
  • Linear endpoint pipelines (no branching/fan-out).
  • No autoscaling/backpressure policies.
  • Sampling cadence can miss ultra-short spikes.

How reviewers can validate quickly

Local (Linux/macOS/WSL):

bash scripts/dev_setup.sh
bash scripts/run_tests.sh         # unit + integration
bash scripts/run_sys_tests.sh     # system tests

Local (Windows PowerShell):

.\scripts\dev_setup.ps1
.\scripts\run_tests.ps1
.\scripts\run_sys_tests.ps1

Try examples (plots saved next to the script):

  • Single server from YAML: see examples/ (prints latency + saves a 2×2 PNG).
  • Load balancer (2 servers) from builder: analogous 2×2 PNG plus per-server plots.

CI on this PR runs Ruff, MyPy, unit/integration and system tests. All must pass for merge.


Breaking changes

None. This is the first public preview; public modules are intentionally small and explicit.

Documentation

  • Updated README with Quick Start (YAML + builder), development setup, and scripts.
  • Example scripts demonstrate recommended public APIs and plotting.

Release notes (user-facing)

  • New: AsyncFlow simulator (SimPy) with async server event-loop semantics (CPU/RAM/IO steps).
  • New: Topology graph (client, servers, load balancer, edges with stochastic latency).
  • New: Stochastic workload generator (active users × req/min).
  • New: ResultsAnalyzer with latency/throughput and per-server metrics plots.
  • New: Examples (single server, LB with two servers) and developer scripts.
  • CI: main branch gated by lint, type check, unit/integration, and system tests.

Risks & mitigations

  • Platform diffs in dependency resolution: dev setup intentionally deletes poetry.lock to avoid cross-platform lock drift; CI pins Python 3.12 and installs with --with dev.
  • Matplotlib headless: CI sets MPLBACKEND=Agg.

Checklist

  • Code compiles and examples run (plots generated).
  • Ruff/MyPy clean on src/ and tests/.
  • Unit + integration tests pass locally.
  • System tests pass locally.
  • CI green on this PR (all jobs, including system).
  • README updated (Quick Start, scripts, examples).
  • Release tag/version set to v0.1.0-alpha.

Reviewer focus: public API boundaries (asyncflow.{analysis,components,enums,settings,workload}), examples’ clarity, CI gating behavior, and overall dev-onboarding flow.


GioeleB00 and others added 30 commits July 3, 2025 15:20
* setting up the generator

* poisson-poisson requests sampling

* Delete docker_fs/.env.dev

* Delete docker_fs/.env.test

* changes

* refactor for event generator

* added gaussian truncated generator and unit tests for helpers

* imprved documentantion and simulation time handling

* simulation start with the vent generator

* small refactor + tests for the generation of events

* minor changes

* Update src/app/schemas/simulation_input.py

Co-authored-by: Copilot <[email protected]>

* Update tests/unit/sampler/test_sampler_helper.py

Co-authored-by: Copilot <[email protected]>

* Update scripts/quality-check.sh

Co-authored-by: Copilot <[email protected]>

* Update tests/integration/db_initialization/test_init_models.py

Co-authored-by: Copilot <[email protected]>

* minor changes after PR review

---------

Co-authored-by: Copilot <[email protected]>
* moving file to correct folder

* Documentation added

* Update requests_generator.md

* test Added, introduced constants for the sampling window

* Update tests/unit/sampler/test_poisson_posson.py

Co-authored-by: Copilot <[email protected]>

---------

Co-authored-by: Copilot <[email protected]>
* Introduction of the input structure for endpoints

* Documentation + foundation of topology input

* Improve Step validation, added unit test for the input

* improved documentation for the input
* Improved input structure and pytest

* Improved pytest structure accordingly to the new schema

* definition of the metrics to be measured and update of the simulation input

* improved documentations added rationale behind metrics

* improved pytest logic and code coherence

* Update src/app/core/helpers.py

Co-authored-by: Copilot <[email protected]>

---------

Co-authored-by: Copilot <[email protected]>
* definition of state and RqsGeneratorRuntime

* defined edge runtime and more central logic for sampler

* minor changes

* minor changes

* minor bug fixed

* pytest adapted to the new structure, added pytest for rqs_state

* Update src/app/core/runtime/rqs_generator.py

Co-authored-by: Copilot <[email protected]>

* Update src/app/core/runtime/rqs_generator.py

Co-authored-by: Copilot <[email protected]>

* Update src/app/core/runtime/edge.py

Co-authored-by: Copilot <[email protected]>

* Update src/app/core/runtime/edge.py

Co-authored-by: Copilot <[email protected]>

* Update tests/unit/runtime/test_requests_generator.py

Co-authored-by: Copilot <[email protected]>

* Update src/app/core/event_samplers/common_helpers.py

Co-authored-by: Copilot <[email protected]>

* Update src/app/core/event_samplers/common_helpers.py

Co-authored-by: Copilot <[email protected]>

* Update src/app/core/event_samplers/common_helpers.py

Co-authored-by: Copilot <[email protected]>

* minor changes

---------

Co-authored-by: Copilot <[email protected]>
* defined client runtime + tests

* initiated the server runtime plus correction of tghe structure

* code refactor + test added for runtime + documentation

* Update tests/conftest.py

Co-authored-by: Copilot <[email protected]>

---------

Co-authored-by: Copilot <[email protected]>
* defined architecture for the central collector + documentation

* server modification to collect metrics and updated docs

* Completed metric collector for server plus test

* remove web app dependencies and added metrics for rqs latency

* improved docs and improved metric collection

* changes to make the code compatible with new changes

* improved ci against toml changes

* update lock file

* minor change
* introduction to the analyzer class + tests

* refactor of the analyzer
* Added LB structure in the input for the simulation + tests

* introduced LB runtime + documentation

* Added test for LB and small refactor to define the SimRunner
* added the first method to the simulation runner

* added methods to handle nodes

* completed simulation runtime + integration test
* new integration test + bug fixing

* added integration and unit test

* first tests working

* minor change

* first working example, upgrade docs, upgrade docstrings

* improvements

* path bug fixed
* Changed name from fastsim to asyncflow app folder renamed in asyncflow

* improved docs
* Reafctor for the folder schemas + defined import for public api

* Defined public api, improved docs
GioeleB00 and others added 6 commits August 14, 2025 19:21
* minor docs changes

* improved pytoml

* improved docs + LB examples
* Readme final, docs improved

* Docs improvement, refactor analyzer, example added

* Added scripts for setup, added pytest, improved readme

* Example LB improvements

* CI for main + system tests
@GioeleB00 GioeleB00 merged commit 7969be6 into main Aug 17, 2025
3 checks passed
@GioeleB00 GioeleB00 deleted the release/0.1.0 branch August 17, 2025 16:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants