Share
Embed
Transcript
27 slides
-
Cloud Computing Tutorials, Fall 2021, CSIE NTUST 1 Iwan Setiawan
<stwn at unsoed.ac.id> iFogSim: Case Study 1 A latency-sensitive online game -
Cloud Computing Tutorials, Fall 2021, CSIE NTUST 2 Iwan Setiawan
<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] -
Cloud Computing Tutorials, Fall 2021, CSIE NTUST 3 Iwan Setiawan
<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 -
Cloud Computing Tutorials, Fall 2021, CSIE NTUST 4 Iwan Setiawan
<stwn at unsoed.ac.id> EEG Tractor Beam * This is Your Brain(waves) on Technology Stuart, 2016 -
Cloud Computing Tutorials, Fall 2021, CSIE NTUST 5 Iwan Setiawan
<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 -
Cloud Computing Tutorials, Fall 2021, CSIE NTUST 6 Iwan Setiawan
<stwn at unsoed.ac.id> Application Model Bittencourt et al., 2017 1 2 3 -
Cloud Computing Tutorials, Fall 2021, CSIE NTUST 7 Iwan Setiawan
<stwn at unsoed.ac.id> Application Model Gupta et al., 2017 1 2 3 AppLoop Sensor Actuator AppModule AppModule AppModule -
Cloud Computing Tutorials, Fall 2021, CSIE NTUST 8 Iwan Setiawan
<stwn at unsoed.ac.id> Application Model Gupta et al., 2017 1 2 3 AppLoop Sensor Actuator AppModule AppModule AppModule AppEdge AppEdge AppEdge AppEdge AppEdge AppEdge AppEdge -
Cloud Computing Tutorials, Fall 2021, CSIE NTUST 9 Iwan Setiawan
<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 -
Cloud Computing Tutorials, Fall 2021, CSIE NTUST 10 Iwan Setiawan
<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 -
Cloud Computing Tutorials, Fall 2021, CSIE NTUST 11 Iwan Setiawan
<stwn at unsoed.ac.id> Tuples and Configurations Gupta et al., 2017 -
Cloud Computing Tutorials, Fall 2021, CSIE NTUST 12 Iwan Setiawan
<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 -
Cloud Computing Tutorials, Fall 2021, CSIE NTUST 13 Iwan Setiawan
<stwn at unsoed.ac.id> Gupta et al., 2017 -
Cloud Computing Tutorials, Fall 2021, CSIE NTUST 14 Iwan Setiawan
<stwn at unsoed.ac.id> Simulation Variables […] public class VRGameFog { static List<FogDevice> fogDevices = new ArrayList<FogDevice>(); static List<Sensor> sensors = new ArrayList<Sensor>(); static List<Actuator> actuators = new ArrayList<Actuator>(); static boolean CLOUD = false; static int numOfDepts = 2; static int numOfMobilesPerDept = 5; static double EEG_TRANSMISSION_TIME = 5; [...] * See VRGameFog.java in org.fog.test.perfeval -
Cloud Computing Tutorials, Fall 2021, CSIE NTUST 15 Iwan Setiawan
<stwn at unsoed.ac.id> Application Model: Implementation […] private static Application createApplication(String appId, int userId){ Application application = Application.createApplication(appId, userId); application.addAppModule(“client”, 10); application.addAppModule(“concentration_calculator”, 10); application.addAppModule(“connector”, 10); […] * See VRGameFog.java in org.fog.test.perfeval -
Cloud Computing Tutorials, Fall 2021, CSIE NTUST 16 Iwan Setiawan
<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 -
Cloud Computing Tutorials, Fall 2021, CSIE NTUST 17 Iwan Setiawan
<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 -
Cloud Computing Tutorials, Fall 2021, CSIE NTUST 18 Iwan Setiawan
<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 -
Cloud Computing Tutorials, Fall 2021, CSIE NTUST 19 Iwan Setiawan
<stwn at unsoed.ac.id> Average Latency Gupta et al., 2017 -
Cloud Computing Tutorials, Fall 2021, CSIE NTUST 20 Iwan Setiawan
<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 -
Cloud Computing Tutorials, Fall 2021, CSIE NTUST 21 Iwan Setiawan
<stwn at unsoed.ac.id> Network Usage Gupta et al., 2017 -
Cloud Computing Tutorials, Fall 2021, CSIE NTUST 22 Iwan Setiawan
<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 -
Cloud Computing Tutorials, Fall 2021, CSIE NTUST 23 Iwan Setiawan
<stwn at unsoed.ac.id> Energy Consumption Gupta et al., 2017 -
Cloud Computing Tutorials, Fall 2021, CSIE NTUST 24 Iwan Setiawan
<stwn at unsoed.ac.id> Scalability of iFogSim • Memory or RAM usage • Execution time -
Cloud Computing Tutorials, Fall 2021, CSIE NTUST 25 Iwan Setiawan
<stwn at unsoed.ac.id> RAM Consumption Gupta et al., 2017 -
Cloud Computing Tutorials, Fall 2021, CSIE NTUST 26 Iwan Setiawan
<stwn at unsoed.ac.id> Execution Time Gupta et al., 2017 -
Cloud Computing Tutorials, Fall 2021, CSIE NTUST 27 Iwan Setiawan
<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.