**2.3 EEG-based VR gaming applications**

SDN-based Optical-Fog network introduced as shown in **Figure 3** provides optimum bandwidth and ultralow delay for EEG-based VR gaming applications. The Edge-Fog layer and Optical-Fog layer provide rich gaming experience and QoE for EEG-based VR gaming applications by utilizing the optical resources than the cloud resources [13]. The Optical-Fog layer executes the game logic where the VR scenes can be encoded and streamed at the Edge-Fog layer. SDN-based controller improves the QoE and supports the playing of a game across the distributed geo-locations with minimum delay. It optimizes the flow distribution among the various redundant paths inside the Optical-Fog network to reduce the delay. In contrast to a traditional controller, the proposed SDN controller provides the shortest path with the least congestion among all possible paths

**177**

**Figure 7.**

*Workflow to find the shortest path.*

*Role of Optical Network in Cloud/Fog Computing DOI: http://dx.doi.org/10.5772/intechopen.84404*

Θ*<sup>n</sup>*

*c*

*c*

*2.3.1 Net destination queue waiting time*

Ω*<sup>n</sup>*

mation cost *Cn*

*Measure* Θ*<sup>n</sup>*

*c*

The value of Θ*<sup>n</sup>*

time increment, and *Qn*

delivery cost [13].

*c*

from the requesting Core Fog nodes to the Top of Rack (TOR) Fog nodes in the optical network which is shown in **Figure 6**. It uses an open-loop congestion control mechanism to employ congestion aware direct routing. Each node of the SDN network keeps the esti-

the shortest path with least congestion by using the historical knowledge of the connection to node *c* and the waiting time of packets to *c* in the node *n's* queue. It is assumed that all nodes broadcast a request for the cost frequently to their neighbors. Also, all neighbor nodes keep updating their cost table on the basis of the received request for the cost. To find the shortest path with the least congestion, the node with minimum delivery cost is selected as shown in **Figure 7**. The convoluted parameters are referred to as *Proximity* 

(*t*) and *Net Destination Queue Waiting Time* Ω*<sup>n</sup>*

*c* (*t*) <sup>=</sup> *Qn c* (*t*) \_\_\_\_\_ *Tn c*

between *n* and *c*, whereas 0 shows that they were never connected. Here, *Tn*

*c* (*t*) = ∑ *i*=0 *N*

(*t*) for delivering packets to their destination node *c* [14]. It helps to find

(*t*) lies between 0 and 1. The value 1 indicates the connection

(τ − *an*,*<sup>i</sup>*

(*t*) is the time duration while *c* and *n* remains connected.

*c*

(*t*) are used to compute the

*c*

(*t*) is the

(*t*) (1)

*<sup>c</sup>* ) (2)

**Figure 6.** *SDN-based Optical-Fog network.*

*Role of Optical Network in Cloud/Fog Computing DOI: http://dx.doi.org/10.5772/intechopen.84404*

*Telecommunication Systems – Principles and Applications of Wireless-Optical Technologies*

Hence, all FARs of optical network are grouped together to form virtual data centers with computing resources such as processor, memory, and bandwidth. ONV converts the physical resources of optical network elements into the virtual resources as infrastructure-as-a-service (IaaS) model to build virtual honeypots

SDN-based Optical-Fog network introduced as shown in **Figure 3** provides optimum bandwidth and ultralow delay for EEG-based VR gaming applications. The Edge-Fog layer and Optical-Fog layer provide rich gaming experience and QoE for EEG-based VR gaming applications by utilizing the optical resources than the cloud resources [13]. The Optical-Fog layer executes the game logic where the VR scenes can be encoded and streamed at the Edge-Fog layer. SDN-based controller improves the QoE and supports the playing of a game across the distributed geo-locations with minimum delay. It optimizes the flow distribution among the various redundant paths inside the Optical-Fog network to reduce the delay. In contrast to a traditional controller, the proposed SDN controller provides the shortest path with the least congestion among all possible paths

that prevents vulnerability and its identity from the attacker.

**2.3 EEG-based VR gaming applications**

**Figure 5.**

*Free available resource.*

**176**

**Figure 6.**

*SDN-based Optical-Fog network.*

from the requesting Core Fog nodes to the Top of Rack (TOR) Fog nodes in the optical network which is shown in **Figure 6**. It uses an open-loop congestion control mechanism to employ congestion aware direct routing. Each node of the SDN network keeps the estimation cost *Cn c* (*t*) for delivering packets to their destination node *c* [14]. It helps to find the shortest path with least congestion by using the historical knowledge of the connection to node *c* and the waiting time of packets to *c* in the node *n's* queue. It is assumed that all nodes broadcast a request for the cost frequently to their neighbors. Also, all neighbor nodes keep updating their cost table on the basis of the received request for the cost. To find the shortest path with the least congestion, the node with minimum delivery cost is selected as shown in **Figure 7**. The convoluted parameters are referred to as *Proximity Measure* Θ*<sup>n</sup> c* (*t*) and *Net Destination Queue Waiting Time* Ω*<sup>n</sup> c* (*t*) are used to compute the delivery cost [13].

