Skip to content

Architecture

Turbostar is built on Python’s asyncio library, using an Event Loop pattern to manage concurrency without threading overhead.

  1. The Dispatcher (core/dispatcher.py) The brain of the operation.
  • Parses the manifest.
  • Creates asyncio.subprocess instances for each command.
  • Holds asyncio.Event locks for dependency management.
  • When Service A prints its “Ready Signal”, the Dispatcher unlocks the Event for Service A, allowing Service B (which was awaiting that event) to start.
  1. The Logger (core/logger.py) The UI layer.
  • Asynchronously reads stdout and stderr streams from all child processes.
  • Injects ANSI colour codes based on configuration.
  • Scans every line of text for “Ready Signals” to notify the Dispatcher.
  1. User runs turbostar
  2. CLI loads manifest.json
  3. Dispatcher creates task list.
  4. Task A starts -> Pipes output to Logger.
  5. Task B waits (await dependency_event).
  6. Task A prints “Ready”.
  7. Logger detects “Ready” -> Sets Event.
  8. Task B wakes up -> Starts process.