# Fog over Virtualized IoT: New Opportunity for Context-Aware Networked Applications and a Case Study

^{1}

^{2}

^{3}

^{4}

^{5}

^{*}

## Abstract

**:**

## 1. Introduction

#### The Main Contribution of the Paper

- (i)
- To the best of our knowledge, there is no related work that considers FDC across VFC and presents resource allocation and scheduling for the considered real traffic. This is the first work to dynamically schedule incoming traffic into the FNs. Besides, this is the first work to study the impact of a data stream on network resource allocation.
- (ii)
- A distributed Fog-based VFC architecture is presented that, over moderate-bandwidth, provides high availability operations to mobile users.
- (iii)
- A case study is defined—“StreamVehicularFog” (SVF)—which is an Internet-assisted peer-to-peer (P2P) service architecture, and the stream of data passed/processed over the underutilized networking/computing servers in FDC is evaluated.
- (iv)
- The simulation results show a significant reduction in the total energy consumption over FDC with various forms of communication links using real datasets.

## 2. Related Work

## 3. FDC over VFC Paradigm

## 4. A Case Study: StreamVehicularFog

#### 4.1. StreamVehicularFog Virtualized TCP/IP Communication Model

#### 4.2. StreamVehicularFog Computing Model

- ${\mathcal{S}}_{T}\stackrel{\u25b5}{=}$ total number of physical servers with ${\mathcal{S}}_{T}\ge 1$;
- ${\mathcal{VM}}_{max}\left(s\right)\stackrel{\u25b5}{=}$ maximum number of VMs (possibly, heterogeneous) hosted by the s-th physical server with ${\mathcal{VM}}_{max}\left(s\right)\ge 1,\phantom{\rule{3.33333pt}{0ex}}s=1,\cdots ,{\mathcal{S}}_{T}$;
- $\mathcal{VM}(s;v)\stackrel{\u25b5}{=}$ v-th VM hosted by the s-th server, $1\le v\le {\mathcal{VM}}_{max}\left(s\right),\phantom{\rule{3.33333pt}{0ex}}1\le s\le {\mathcal{S}}_{T}$;
- ${\mathcal{M}}_{sv}\stackrel{\u25b5}{=}$ total number of VMs in the data center that is calculated as: $\sum _{s=1}^{{\mathcal{S}}_{T}}}{\mathcal{VM}}_{max}\left(s\right)$ ≡ ${\mathcal{S}}_{T}\times {\mathcal{VM}}_{max}$. Formally, ${\mathcal{M}}_{sv}$ is the set of available VMs which may be hosted by the FDC.

- $\mathcal{M}\left(t\right)\stackrel{\u25b5}{=}$ set of the VMs which are turned ON at $\left(t\right)$ time slot $\left(t\right)\subseteq \{(s;v);\phantom{\rule{3.33333pt}{0ex}}1\le s\le {\mathcal{S}}_{T};\phantom{\rule{3.33333pt}{0ex}}1\le v\le {\mathcal{VM}}_{max}\left(s\right)\}$
- $\overline{\mathcal{M}}\left(t\right)\stackrel{\u25b5}{=}$ set of the VMs which are turned OFF at $\left(t\right)\subseteq \{(s;v);\phantom{\rule{3.33333pt}{0ex}}1\le s\le {\mathcal{S}}_{T};\phantom{\rule{3.33333pt}{0ex}}1\le v\le {\mathcal{VM}}_{max}\left(s\right)\}$

- $\overline{\mathcal{M}}\left(t\right)\equiv \{(s;v);\phantom{\rule{3.33333pt}{0ex}}1\le s\le {\mathcal{S}}_{T};\phantom{\rule{3.33333pt}{0ex}}1\le v\le {\mathcal{VM}}_{max}\left(s\right)\}/\mathcal{M}\left(t\right)$ ;
- ${f}_{s,v}\left(t\right)\stackrel{\u25b5}{=}$ processing rate of VM(s;v) at $t\in [0,\phantom{\rule{3.33333pt}{0ex}}{f}_{s,v}^{max}](IU/s),\phantom{\rule{3.33333pt}{0ex}}1\le s\le {\mathcal{S}}_{T},\phantom{\rule{3.33333pt}{0ex}}1\le v\le {\mathcal{VM}}_{max}\left(s\right)$;
- ${\mathcal{L}}_{s,v}\left(t\right)\stackrel{\u25b5}{=}$ workload processed by VM(s;v) at $t\in [0,\phantom{\rule{3.33333pt}{0ex}}{\mathcal{L}}_{s,v}^{max}]\left(IU\right),\phantom{\rule{3.33333pt}{0ex}}1\le s\le {\mathcal{S}}_{T},\phantom{\rule{3.33333pt}{0ex}}1\le v\le {\mathcal{VM}}_{max}\left(s\right)$;
- ${f}_{s,v}\stackrel{\u25b5}{=}$ maximum processing rate of VM(s;v), $(IU/s),\phantom{\rule{3.33333pt}{0ex}}1\le s\le {\mathcal{S}}_{T},\phantom{\rule{3.33333pt}{0ex}}1\le v\le {\mathcal{VM}}_{max}\left(s\right)$;
- ${\mathcal{L}}_{s,v}^{max}\stackrel{\u25b5}{=}{t}_{slot}{f}_{s,v}^{max}\stackrel{\u25b5}{=}$ maximum workload processed by VM(s;v) during each time slot (t); in $\left(IU\right),\phantom{\rule{3.33333pt}{0ex}}1\le s\le {\mathcal{S}}_{T},\phantom{\rule{3.33333pt}{0ex}}1\le v\le {\mathcal{VM}}_{max}\left(s\right)$;${\mathcal{L}}_{s,v}^{max}\le {t}_{slot}{f}_{s,v}^{max}$ .

- turn ON some physical servers which were turned OFF at slot t;
- turn OFF some physical servers which were turned ON at slot t;
- turn ON or turn OFF some VMs hosted by servers which were turned ON at slot $(t-1)$ and are still turned ON at slot t;
- scaling up/down the processing rates and workloads of some VMs which are turned ON at slot t.

#### 4.3. Energy Models

- Fast Ethernet: $1.1\times {10}^{-3}$ ≤ ${\mathsf{\Omega}}_{s,v}^{c}$ ≤ $1.8\times {10}^{-3}$, ${R}_{max}$ = 100
- Giga Ethernet: $1.8\times {10}^{-3}$ ≤ ${\mathsf{\Omega}}_{s,v}^{c}$ ≤ $2.5\times {10}^{-2}$, ${R}_{max}$ = 1000.

Algorithm 1 Pseudo-code Heuristic Solution. | |

INPUT: ${\mathcal{S}}_{T}$, $\widehat{\mathcal{S}}$, ${\mathcal{M}}_{sv}$, ${\mathcal{L}}_{T}$, ${f}_{s,v}^{max}$, ${\mathcal{E}}_{c,v}^{idle}$, ${\mathcal{E}}_{max}$, $\mathcal{T}$ | |

OUTPUT: ${\mathcal{E}}_{T}$, $\widehat{\mathcal{S}}\left(t\right)$, $\mathcal{M}\left(t\right)$ | |

1: for $t\ge 1$ do $t\in T$ | |

2: Check feasibility of $input$ | |

3: for $it=1:{\mathcal{M}}_{sv}$ do | |

4: if $\mathcal{L}\left(t\right)\le {f}_{s,v}^{max}\phantom{\rule{0.222222em}{0ex}}{t}_{slot}$ then | |

5: ${f}_{s,v}\left(t\right)=\mathcal{L}\left(t\right)/{t}_{slot}$; | |

