Upgrade to Pro — share decks privately, control downloads, hide ads and more …

iFogSim: Case Study 1

stwn
December 29, 2021

iFogSim: Case Study 1

stwn

December 29, 2021
Tweet

More Decks by stwn

Other Decks in Technology

Transcript

  1. Cloud Computing Tutorials, Fall 2021, CSIE NTUST 1 Iwan Setiawan

    <stwn at unsoed.ac.id> iFogSim: Case Study 1 A latency-sensitive online game
  2. 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]
  3. 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
  4. 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
  5. 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
  6. Cloud Computing Tutorials, Fall 2021, CSIE NTUST 6 Iwan Setiawan

    <stwn at unsoed.ac.id> Application Model Bittencourt et al., 2017 1 2 3
  7. 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
  8. 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
  9. 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
  10. 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
  11. Cloud Computing Tutorials, Fall 2021, CSIE NTUST 11 Iwan Setiawan

    <stwn at unsoed.ac.id> Tuples and Configurations Gupta et al., 2017
  12. 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
  13. Cloud Computing Tutorials, Fall 2021, CSIE NTUST 13 Iwan Setiawan

    <stwn at unsoed.ac.id> Gupta et al., 2017
  14. 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
  15. 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
  16. 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
  17. 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
  18. 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
  19. Cloud Computing Tutorials, Fall 2021, CSIE NTUST 19 Iwan Setiawan

    <stwn at unsoed.ac.id> Average Latency Gupta et al., 2017
  20. 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
  21. Cloud Computing Tutorials, Fall 2021, CSIE NTUST 21 Iwan Setiawan

    <stwn at unsoed.ac.id> Network Usage Gupta et al., 2017
  22. 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
  23. Cloud Computing Tutorials, Fall 2021, CSIE NTUST 23 Iwan Setiawan

    <stwn at unsoed.ac.id> Energy Consumption Gupta et al., 2017
  24. Cloud Computing Tutorials, Fall 2021, CSIE NTUST 24 Iwan Setiawan

    <stwn at unsoed.ac.id> Scalability of iFogSim • Memory or RAM usage • Execution time
  25. Cloud Computing Tutorials, Fall 2021, CSIE NTUST 25 Iwan Setiawan

    <stwn at unsoed.ac.id> RAM Consumption Gupta et al., 2017
  26. Cloud Computing Tutorials, Fall 2021, CSIE NTUST 26 Iwan Setiawan

    <stwn at unsoed.ac.id> Execution Time Gupta et al., 2017
  27. 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.