## 2 Related Work
[PERSON] [30] presented a unique networking method to the Internet of Vehicles (IoV) for their automation and orchestration by rethinking the wireless edge framework. He developed a policy-driven framework for a safe and efficient IoV networking paradigm and then conducted analytic modeling to evaluate its performance. He also developed an intent-based flow offloading technique to enable increased and customizable quality of experience. [PERSON] et al. [31] offered the creation of a complete prototype of a Software-Defined Vehicular Network. To begin, the SDN-based backbone was validated using real OpenFlow switches on real hardware. Following that, SDN-based Radio Access is evaluated using WiFi Access Points that supported the Click Modular Router and Open Switch/OpenFlow protocols. An On-Board Unit (OBU) based on a Single Board Computer was used to achieve OpenFlow switch functionality. Numerous SDN controllers were used to build routing algorithms that transport the control plane of vehicles via the backbone, to process data received from vehicles, to anticipate topology, to compute routing paths for V2V and V2I communication, and lastly to manage mobility schemes. Throughput, delay, processing time, handoff latency, and packet loss were all used to determine the communication quality. [PERSON] et al. [32] summarized the present state of the art in intelligent transportation systems (ITS) and then offered a software-defined heterogeneous vehicular networking (SDHVNet) architecture for providing a highly adaptable networking infrastructure capable of on-demand network innovation. In the end, several prospective architectural issues were examined, along with their likely answers. [PERSON] [33] provided an approach based on the activity footprints for detecting anomalies in IoT with the use of a multi-agent algorithm. The method enables the linkage of specific device activities, or \"digital footprints,\" to real-valued vectors. The vectors were given to mobile agents that acted like each had a different bio-inspired model. This model lets an intelligent global behavior emerge from simple local movement rules that all agents can see on a virtual 2D space. Based on [PERSON]'s correlation, a custom similarity rule drives each agent to apply only the rules that apply to them, so that similar agents can automatically move closer together. The intelligent positioning (clustering), which was based on the vectors that had been assigned, allows one to find isolated agents, which are devices with unusual activities that need to be monitored. This is because they could be linked to intruders or malicious users. The results showed that the metaheuristic algorithm was a good idea. After conducting an in-depth review of the literature, we have found that performance-based comparison of cloud and fog is not well reported in VANETs. Still, some unanswered questions exist. For example, how can the cloud handle the upcoming VANET requests in peak time? What will the delay be? If we apply fog computing, what will the output be? If we use 5G, then what will the impact on performance be? To address these gaps, we first compared the performance of cloud and fog computing in terms of delay and latency in VANETs, then utilized our priority-based 5G enabled proposed model in the fog.