6: | ▹ Update set of servers $\widehat{\mathcal{S}}\left(t\right)$ with 0 penalty; |

7: Find the minimum ${\mathcal{E}}_{c,v}^{idle}\left(t\right)$ in $\widehat{\mathcal{S}}\left(t\right)$; | |

8: if $\left(flag\right(t)==1)$ then | |

9: | ▹ decrease the penalty (-1) in all the servers with $penalty\ge 1$; |

10: end if | |

11: | ▹ add new VM into the $\widehat{\mathcal{S}}\left(t\right)$; |

12: end if | |

13: end for | |

Update $\widehat{\mathcal{S}}\left(t\right)$ and $\mathcal{M}\left(t\right)$ through $\mathcal{VM}(s;v)$; | |

Calculate $\mathcal{E}\left(t\right)$ as in (1); | |

14: end for | |

15: return ${\mathcal{E}}_{T}$, $\widehat{\mathcal{S}}\left(t\right)$, $\mathcal{M}\left(t\right)$ |

## 5. Performance Evaluation

#### 5.1. Test Scenario

#### 5.2. Test Result

## 6. Conclusions and Future Developments

## Acknowledgments

## Author Contributions

## Conflicts of Interest

## References

- Karagiannis, G.; Altintas, O.; Ekici, E.; Heijenk, G.; Jarupan, B.; Lin, K.; Weil, T. Vehicular networking: A survey and tutorial on requirements, architectures, challenges, standards and solutions. IEEE Commun. Surv. Tutor.
**2011**, 13, 584–616. [Google Scholar] [CrossRef] - Naranjo, P.G.V.; Pooranian, Z.; Shojafar, M.; Conti, M.; Buyya, R. FOCAN: A Fog-supported Smart City Network Architecture for Management of Applications in the Internet of Everything Environments. arXiv, 2017; arXiv:1710.01801. [Google Scholar]
- Bonomi, F.; Milito, R.; Zhu, J.; Addepalli, S. Fog computing and its role in the internet of things. In Proceedings of the First Edition of the MCC Workshop on Mobile Cloud Computing, Helsinki, Finland, 17 August 2012; pp. 13–16. [Google Scholar]
- Mahmud, R.; Kotagiri, R.; Buyya, R. Fog computing: A taxonomy, survey and future directions. In Internet of Everything; Springer: Berlin, Germany, 2018; pp. 103–130. [Google Scholar]
- Tajiki, M.M.; Salsano, S.; Shojafar, M.; Chiaraviglio, L.; Akbari, B. Joint Energy Efficient and QoS-aware Path Allocation and VNF Placement for Service Function Chaining. arXiv, 2017; arXiv:1710.02611. [Google Scholar]
- Shojafar, M.; Cordeschi, N.; Baccarelli, E. Energy-efficient adaptive resource management for real-time vehicular cloud services. IEEE Trans. Cloud Comput.
**2016**, 1–14. [Google Scholar] [CrossRef] - Büsching, F.; Schildt, S.; Wolf, L. DroidCluster: Towards Smartphone Cluster Computing—The Streets are Paved with Potential Computer Clusters. In Proceedings of the 2012 32nd International Conference on Distributed Computing Systems Workshops, Macau, China, 18–21 June 2012; pp. 114–117. [Google Scholar]
- D’Andreagiovanni, F.; Mett, F.; Nardin, A.; Pulaj, J. Integrating LP-guided variable fixing with MIP heuristics in the robust design of hybrid wired-wireless FTTx access networks. Appl. Soft Comput.
**2017**, 61, 1074–1087. [Google Scholar] [CrossRef] - Wirtz, T.; Ge, R. Improving mapreduce energy efficiency for computation intensive workloads. In Proceedings of the 2011 International Green Computing Conference and Workshops (IGCC), Orlando, FL, USA, 25–28 July 2011; pp. 1–8. [Google Scholar]
- Pooranian, Z.; Shojafar, M.; Naranjo, P.G.V.; Chiaraviglio, L.; Conti, M. A Novel Distributed Fog-Based Networked Architecture to Preserve Energy in Fog Data Centers. In Proceedings of the 2017 IEEE 14th International Conference on Mobile Ad Hoc and Sensor Systems (MASS), Orlando, FL, USA, 22–25 October 2017; pp. 604–609. [Google Scholar]
- Dabbagh, M.; Hamdaoui, B.; Guizani, M.; Rayes, A. An energy-efficient VM prediction and migration framework for overcommitted clouds. IEEE Trans. Cloud Comput.
**2016**. [Google Scholar] [CrossRef] - Aazam, M.; Huh, E.N. Fog computing and smart gateway based communication for cloud of things. In Proceedings of the 2014 International Conference on Future Internet of Things and Cloud (FiCloud), Barcelona, Spain, 27–29 August 2014; pp. 464–470. [Google Scholar]
- Neumeyer, L.; Robbins, B.; Nair, A.; Kesari, A. S4: Distributed stream computing platform. In Proceedings of the 2010 IEEE International Conference on Data Mining Workshops (ICDMW), Sydney, Australia, 13 December 2010; pp. 170–177. [Google Scholar]
- Zaharia, M.; Das, T.; Li, H.; Shenker, S.; Stoica, I. Discretized Streams: An Efficient and Fault-Tolerant Model for Stream Processing on Large Clusters. HotCloud
**2012**, 12, 10. [Google Scholar] - Qian, Z.; He, Y.; Su, C.; Wu, Z.; Zhu, H.; Zhang, T.; Zhou, L.; Yu, Y.; Zhang, Z. Timestream: Reliable stream computation in the cloud. In Proceedings of the 8th ACM European Conference on Computer Systems, Prague, Czech Republic, 15–17 April 2013; pp. 1–14. [Google Scholar]
- Kumbhare, A.G.; Simmhan, Y.; Prasanna, V.K. Plasticc: Predictive look-ahead scheduling for continuous dataflows on clouds. In Proceedings of the 2014 14th IEEE/ACM International Symposium on Cluster, Cloud and Grid Computing (CCGrid), Chicago, IL, USA, 26–29 May 2014; pp. 344–353. [Google Scholar]
- Tang, B.; Chen, Z.; Hefferman, G.; Wei, T.; He, H.; Yang, Q. A hierarchical distributed fog computing architecture for big data analysis in smart cities. In Proceedings of the ASE BigData & SocialInformatics, Kaohsiung, Taiwan, 7–9 October 2015; p. 28. [Google Scholar]
- Skala, K.; Davidovic, D.; Afgan, E.; Sovic, I.; Sojat, Z. Scalable distributed computing hierarchy: Cloud, fog and dew computing. Open J. Cloud Comput.
**2015**, 2, 16–24. [Google Scholar] - Cao, Y.; Chen, S.; Hou, P.; Brown, D. FAST: A fog computing assisted distributed analytics system to monitor fall for stroke mitigation. In Proceedings of the 2015 IEEE International Conference on Networking, Architecture and Storage (NAS), Boston, MA, USA, 6–7 August 2015. [Google Scholar]
- Kim, K.H.; Buyya, R.; Kim, J. Power Aware Scheduling of Bag-of-Tasks Applications with Deadline Constraints on DVS-enabled Clusters. CCGrid
**2007**, 7, 541–548. [Google Scholar] - Bitam, S.; Mellouk, A.; Zeadally, S. VANET-cloud: A generic cloud computing model for vehicular Ad Hoc networks. IEEE Wirel. Commun.
**2015**, 22, 96–102. [Google Scholar] [CrossRef] - Mtibaa, A.; Fahim, A.; Harras, K.A.; Ammar, M.H. Towards resource sharing in mobile device clouds: Power balancing across mobile devices. ACM SIGCOMM Comput. Commun. Rev.
**2013**, 43, 51–56. [Google Scholar] [CrossRef] - Chen, M.; Zhang, Y.; Li, Y.; Mao, S.; Leung, V.C. EMC: Emotion-aware mobile cloud computing in 5G. IEEE Netw.
**2015**, 29, 32–38. [Google Scholar] [CrossRef] - Vaquero, L.M.; Rodero-Merino, L. Finding your way in the fog: Towards a comprehensive definition of fog computing. ACM SIGCOMM Comput. Commun. Rev.
**2014**, 44, 27–32. [Google Scholar] [CrossRef] - Barbera, M.V.; Kosta, S.; Mei, A.; Perta, V.C.; Stefa, J. Mobile offloading in the wild: Findings and lessons learned through a real-life experiment with a new cloud-aware system. In Proceedings of the IEEE INFOCOM 2014-IEEE Conference on Computer Communications, Toronto, ON, Canada, 27 April–2 May 2014; pp. 2355–2363. [Google Scholar]
- Urgaonkar, B.; Pacifici, G.; Shenoy, P.; Spreitzer, M.; Tantawi, A. Analytic modeling of multitier internet applications. ACM Trans. Web
**2007**, 1. [Google Scholar] [CrossRef]