$$\Theta\_n^{\varepsilon}(t) = \frac{Q\_n^{\varepsilon}(t)}{T\_u^{\varepsilon}(t)}\tag{1}$$

*<sup>c</sup>* ) (2)

The value of Θ*<sup>n</sup> c* (*t*) lies between 0 and 1. The value 1 indicates the connection between *n* and *c*, whereas 0 shows that they were never connected. Here, *Tn c* (*t*) is the time increment, and *Qn c* (*t*) is the time duration while *c* and *n* remains connected.

*N*

(τ − *an*,*<sup>i</sup>*

*c* (*t*) = ∑

*2.3.1 Net destination queue waiting time*

Ω*<sup>n</sup>*

**Figure 7.** *Workflow to find the shortest path.*

Here, *τ* id the present time and *an*,*<sup>i</sup> <sup>c</sup>* is the arrival time of packets *i*. Since the queue waiting time is used to predict the congestion, delivery cost can be considered as an exponentially increasing function. Hence, the delivery cost to *c* via *n* is computed as:

$$\mathbf{C}\_{n}^{c}(t) = \mathbf{\color{red}{\mathbf{O}}}\_{n}^{c}(t) \left[\mathbf{1} - \mathbf{\color{red}{\Theta}}\_{n}^{c}(t)\right] + \mathbf{C}\_{n}^{c}(t-\mathbf{1})\tag{3}$$

Thus, the shortest path with least congestion is identified by pulling packets toward the neighbors that have the smallest queue. It helps the SDN controller to set the threshold value for decision making.

## *2.3.2 Modules placement strategy in the Optical-Fog network*

In order to deploy gaming modules, an algorithm is proposed that utilizes the Edge-Fog layer and Optical-Fog layer in the Optical-Fog network. The proposed algorithm places gaming modules using the SDN topology and iterates over all paths. Here, it places modules on the devices in incremental fashion starts from edge devices *dEdge* to the optical devices *dOptical* and to the cloud data-centers. The modules that can be placed for each fog device in the path ε*dEdge* ∪ *dOptical* are identified by computing the processing requirement against the available capacity of fog devices.

A module *M* is placed on a fog device *dEdge* or *dOptical* only if all other modules are already placed in the bottom-up path.

**179**

*Role of Optical Network in Cloud/Fog Computing DOI: http://dx.doi.org/10.5772/intechopen.84404*

adding three basic components shown as:

**3.2 Energy consumption analysis**

The real-time gaming applications and CPS systems require ultralow latency, minimum energy consumption, and optimum bandwidth. The proposed Optical-Fog layer provides the desired QoE by evaluating the following parameters such as latency measure, energy consumption and bandwidth usage in contrast to the

The proposed system utilizes the Optical-Fog layer that reduces the delay and improves QoE. The latency measured in the context of delay is the most concerning issue. The communication between ONU and OLT is supported by the multi-point control protocol (MPCP) which is a frame-based protocol [15]. Here, only GATE and REPORT messages are exchanged between OLT and ONU. So, in the Optical-Fog network, the delay is measured as the time between the arrival of its last bit at ONU and the arrival of its last bit at OLT. The delay *tD*(*fi*) is the computation of

*tD*( *fi*) = Γ*<sup>i</sup>* + *tp* + *TR* (4)

For computing energy consumption, only the edge devices of the network is a concerning issue because energy consumption by the PON channel is negligible.

Δ*E* = *EEdge*<sup>−</sup>*Fog* + *EOptical*<sup>−</sup>*Fog* + *Ecloud* (5)

• *EEdge–Fog* = Σ(*EEdge–devices*) represents the energy consumed by all edge devices.

• *EOptical–Fog* = Σ(*EONU* + *EOLT* + *EPON*) represents the energy consumed by the opti-

The proposed framework computes most of the computations at the Optical-Fog layer which reduces the overhead on the cloud data centers. Thus, QoE is improved

Real-time applications require more bandwidth to process the extraordinarily huge volume of data. Thus, the traditional cloud system increases the overhead on communication bandwidth which results in increasing delay and poor QoE. To

Alternatively, it is the time during which the respective REPORT message reaches at the OLT completely, where Γ*i* represents the one-way propagation time of *ONUi*, *tp* represents the time between the request arriving at *ONUi* and the start of the next REPORT message, and *TR* represents the time duration of REPORT message [16]. Thus, the Optical-Fog layer processes more smart applications which

require ultralow delay as well as efficient QoS requirements.

• *Ecloud* is the energy consumption of cloud data centers.

Thus, the total energy consumption is computed as:

cal elements which is negligible.

by minimizing the overall energy consumption.

**3.3 Bandwidth measure**

**3. Performance analysis**

traditional cloud computing.

**3.1 Latency measure**
