# QoS Aware and Fault Tolerance Based Software-Defined Vehicular Networks Using Cloud-Fog Computing
## 4 Proposed Solution
### Qaft-SDVN Proposed Model
Different messages are created and sent to fog nodes and then to the cloud, and their execution time is analyzed and compared with work already done in [27; 28]. Figure 6 x-axis shows no messages from vehicles while the y-axis shows execution time taken by the messages. The execution time of the proposed model and the available work is the same, but our proposed model reduced execution time up to 4% by using efficient priority algorithms to categorize safety and non-safety messages. #### 5.5.3 Tasks/Messages Failure Rating Comparison with Previous Work

In this scenario, we consider the same resources like the above scenarios. Here, we analyzed our Algorithms 3 and 4 for tasks/messages failure ration calculation. Our proposed model did not drop any message using a fault tolerance mechanism, while the previous work [27; 28] randomly dropped 20%, 15%, 23.3%, and 22.5% messages, as shown in Figure 7.

Figure 5: Response time comparison of proposed model with the latest models of non-safety messages. Figure 6: Execution time of safety messages in milli seconds. ### Simulation Experiment/Illustrative Example

In the experiment, we considered five vehicles with ten different messages, as shown in the following tables, as safety messages and non-safety messages are stored:

In the above two tables, safety and non-safety messages are stored and received from vehicles. In the simulation, we defined safety and non-safety messages with ID No to process further in Tables 6 and 7. After receiving messages from vehicles, our Algorithm 1 checks the nature of the message and stores them in Tables 6 and 7 accordingly. Algorithm 2 is used to prioritize the Algorithm 1 out tables and assign priorities as shown in Tables 6 and 7 columns as \"Priority\". Algorithm 3 sends Table 6 data to fog in ascending order as if any Vehicle message priority value is less than the message will be sent first. And Table 7 data were sent to the cloud for execution. After the assignment of the



## 6 Discussion

In this section, we discussed the provided result in a detailed and comprehensive manner. The proposed model reduced response time by using fog in the middle of the RSUs and Cloud. As when data was sent to the cloud then it was taking so long due to the heterogeneous nature of the cloud. In the cloud basically, the services/servers are placed for way from the users/clients. So, as compared with QAFT-SDVN's latest model, our proposed model reduced the 50% response time of the safety messages, while up to 20% of the non-safety messages due to load division on fog and cloud nodes. The result analysis shows that task failure was a drawback of the traditional models, and we reduced the tasks failure ratio up to 15% as compared with non-fault tolerant models. We have used the task retry mechanism and node retry mechanism when tasks are failed. Energy consumption is also reduced due to reducing the communication cost of the priority messages up to 25%. ## 7 Conclusions

In this paper, we provided QoS aware and fault tolerance-based software-defined vehicular networks using Cloud-fog computing (QAFT-SDVN). The proposed model communicates vehicle messages through SDN nodes which are placed on fog nodes. SDN controllers receive messages from nearby SDN units and prioritize the messages in two different ways. One is message nature-based, while the other one is based on the deadline and size of the messages. SDN controller categorized in safety and non-safety messages and forward to the destination. After sending messages to their destination, we check their acknowledgment; if the destination receives the messages, no action is taken. Otherwise, we use a fault tolerance mechanism, in which we re-transmit the messages. The proposed model is implemented, evaluated, and compared with the latest models. The results show that our proposed model decreased response time by 50% of the safety and non-safety messages by using Fog nodes for the SDN controller. Furthermore, we reduced the execution time of the safety and non-safety messages by up to 4%.