Applications

OffloadClient

class OffloadClient : public Application

Configurable client that generates tasks for remote processing.

OffloadClient models a device that generates tasks according to a pluggable inter-arrival distribution and offloads them to a backend. The default inter-arrival is constant at 1/30 s; pass any other RandomVariableStream (e.g. ExponentialRandomVariable) for stochastic arrivals.

Example usage (helper convenience):

OffloadClientHelper helper(orchAddress);
helper.SetTaskRate(30.0);
helper.SetMeanInputSize(60000);
helper.SetComputeDemand(5e9);
helper.Install(node);

Public Types

typedef void (*TaskSentTracedCallback)(Ptr<const Task> task)

TracedCallback signature for task sent events.

Param task:

The task that was submitted for admission.

typedef void (*TaskProcessedTracedCallback)(Ptr<const Task> task, Time latency)

TracedCallback signature for task processed events.

Param task:

The completed task.

Param latency:

End-to-end latency from submission to response.

typedef void (*TaskRejectedTracedCallback)(Ptr<const Task> task)

TracedCallback signature for task rejected events.

Param task:

The rejected task.

typedef void (*TaskViolatedTracedCallback)(Ptr<const Task> task, Time latency)

TracedCallback signature for task deadline violation events.

Param task:

The completed task whose latency exceeded the deadline budget.

Param latency:

End-to-end latency from submission to response.

typedef void (*TaskDroppedTracedCallback)(uint64_t taskIndex)

TracedCallback signature for task dropped events.

Param taskIndex:

The sequence number of the dropped task.

Public Functions

void SetRemote(const Address &addr)

Set the remote orchestrator address.

Parameters:

addrOrchestrator address (InetSocketAddress or Inet6SocketAddress).

Address GetRemote() const

Get the remote orchestrator address.

Returns:

The orchestrator address.

uint64_t GetTasksSent() const

Get the number of tasks sent.

Returns:

Number of tasks submitted for admission.

uint64_t GetTasksDropped() const

Get the number of tasks dropped.

Returns:

Number of tasks dropped because a prior task was still pending.

uint64_t GetResponsesReceived() const

Get the number of responses received.

Returns:

Number of processed task results received.

uint64_t GetTotalTx() const

Get the total bytes transmitted.

Returns:

Total bytes sent.

uint64_t GetTotalRx() const

Get the total bytes received.

Returns:

Total bytes received.

int64_t AssignStreams(int64_t stream) override

Assign a fixed random variable stream number to the random variables used by this application.

Parameters:

stream – First stream index to use.

Returns:

The number of stream indices assigned.

Public Static Functions

static TypeId GetTypeId()

Get the type ID.

Returns:

The object TypeId.

BackendServer

class BackendServer : public Application

Backend server that processes tasks on an accelerator.

BackendServer receives tasks from an Orchestrator, submits them to the Accelerator aggregated on the node, and sends processing results back when tasks complete.

Example usage:

Ptr<BackendServer> server = CreateObject<BackendServer>();
server->SetAttribute("Port", UintegerValue(9000));
serverNode->AddApplication(server);
// Requires a GpuAccelerator aggregated on serverNode

Public Types

typedef void (*TaskReceivedTracedCallback)(Ptr<const Task> task)

TracedCallback signature for task received events.

Param task:

The task that was received.

typedef void (*TaskProcessedTracedCallback)(Ptr<const Task> task, Time duration)

TracedCallback signature for task processed events.

Param task:

The completed task.

Param duration:

The processing duration on the accelerator.

Public Functions

uint64_t GetTasksReceived() const

Get the number of tasks received.

Returns:

Number of tasks received.

uint64_t GetTasksProcessed() const

Get the number of tasks processed.

Returns:

Number of tasks completed and response sent.

uint64_t GetTotalRx() const

Get the total bytes received.

Returns:

Total bytes received.

uint16_t GetPort() const

Get the port number.

Returns:

The listening port.

Public Static Functions

static TypeId GetTypeId()

Get the type ID.

Returns:

The object TypeId.