Table of Contents:
Introduction
This scenario shows how a mobile node passes on a task to a gateway, who will try to find a node in the network who should actually process the task.
- Upon receiving the task from the mobile node, the gateway broadcasts to the network requests for “Load Reports”.
- Fog servers and Cloud who receive the broadcast will respond with their CPU capabilities and current load
- After a fixed amount of time (20s) has passed, the gateway stops collecting Load Reports, and makes a decision based on the reports who to offload the task to
- The offloadee processes the task and finally sends the results as a message back to the original mobile node.
Processes
There are 4 process definitions:
-
Mobile Process Sends the offload request to a gateway and (Starting Process 2 “Gateway Process”) then waits for the offloaded work result to eventually be received. When starting the Gateway Process, it attaches some variables to it:
- resultsAddress - address of node who should receive the final processing result (this mobile node)
- noOfHops - a counter based on which the load reporting process propagation is limited (see 3rd process below)
-
Gateway Process Upon receiving it, the gateway sends out a start process message for Load Reports (see below) to each fog node it is connected to. Then, it waits for load report responses and handles them by adding them to a list, until a timer event expires. After the timer expires, the list of reports is used to decide which node to offload the work to, based on their work queue size.
-
Propagative Load Reporting Process
- This process is started by Gateway Process, it does 2 things in parallel:
- Generate a load report and send it to the Gateway
- For each fog node it is connected to (excluding starter of this process), start another Load Reporting process there. In other words, the load reporting is self-propagating. The propagation is limited by a counter “maxHops”, with a value of 3
- This process is started by Gateway Process, it does 2 things in parallel:
-
Worker Process this process performs the actual expensive computation and sends the results to the mobile node as a message.
Other notes
Some locations and movement in the settings file of this scenario are defined using .wkt map files.
The various Java task implementations are left to the reader to explore in the project source code.