## 4 Proposed Microservice-Based Scheme  
Microservices are becoming increasingly popular in many industries, including the automotive sector, due to their ability to improve software systems' flexibility, scalability, and maintainability. Microservices can potentially revolutionize the design and operation of VANETs in the designed system. VANETs are networks that enable communication between vehicles, road infrastructure, and other devices in the transportation ecosystem. These networks are characterized by their dynamic and rapidly changing nature, which makes them challenging to design and operate. Microservices are tiny, self-contained, and loosely interconnected software elements that can be deployed and scaled autonomously, making them an important part of any designed network system. We considered microservices for the proposed VANET since they offer several benefits, including fault isolation, ease of maintenance, and the ability to handle large amounts of data. By adopting microservices in the designed VANET, it is possible to create modular and scalable systems that can handle the challenges of vehicular networks. Microservices can implement various services in the proposed VANET, including traffic monitoring, collision warning systems, and remote vehicle diagnostics. Another important benefit of implementing microservices in the designed VANET is their ability to improve the QoS, which is a critical aspect of VANETs, as it affects the performance of safety-critical applications such as collision warning systems. Microservices can help to improve QoS by enabling dynamic scaling, fault tolerance, and load balancing. For example, microservices can be used to automatically scale up or down the processing power of a given service based on the current demand. This approach ensures the service can handle the current load while minimizing resource usage. The use of microservices in the proposed VANETs can enable new and innovative services that were previously impossible. For example, microservices can be used to implement new applications that rely on real-time data, such as traffic congestion monitoring or parking space detection. These services can be deployed as independent microservices that can be easily integrated into existing systems, reducing the time and cost of development. Each microservice can be deployed and scaled independently, allowing for greater resource utilization and improved performance. This is particularly important in the proposed VANET, where resources are limited, and efficient use of these resources is critical for the success of VANET applications. By adopting microservices, it is possible to create modular and scalable systems that can handle the dynamic and rapidly changing nature of any VANETs. This approach allows for greater flexibility, modularity, and scalability in designing and implementing VANET applications. Algorithm 1 provides the proposed microservice scheme for the considered VANET. ```
1: Initialize service type (T), service priority, microservices (M), and categories of microservice
2: For (i = 1: T)
3: Output: Define the service type
4: Output: Define the service priority
5: End for
6: For (x = 1: M)
7: Output: Define the microservice type
8: Output: Define the microservice priority
9: End for
10: End
```  
**Algorithm 1**Microservices model for vehicular applications  
The proposed microservices algorithm depends mainly on the task priority. The algorithm starts by prioritizing the received tasks according to their main applications. It works by first indicating the data priority, defining the application, and assigning binary values to each task. If it is a high priority, it takes the data and divides the data service into microservices. After this, the microservices are also numbered based on their priority, with the decision of which data or service must be sent first based on their priority number. Thisreduces the task load on the vehicle service.