**Figure 1.**The overall VFC architecture. CDC: Cloud-Data-Center with the main areas; FN: Fog-Node; RSU: Road-Side-Unit; Fl: Foglet; FDC: Fog-Data-Center.

**Figure 2.**Trace sample of I/O arrival data from an enterprise cluster in WorldCup98 Workload [1:1000] [26]. The corresponding average arrival rate and PMR (Peak Mean Rate) are 1.56 and 19.65, respectively.

**Figure 4.**Energy saving of SVF (dashed plot) and energy consumption of SVF (continuous plot) for the Fast Ethernet LAN for $T=100$.

**Figure 6.**(

**a**) Behavior time in relation to the number of turned ON VMs and physical servers, and (

**b**) the average total energy in $T=1000$, respectively.

FC | FDC | ←FN | ←RSU | ←Vehicles |
---|---|---|---|---|

Access Medium | Fix Wireless | Fix Wireless | Wireless | Wireless |

Technologies | WiFi/3G/4G-LTE | |||

Mobility | No | No | No | Yes |

Proximity | Round | Near | Near | Nearly |

Connectivity | Multi Hops | Multi Hops | Single Hop | Single Hop |

Geographic Distribution | Low | Medium | High | Very High |

Heterogeneity | No | Yes | Yes | Yes |

