Skip to content

Repository files navigation

MTT: A DASA Evaluation of the Train Ticket Microservice Benchmark

DASA (Dimensional Analysis for Software Architecture) evaluation of the Mini Train Ticket (MTT) experiment. The Train Ticket microservice benchmark is modelled as one composite $M/M/c/K$ station seen from its gateway, its four dimensionless coefficients are derived through PyDASA, and the same coefficients are then measured on a 1:4-scale prototype that is built and run here, on four different machines.

This is a reproducible deliverable, not a library: the output is a set of notebooks, figures and metrics that test the DASA Architectural Principle of Similitude. It is the one case in this line of work with real measurements rather than a model alone.

Documentation

Read in this order:

  1. docs/case-study.md - what the system under study is, at both scales: the reference Train Ticket fleet, and the scaled prototype mesh.
  2. docs/procedure.md - how the experiment is run: the DASA method, the hypotheses, and what each notebook does.
  3. docs/report.md - what it found, including the negative results and the pooling disagreement.

What it decides

The falsifiable quantity is the scaling exponent $\beta$ in the occupancy law $L = \alpha \cdot \lambda^{\beta}$. The target is derived from the reference model, and the tolerance band is declared before the runs.

Quantity Value
Target $\beta$ 1.1804
Tolerance $\pm 10%$, so $[1.062,\ 1.298]$
H1, predictive similitude response time predicted within $\pm 15%$ over a 10:1 load range
H2, architectural similitude the exponent transfers to a prototype designed from matched groups
Reading Pooled $\beta$ vs target Verdict
Controlled, four hosts, 1:4 cell 1.111 $-5.8%$ inside band
Gated (imposed delay removed) 1.265 $+7.2%$ inside band
Free (delay and gate removed) 1.239 $+5.0%$ inside band

Verdict: partial. $\beta$ transfers, pooled and bracketed across four machines, and survives removal of the imposed delay. The point coefficients do not transfer at face value, which is an expected $K$-scale effect. Section 6 of the report sets out four defensible poolings, one of which falls outside the band.

The two scales

Reference (Train Ticket) Prototype (MTT)
Servers $c$ 10 4
Buffer $K$ 25 10
Ratio $K/c$ 2.5 2.5 (preserved)
Service rate $\mu_s$ 42.105 req/s 26.316 req/s
Saturation $\lambda_{sat}$ 421.05 req/s 105.26 req/s

The prototype is a six-service homogeneous balanced mesh over three layers: a gateway dispatching sequentially to a processor, which round-robins each request to exactly one of four homogeneous leaves. Those four leaves are the $c = 4$ parallel servers.

Setup

python -m venv .venv
# Windows (Git Bash): source .venv/Scripts/activate
# Linux / macOS:      source .venv/bin/activate

pip install "git+https://github.com/DASA-Design/PyDASA.git@v0.7.1"
pip install -r requirements.txt

Python 3.12+. PyDASA is not on public PyPI, so install it from source first. The same code runs on Linux or Windows with no user configuration.

Notebooks

The pipeline is five numbered notebooks, in order.

Notebook What it does Needs
00-calibration Measures this host's timer, loopback and rate ceilings, so the apparatus limits are known before any experiment a live host
01-analysis Large-system DASA analysis of the reference architecture, and the reference Yoly chart nothing, deterministic
02-experiment Live measurement. Brings up the mesh and drives a real load sweep, writing one run-set per invocation a live, otherwise-idle host, hours
03-consolidation Recomputes each run's coefficients, applies the knee-coverage gate, aggregates the valid runs run-sets from 02
04-report Renders the consolidated similitude figures and writes the verdict a consolidation from 03

Running them headless

The whole pipeline, in order, from a fresh checkout:

python -m venv .venv
# Windows (Git Bash): source .venv/Scripts/activate
# Windows (cmd):      .venv\Scripts\activate.bat
# Linux / macOS:      source .venv/bin/activate

pip install "git+https://github.com/DASA-Design/PyDASA.git@v0.7.1"
pip install -r requirements.txt

jupyter nbconvert --to notebook --execute --inplace 00-calibration.ipynb
jupyter nbconvert --to notebook --execute --inplace 01-analysis.ipynb
jupyter nbconvert --to notebook --execute --inplace 02-experiment.ipynb
jupyter nbconvert --to notebook --execute --inplace 03-consolidation.ipynb
jupyter nbconvert --to notebook --execute --inplace 04-report.ipynb

--inplace writes each notebook back with its outputs, which is how the figures and tables stay readable here without anyone re-running the pipeline.

You will not normally run all five. The measurement run-sets behind the published result are committed under data/results/, so 01, 03 and 04 reproduce the whole analysis without re-measuring anything. Only 00 and 02 need a live host, and 02 is a genuine hours-long measurement that must not share the machine with any other load: competing work lands directly in the response times and invalidates the run.

Tests

pytest tests/ -q

Layout

  • src/mtt/ - composite-station model, similarity fit, DASA coefficients, PyDASA derivation.
  • src/prototype/ - the artifact under test: mesh topology, service, app factory, launcher, measurement I/O, analysis reducer.
  • src/experimental/ - the executor: load-sweep driver, calibration probes, runtime spawners, client primitives.
  • src/analytic/ - closed-form $M/M/1$, $M/M/c$ and $M/M/c/K$. src/dimensional/ - PyDASA glue. src/view/ - plotters. src/io/ - JSON loaders.
  • data/config/mtt/{large,proto}.json - the two dimensional envelopes. data/config/method/ - schema, procedure and apparatus specs.
  • data/results/mtt/proto/ - runs/ measurements, analysis/ consolidations, report/ verdicts, per host.
  • data/img/mtt/ - the reference figure and the consolidated prototype figures.
  • docs/ - the three documents above, plus the figures they cite in docs/img/.

Data convention

data/config/ is the single source of truth for parameter values; nothing numeric is hard-coded in the notebooks or analysis modules. Outputs mirror the input identifier: data/config/mtt/<profile>.json produces data/results/mtt/<profile>/analysis.json. Files under data/results/ are regenerated by runs and should not be hand-edited.

The four measured machines are published as Host A through Host D. Their CPU, core counts and memory are in the report; the machine names themselves are not part of the record.

License

GPL-3.0. See LICENSE.

About

This is the DASA design review of MiniTicket, our illustrative microservice scaling example, a dimensionally-scaled prototype of the TrainTicket benchmark system that preserves its Architectural Similitude, which and measure directly to validate the Architectural Principle of Similitude across a 10:1 structural scale reduction

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages