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

iFogSim: Case Study 2

1b0af2793f33bc86768fe97a9443c176?s=47 stwn
December 29, 2021

iFogSim: Case Study 2

1b0af2793f33bc86768fe97a9443c176?s=128

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 2 Intelligent Surveillance
  2. Cloud Computing Tutorials, Fall 2021, CSIE NTUST 2 Iwan Setiawan

    <stwn at unsoed.ac.id> Objectives • Learn case study 2, intelligent surveillance • Learn the application model, architecture, and scenarios of case study 2 • Learn how to simulate case study 2 * 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> Surveillance: Challenges • Distributed cameras surveilling an area – Public safety and security, manufacturing, transportation, health care • Manual monitoring of video streams is not practical • Automatic analysis of data coming from cameras Zao et al., 2014
  4. Cloud Computing Tutorials, Fall 2021, CSIE NTUST 4 Iwan Setiawan

    <stwn at unsoed.ac.id> Surveillance: Requirements • Low-latency communication – Real-time tuning of pan-tilt-zoom (PTZ) parameters for multiple cameras (coverage) – Communications between cameras and the set of camera control strategies • Handling big volume of data – Continuous transmission of captured video frames for processing – Causing huge traffic, consider all cameras in the system – Network load and congestion • Heavy long-term processing – Camera control needs to be updated constantly: learning optimal PTZ param. calculation – Requires analysis of the decisions taken by the control strategy over a long period of time Distributed approach is desirable
  5. Cloud Computing Tutorials, Fall 2021, CSIE NTUST 5 Iwan Setiawan

    <stwn at unsoed.ac.id> Intelligent Surveillance • Coordinating multiple cameras, each has different field of view (FOV) to surveil an area • Coordinated tuning of PTZ parameters for the best view of the area • Alerting in the case of unusual events
  6. Cloud Computing Tutorials, Fall 2021, CSIE NTUST 6 Iwan Setiawan

    <stwn at unsoed.ac.id> Events of interests Smart Camera • Detects motion in its FOV and starts sending a video stream to the Intelligent Surveillance app. • The application locates the moving object in the video stream and initiates tracking • Constantly tunes the PTZ parameters of the cameras to get the best view of all tracked objects
  7. Cloud Computing Tutorials, Fall 2021, CSIE NTUST 7 Iwan Setiawan

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

    <stwn at unsoed.ac.id> Application Model Gupta et al., 2017 1 2 3 AppLoop 4 Sensor Actuator AppModule AppModule AppModule AppModule AppEdge AppEdge AppEdge AppEdge AppEdge
  10. Cloud Computing Tutorials, Fall 2021, CSIE NTUST 10 Iwan Setiawan

    <stwn at unsoed.ac.id> Application Model Gupta et al., 2017 1 2 3 AppLoop 4 AppModule AppModule AppModule
  11. Cloud Computing Tutorials, Fall 2021, CSIE NTUST 11 Iwan Setiawan

    <stwn at unsoed.ac.id> Modules (1) • Motion detector: detects motion of an object – Continously reads raw video streams – Embedded inside smart cameras – Forwards video stream to object detector, if an event detected • Object detector: extracts the moving object – Receives video streams from motion detector in smart cameras – Compares with previously discovered objects in the area – Tracking is activated for new object. Calculates the coordinates
  12. Cloud Computing Tutorials, Fall 2021, CSIE NTUST 12 Iwan Setiawan

    <stwn at unsoed.ac.id> Modules (2) • Object tracker: receives the last calculated coordinates – Calculates optimal PTZ config. of all cameras covering the area – The PTZ info. is sent to the PTZ control of cameras periodically • User interface: presents a user interface – Sends a part of the video streams to the user's device – Requires filtered video streams from the object detector tracked objects * PTZ control: Adjusts smart camera to adapt to the optimal PTZ parameters sent by the object tracker
  13. Cloud Computing Tutorials, Fall 2021, CSIE NTUST 13 Iwan Setiawan

    <stwn at unsoed.ac.id> Physical Network • Four (4) fog devices. Classes: – FogDevice, Sensor, PhysicalTopology, Actuator
  14. Cloud Computing Tutorials, Fall 2021, CSIE NTUST 14 Iwan Setiawan

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

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

    <stwn at unsoed.ac.id> Simulation Variables […] public class DCNSFog { static List<FogDevice> fogDevices = new ArrayList<FogDevice>(); static List<Sensor> sensors = new ArrayList<Sensor>(); static List<Actuator> actuators = new ArrayList<Actuator>(); static int numOfAreas = 1; static int numOfCamerasPerArea = 4; private static boolean CLOUD = false; [...] * See DCNSFog.java in org.fog.test.perfeval
  18. Cloud Computing Tutorials, Fall 2021, CSIE NTUST 18 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(“object_detector”, 10); application.addAppModule(“motion_detector”, 10); application.addAppModule(“object_tracker”, 10); application.addAppModule(“user_interface”, 10); […] * See DCNSFog.java in org.fog.test.perfeval
  19. Cloud Computing Tutorials, Fall 2021, CSIE NTUST 19 Iwan Setiawan

    <stwn at unsoed.ac.id> Evaluation • Comparing two placement strategies: latency, network usage, energy consumption • Each image sensor or “camera” is embedded in a smart camera • Smart cameras gain access to Internet via area gateways connected to ISP gateway • Constant number of smart cameras (4), and varying the number of area gateways – Config 1: 1 area gateway – Config 2: 2 area gateways – Config 3: 4 area gateways – Config 4: 8 area gateways – Config 5: 16 area gateways Gupta et al., 2017 * Simulation period: 1000 seconds
  20. Cloud Computing Tutorials, Fall 2021, CSIE NTUST 20 Iwan Setiawan

    <stwn at unsoed.ac.id> Config 2 2 ms 2 ms 100 ms 2 ms 2 ms 2 ms 2 ms ISP gateway Smart cameras Area gateways
  21. Cloud Computing Tutorials, Fall 2021, CSIE NTUST 21 Iwan Setiawan

    <stwn at unsoed.ac.id> Average Latency • Cloud-only – Placing application modules in the cloud DC – Increasing latency in processing • Edge-ward – Maintaining low latency – Placing modules on fog nodes near the edge Average latency of control loop
  22. Cloud Computing Tutorials, Fall 2021, CSIE NTUST 22 Iwan Setiawan

    <stwn at unsoed.ac.id> Average Latency Gupta et al., 2017
  23. Cloud Computing Tutorials, Fall 2021, CSIE NTUST 23 Iwan Setiawan

    <stwn at unsoed.ac.id> Network Usage • Cloud-only – Network load increases as the number of devices connected to the application • Edge-ward – Object detector and tracker are placed on fog – Communications use low-latency links – Reducing data volume sent to the cloud
  24. Cloud Computing Tutorials, Fall 2021, CSIE NTUST 24 Iwan Setiawan

    <stwn at unsoed.ac.id> Network Usage Gupta et al., 2017
  25. Cloud Computing Tutorials, Fall 2021, CSIE NTUST 25 Iwan Setiawan

    <stwn at unsoed.ac.id> Energy Consumption • Energy consumed by different classes of devices • Smart cameras have high energy consumption due to motion detection module • Using fog devices reduces energy consumption in the cloud DC
  26. Cloud Computing Tutorials, Fall 2021, CSIE NTUST 26 Iwan Setiawan

    <stwn at unsoed.ac.id> Energy Consumption 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.