Architecture | Centralized | Distributed | Distributed | Mobile |

Bandwidth | High | High | High | Low |

Latency | Low | Low | Low | Low |

Delay Jitter | Low | Very Low | Very Low | Low |

Network Area | Core | Edge | Field | Edge |

QoS | Improve | High | High | High |

© 2017 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Naranjo, P.G.V.; Pooranian, Z.; Shamshirband, S.; Abawajy, J.H.; Conti, M.
Fog over Virtualized IoT: New Opportunity for Context-Aware Networked Applications and a Case Study. *Appl. Sci.* **2017**, *7*, 1325.
https://doi.org/10.3390/app7121325

**AMA Style**

Naranjo PGV, Pooranian Z, Shamshirband S, Abawajy JH, Conti M.
Fog over Virtualized IoT: New Opportunity for Context-Aware Networked Applications and a Case Study. *Applied Sciences*. 2017; 7(12):1325.
https://doi.org/10.3390/app7121325

**Chicago/Turabian Style**

Naranjo, Paola G. V., Zahra Pooranian, Shahaboddin Shamshirband, Jemal H. Abawajy, and Mauro Conti.
2017. "Fog over Virtualized IoT: New Opportunity for Context-Aware Networked Applications and a Case Study" *Applied Sciences* 7, no. 12: 1325.
https://doi.org/10.3390/app7121325