Aggie Student Toolkit — Load Balancer CSCE 412 Project 4
Arnav Fotedar · Fall 2026 · C++ load balancer simulation
Loading...
Searching...
No Matches
Request Struct Reference

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.

Detailed Description

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.

Definition at line 41 of file Request.h.

Member Data Documentation

◆ id

unsigned long Request::id = 0

Sequential identifier assigned by the generator.

Definition at line 42 of file Request.h.

◆ sourceIp

std::string Request::sourceIp

IPv4 address of the client sending the request.

Definition at line 43 of file Request.h.

◆ destinationIp

std::string Request::destinationIp

IPv4 address the response is returned to.

Definition at line 44 of file Request.h.

◆ taskCycles

unsigned int Request::taskCycles = 1

Clock cycles of processing required (always at least 1).

Definition at line 45 of file Request.h.

◆ arrivalCycle

unsigned long Request::arrivalCycle = 0

Clock cycle at which the request was generated.

Definition at line 46 of file Request.h.

◆ jobType

JobType Request::jobType = JobType::Processing

Processing ('P') or streaming ('S') work.

Definition at line 47 of file Request.h.


The documentation for this struct was generated from the following file: