Skip to content

ProcessHub v1.0.0 - Initial Release

Pre-release
Pre-release

Choose a tag to compare

@milanac030988 milanac030988 released this 27 Jan 06:44
· 7 commits to develop since this release
Immutable release. Only release title and notes can be modified.
f2569f2

ProcessHub v1.0.0

A Python library for managing and coordinating processes across distributed systems.

This is the first official release of ProcessHub, providing centralized process lifecycle management for test automation and distributed environments.

Highlights

  • Process Lifecycle Management - Start, stop, and monitor processes with health checking
  • Multi-Client Coordination - Multiple panels can share processes using reference counting
  • Crash Recovery - Automatic detection and coordinated restart across all affected clients
  • Web Dashboard - Real-time browser-based monitoring with REST API
  • Multiple Transports - ZMQ, RabbitMQ (EventBus), and in-memory for testing

Features

Core

  • Process ownership model with reference counting (ADR-015)
  • Restart coordination as explicit state machine (ADR-004)
  • Immutable state snapshots for thread-safe UI rendering (ADR-016)
  • Typed protocol messages with versioning (ADR-006)

Transports

  • ZMQ Transport - XPUB/XSUB broker pattern for local networks
  • EventBus Transport - RabbitMQ-based for distributed deployments (ADR-014)
  • InMemory Transport - For unit testing without network

Web Dashboard (FastAPI)

  • Real-time status display with auto-refresh
  • Process control (Start/Stop/Kill)
  • Configuration management (Add/Edit/Remove)
  • Log viewer with filtering (logger, level, prefix include/exclude)
  • REST API with Swagger documentation

Admin API

  • Remote process start/stop/kill
  • Process configuration CRUD operations
  • Hub reset without server restart
  • Available processes list

Operational Features

  • TCP keepalive for ~25 second crash detection (ADR-009)
  • Server shutdown notification to clients (ADR-010)
  • Hub reset without restart (ADR-011)
  • Graceful client disconnection handling

Platform Support

  • Windows process handling
  • Unix/Linux process handling

Installation

# Basic installation
pip install python-process-hub

# With ZMQ support
pip install python-process-hub[zmq]

# With web dashboard
pip install python-process-hub[web]

# All optional dependencies
pip install python-process-hub[zmq,web]

Quick Start

# Server
from ProcessHub import ProcessHubServer, ZmqTransport, ConsoleView

transport = ZmqTransport(start_broker=True)
server = ProcessHubServer(transport=transport, view=ConsoleView())
server.run()

# Client
from ProcessHub import ProcessHubClient, ZmqTransport

transport = ZmqTransport(start_broker=False)
client = ProcessHubClient(transport=transport)
client.start()
client.register_connection(session_id="my_session")
client.request_process_start(["worker_1", "worker_2"])

Documentation

- ProcessHub/ProcessHub.pdf
- docs/adr/
- examples/
- http://localhost:2507/docs (when running WebView)

Examples
┌──────────────────────────┬───────────────────────────────────────┐
│         Example          │              Description              │
├──────────────────────────┼───────────────────────────────────────┤
│ 01_basic_server.py       │ Minimal server setup                  │
├──────────────────────────┼───────────────────────────────────────┤
│ 02_basic_client.py       │ Client connection and process control │
├──────────────────────────┼───────────────────────────────────────┤
│ 03_multi_panel.py        │ Multiple clients sharing processes    │
├──────────────────────────┼───────────────────────────────────────┤
│ 04_restart_handling.py   │ Crash recovery coordination           │
├──────────────────────────┼───────────────────────────────────────┤
│ 05_custom_executor.py    │ Custom process execution              │
├──────────────────────────┼───────────────────────────────────────┤
│ 06_web_dashboard.py      │ Web-based dashboard                   │
├──────────────────────────┼───────────────────────────────────────┤
│ 10_admin_dashboard.py    │ Full admin API                        │
├──────────────────────────┼───────────────────────────────────────┤
│ 11_eventbus_transport.py │ RabbitMQ transport                    │
└──────────────────────────┴───────────────────────────────────────┘
Architecture Decision Records
┌─────────┬───────────────────────────────────────┐
│   ADR   │                 Title                 │
├─────────┼───────────────────────────────────────┤
│ ADR-001 │ Lock-Based Operation Serialization    │
├─────────┼───────────────────────────────────────┤
│ ADR-002 │ Separation of Core Logic and Runtime  │
├─────────┼───────────────────────────────────────┤
│ ADR-003 │ Pluggable Transport Layer             │
├─────────┼───────────────────────────────────────┤
│ ADR-004 │ Restart Coordination as State Machine │
├─────────┼───────────────────────────────────────┤
│ ADR-005 │ Normalized Process Representation     │
├─────────┼───────────────────────────────────────┤
│ ADR-006 │ Typed Protocol Messages               │
├─────────┼───────────────────────────────────────┤
│ ADR-007 │ Decoupled UI via HubView Protocol     │
├─────────┼───────────────────────────────────────┤
│ ADR-008 │ Pluggable Process Executor            │
├─────────┼───────────────────────────────────────┤
│ ADR-009 │ TCP Keepalive for Crash Detection     │
├─────────┼───────────────────────────────────────┤
│ ADR-010 │ Server Shutdown Notification          │
├─────────┼───────────────────────────────────────┤
│ ADR-011 │ Hub Reset Without Restart             │
└─────────┴───────────────────────────────────────┘
Requirements

- Python 3.9+
- pyzmq (for ZMQ transport)
- fastapi, uvicorn (for web dashboard)
- EventBusClient (for RabbitMQ transport)

License

Apache License 2.0

Contributors

- Nguyen Huynh Tri Cuong (MS/EMC51)
- Thomas Pollerspöck (XC-HWP/ESC3)