# mohaneshwarishanmugaraj-arch/multithreaded-priority-task-scheduler architecture

> Architecture diagram of the GitHub repository mohaneshwarishanmugaraj-arch/multithreaded-priority-task-scheduler, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-14). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/mohaneshwarishanmugaraj-arch/multithreaded-priority-task-scheduler
- Repository: https://github.com/mohaneshwarishanmugaraj-arch/multithreaded-priority-task-scheduler

## Overview

Fulfill is described as an order-fulfillment dashboard backed by a threaded priority scheduler. The supplied tree contains only the original standalone Python simulation, not the documented backend or React frontend, so those capabilities are shown as README-documented components with no source paths. The visible runtime creates tasks, queues and dispatches them to workers, accounts for resources, and records completion statistics. Edges for the standalone flow come from the sampled source; dashboard relationships are documented in the README.

Main entry points: [`main.py`](https://github.com/mohaneshwarishanmugaraj-arch/multithreaded-priority-task-scheduler/blob/main/main.py) (Simulation entry point), [`worker.py`](https://github.com/mohaneshwarishanmugaraj-arch/multithreaded-priority-task-scheduler/blob/main/worker.py) (Worker threads), [`producer.py`](https://github.com/mohaneshwarishanmugaraj-arch/multithreaded-priority-task-scheduler/blob/main/producer.py) (Task producer), [`scheduler.py`](https://github.com/mohaneshwarishanmugaraj-arch/multithreaded-priority-task-scheduler/blob/main/scheduler.py) (Priority scheduler)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_dashboard["Operations dashboard"]
  node_dashboard_ui["React dashboard"]
  node_api["Fulfillment REST API"]
end

subgraph group_dispatch["Task dispatch"]
  node_api_scheduler["API scheduler service"]
  node_main["Simulation entry point<br/>[main.py]"]
  node_producer["Task producer<br/>[producer.py]"]
  node_scheduler["Priority scheduler<br/>[scheduler.py]"]
end

subgraph group_execution["Task execution"]
  node_task["Task lifecycle<br/>[task.py]"]
  node_worker["Worker threads<br/>[worker.py]"]
  node_resources["Resource manager<br/>[resource.py]"]
end

subgraph group_support["Shared support"]
  node_statistics["Run statistics<br/>[statics.py]"]
  node_logger["Thread-safe logger<br/>[logger.py]"]
  node_configuration["Scheduler settings<br/>[configuration.py]"]
end

node_operator(("Operator"))

node_operator -->|"operates"| node_dashboard_ui
node_dashboard_ui -->|"polls and submits"| node_api
node_api -->|"queues and queries"| node_api_scheduler
node_main -->|"creates"| node_scheduler
node_main -->|"starts"| node_producer
node_main -->|"starts"| node_worker
node_main -->|"creates"| node_resources
node_main -->|"creates"| node_statistics
node_main -->|"creates"| node_logger
node_producer -->|"creates"| node_task
node_producer -->|"enqueues"| node_scheduler
node_producer -->|"records production"| node_statistics
node_producer -->|"logs events"| node_logger
node_scheduler -->|"uses settings"| node_configuration
node_worker -->|"dequeues"| node_scheduler
node_worker -->|"acquires and releases"| node_resources
node_worker -->|"starts and completes"| node_task
node_worker -->|"records completion"| node_statistics
node_worker -->|"logs events"| node_logger
node_main -->|"prints summary"| node_statistics

click node_main "https://github.com/mohaneshwarishanmugaraj-arch/multithreaded-priority-task-scheduler/blob/main/main.py"
click node_producer "https://github.com/mohaneshwarishanmugaraj-arch/multithreaded-priority-task-scheduler/blob/main/producer.py"
click node_scheduler "https://github.com/mohaneshwarishanmugaraj-arch/multithreaded-priority-task-scheduler/blob/main/scheduler.py"
click node_task "https://github.com/mohaneshwarishanmugaraj-arch/multithreaded-priority-task-scheduler/blob/main/task.py"
click node_worker "https://github.com/mohaneshwarishanmugaraj-arch/multithreaded-priority-task-scheduler/blob/main/worker.py"
click node_resources "https://github.com/mohaneshwarishanmugaraj-arch/multithreaded-priority-task-scheduler/blob/main/resource.py"
click node_statistics "https://github.com/mohaneshwarishanmugaraj-arch/multithreaded-priority-task-scheduler/blob/main/statics.py"
click node_logger "https://github.com/mohaneshwarishanmugaraj-arch/multithreaded-priority-task-scheduler/blob/main/logger.py"
click node_configuration "https://github.com/mohaneshwarishanmugaraj-arch/multithreaded-priority-task-scheduler/blob/main/configuration.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_dashboard_ui,node_api toneBlue
class node_api_scheduler,node_main,node_producer,node_scheduler toneAmber
class node_task,node_worker,node_resources toneMint
class node_statistics,node_logger,node_configuration toneRose
class node_operator toneIndigo
```

## Components

### Operations dashboard

- **React dashboard**
- **Fulfillment REST API**

### Task dispatch

- **API scheduler service**
- [Simulation entry point](https://github.com/mohaneshwarishanmugaraj-arch/multithreaded-priority-task-scheduler/blob/main/main.py): `main.py`
- [Task producer](https://github.com/mohaneshwarishanmugaraj-arch/multithreaded-priority-task-scheduler/blob/main/producer.py): `producer.py`
- [Priority scheduler](https://github.com/mohaneshwarishanmugaraj-arch/multithreaded-priority-task-scheduler/blob/main/scheduler.py): `scheduler.py`

### Task execution

- [Task lifecycle](https://github.com/mohaneshwarishanmugaraj-arch/multithreaded-priority-task-scheduler/blob/main/task.py): `task.py`
- [Worker threads](https://github.com/mohaneshwarishanmugaraj-arch/multithreaded-priority-task-scheduler/blob/main/worker.py): `worker.py`
- [Resource manager](https://github.com/mohaneshwarishanmugaraj-arch/multithreaded-priority-task-scheduler/blob/main/resource.py): `resource.py`

### Shared support

- [Run statistics](https://github.com/mohaneshwarishanmugaraj-arch/multithreaded-priority-task-scheduler/blob/main/statics.py): `statics.py`
- [Thread-safe logger](https://github.com/mohaneshwarishanmugaraj-arch/multithreaded-priority-task-scheduler/blob/main/logger.py): `logger.py`
- [Scheduler settings](https://github.com/mohaneshwarishanmugaraj-arch/multithreaded-priority-task-scheduler/blob/main/configuration.py): `configuration.py`

### Other components

- **Operator**

## Connections

- Operator → React dashboard: operates (evidence: `README.md`)
- React dashboard → Fulfillment REST API: polls and submits (evidence: `README.md`)
- Fulfillment REST API → API scheduler service: queues and queries (evidence: `README.md`)
- Simulation entry point → Priority scheduler: creates (evidence: `main.py`)
- Simulation entry point → Task producer: starts (evidence: `main.py`)
- Simulation entry point → Worker threads: starts (evidence: `main.py`)
- Simulation entry point → Resource manager: creates (evidence: `main.py`)
- Simulation entry point → Run statistics: creates (evidence: `main.py`)
- Simulation entry point → Thread-safe logger: creates (evidence: `main.py`)
- Task producer → Task lifecycle: creates (evidence: `producer.py`)
- Task producer → Priority scheduler: enqueues (evidence: `producer.py`)
- Task producer → Run statistics: records production (evidence: `producer.py`)
- Task producer → Thread-safe logger: logs events (evidence: `producer.py`)
- Priority scheduler → Scheduler settings: uses settings (evidence: `scheduler.py`)
- Worker threads → Priority scheduler: dequeues (evidence: `worker.py`)
- Worker threads → Resource manager: acquires and releases (evidence: `worker.py`)
- Worker threads → Task lifecycle: starts and completes (evidence: `worker.py`)
- Worker threads → Run statistics: records completion (evidence: `worker.py`)
- Worker threads → Thread-safe logger: logs events (evidence: `worker.py`)
- Simulation entry point → Run statistics: prints summary (evidence: `main.py`)
