<stwn at unsoed.ac.id> Objectives • Learn case study 1, a latency-sensitive online game • Learn the application model, architecture, and scenarios of case study 1 • Learn how to simulate case study 1 * The case study is based on Gupta et al. [1]
<stwn at unsoed.ac.id> EEG Tractor Beam • A human-vs-human game involving augmented brain- computer interaction • Each player needs to wear a wireless EEG headset connected to a smartphone • An Android application performs real-time processing of EEG signals, and calculating brain state of the user Zao et al., 2014
<stwn at unsoed.ac.id> The Game • All players are on a ring surrounding an object • Each player tries to pull the object towards him with force in proportion to his concentration • Real-time processing is needed on smartphone – The application is hosted close to the data source
<stwn at unsoed.ac.id> Modules • Client: interfacing with the sensor, receiving raw EEG signals – Checks received signal values for inconsistent reading – Sends the consistent value to the Concentration Calculator – After receiving the concentration level, transmits the value to Display • Concentration Calculator: calculating concentration level – Determines user’s brain-state from the sensed EEG signal values – Informs the Client module about the measured level • Coordinator: global coordination for the game (multiple players) – Continuously sends current game state to the Client module
<stwn at unsoed.ac.id> Physical Network • Four (4) fog devices. Classes: – FogDevice, Sensor, PhysicalTopology, Actuator • Two types of EEG headsets: sending tuples with different properties Gupta et al., 2017
<stwn at unsoed.ac.id> • Cloud-only – Traditional cloud-based implementation – All application modules run in DCs – Sensors transmit data to the cloud, actuators are informed if action is needed • Edge-ward – Deployment of application modules close to the edge of network – Starts from the lowest fog devices towards the cloud – Placing modules near the network edge and the cloud AppModule Placement Strategies Metrics: latency, network use, energy consumption Workloads Placement Strategies iFogSim Metrics
<stwn at unsoed.ac.id> Evaluation • Comparing two placement strategies: latency, network usage, energy consumption • Each headset is connected to a smartphone via Bluetooth communication link • Smartphones gain access to Internet via WiFi gateways connected to ISP gateway • Constant number of smartphones (4), and varying the number of WiFi gateways – Config 1: 1 WiFi gateway – Config 2: 2 WiFi gateways – Config 3: 4 WiFi gateways – Config 4: 8 WiFi gateways – Config 5: 16 WiFi gateways Gupta et al., 2017
<stwn at unsoed.ac.id> Config 2 2 ms 4 ms 100 ms 2 ms 2 ms 2 ms 6 ms 6 ms 6 ms 6 ms 6 ms 6 ms 6 ms 6 ms 4 ms ISP gateway WiFi gateways Smartphones Headset A or B Headset A or B Headset A or B Headset A or B
<stwn at unsoed.ac.id> Average Latency • Control loop: response latency – The loop transforms the user’s brain-state into game state on the smartphone’s display – Real-time communications between the smartphone and the fog device that hosts the brain-state classification module – Efficient processing on the classification module (concentration calc.) • Edge-ward: control loop execution latency decreases – Using fog devices for processing – Topology sizes and tuple emission rate Average latency of control loop
<stwn at unsoed.ac.id> Network Usage • Number of devices connected to the application significantly increases the network load, cloud-only resources used • When fog devices were used, the network usage decreased – Reduced network congestion – Improve application’s performance • Large amount of communications takes place between Client and Concentration Calculator modules – Edge-ward: the Concentration Calculator put on the gateways
<stwn at unsoed.ac.id> Energy Consumption • Energy consumed by different classes of devices • Using fog devices in edge-ward placement strategy reduces energy consumption of the cloud DC – Slightly increases energy consumption of edge devices – Energy consumed by edge devices is greater for headset B than headset A – Concentration Calculator modules hosted on fog nodes consume more energy consumption
<stwn at unsoed.ac.id> References [1] H. Gupta, A. Vahid Dastjerdi, S.K. Ghosh, and R. Buyya, “iFogSim: A toolkit for modeling and simulation of resource management techniques in the internet of things, edge and fog computing environments,” Software: Practice and Experience, vol. 47, no. 9, pp. 1275-1296, 2017.