Application

class application.Application

Bases: PowerAware

Application consisting of one or more tasks forming a directed acyclic graph (DAG).

add_task(task: Task, incoming_data_flows: Optional[List[Tuple[Task, float]]] = None)

Add a task to the application graph.

Parameters:
  • task – The task to add

  • incoming_data_flows – List of tuples (src_task, bit_rate) where every src_task is the source of a DataFlow with a certain bit_rate to the added task

data_flows(type_filter: Optional[Union[Type[TDataFlow], Tuple[Type[TDataFlow], ...]]] = None) List[TDataFlow]

Return all data flows in the application, optionally filtered by class.

deallocate()

Detach/Unmap/Release an application from the infrastructure it is currently placed on.

measure_power() PowerMeasurement

Returns the power that is currently used by the entity.

tasks(type_filter: Optional[Union[Type[TTask], Tuple[Type[TTask], ...]]] = None) List[TTask]

Return all tasks in the application, optionally filtered by class.

class application.DataFlow(bit_rate: float)

Bases: PowerAware

Data flow between two tasks of an application.

Parameters:

bit_rate – The bit rate of the data flow in bit/s

allocate(links: List[Link])

Place the data flow on a path of links and allocate bandwidth.

deallocate()

Remove the data flow from the infrastructure and deallocate bandwidth.

measure_power() PowerMeasurement

Returns the power that is currently used by the entity.

class application.ProcessingTask(cu: float = 0)

Bases: Task

Processing task of an application that can be freely placed on the infrastructure.

Processing tasks always have incoming and outgoing data flows.

Parameters:

cu – Million instructions per second required to execute the task.

class application.SinkTask(cu: float = 0, bound_node: Optional[Node] = None)

Bases: Task

Sink task of an application that is bound to a certain node, e.g. a cloud server for storage.

Parameters:
  • cu – Million instructions per second required to execute the task.

  • bound_node – The node which the task is bound to. Cannot be None.

class application.SourceTask(cu: float = 0, bound_node: Optional[Node] = None)

Bases: Task

Source task of an application that is bound to a certain node, e.g. a sensor generating data.

Source tasks never have incoming and always have outgoing data flows.

Parameters:
  • cu – Million instructions per second required to execute the task.

  • bound_node – The node which the task is bound to. Cannot be None.

class application.Task(cu: float)

Bases: PowerAware

Task that can be placed on a Node.

Tasks _can_ be connected via Link`s to build an :class:`Application.

Parameters:
  • cu – Amount of compute units (CU) required to execute the task. CUs a imaginary unit for computational power to express differences between hardware platforms.

  • task. (Million instructions per second required to execute the) –

allocate(node: Node)

Place the task on a certain node and allocate resources.

deallocate()

Detache the task from the node it is currently placed on and deallocate resources.

measure_power() PowerMeasurement

Returns the power that is currently used by the entity.