|
Aggie Student Toolkit — Load Balancer CSCE 412 Project 4
Arnav Fotedar · Fall 2026 · C++ load balancer simulation
|
A single web request waiting for, or receiving, service. More...
#include <Request.h>
Public Attributes | |
| unsigned long | id = 0 |
| Sequential identifier assigned by the generator. | |
| std::string | sourceIp |
| IPv4 address of the client sending the request. | |
| std::string | destinationIp |
| IPv4 address the response is returned to. | |
| unsigned int | taskCycles = 1 |
| Clock cycles of processing required (always at least 1). | |
| unsigned long | arrivalCycle = 0 |
| Clock cycle at which the request was generated. | |
| JobType | jobType = JobType::Processing |
| Processing ('P') or streaming ('S') work. | |
A single web request waiting for, or receiving, service.
Request is a plain value object. The RequestGenerator creates it with random IPv4 addresses, a random task duration and a random job type. The LoadBalancer stores it in a first-in, first-out queue and later copies it to an idle WebServer. A request is either queued or in service, never both.
| unsigned long Request::id = 0 |
| std::string Request::sourceIp |
| std::string Request::destinationIp |
| unsigned int Request::taskCycles = 1 |
| unsigned long Request::arrivalCycle = 0 |
| JobType Request::jobType = JobType::Processing |