graph LR
ServerRuntime["ServerRuntime"]
Request_Dispatcher["Request Dispatcher"]
Request_Handler["Request Handler"]
Resource_Manager["Resource Manager"]
Metrics_Collector["Metrics Collector"]
ServerRuntime -- "contains" --> Request_Dispatcher
ServerRuntime -- "contains" --> Request_Handler
ServerRuntime -- "initializes and holds reference to" --> Resource_Manager
ServerRuntime -- "accesses" --> Metrics_Collector
Request_Dispatcher -- "spawns" --> Request_Handler
Request_Handler -- "interacts with" --> Resource_Manager
Request_Handler -- "updates" --> Metrics_Collector
The Backend Service subsystem simulates a server's operational behavior, resource consumption, and performance. It is a critical part of the simulation, modeling how requests are processed and how server resources are utilized.
The primary class that orchestrates the simulation of a backend server. It manages the server's lifecycle, resource allocation, request processing, and state reporting. This component acts as the central hub for all server-specific simulation logic.
Related Classes/Methods:
An internal mechanism within ServerRuntime responsible for continuously monitoring the server's inbox for new requests. Upon receiving a request, it initiates a dedicated process for its handling.
Related Classes/Methods:
The core logic unit that simulates the processing of an individual request within the server. It models the consumption of CPU and RAM resources and introduces delays for both CPU-bound and I/O-bound operations.
Related Classes/Methods:
Manages the server's available CPU and RAM resources, ensuring that requests acquire and release them appropriately during their processing. This is implemented using SimPy's resource mechanisms.
Related Classes/Methods:
Responsible for collecting and exposing various performance metrics related to the server's operation, such as the length of the ready queue, I/O queue, and total RAM in use.
Related Classes/Methods: