The widespread use of electronic devices (mobile and fixed) and the growing popularity of web applications and services have had both positive and negative impact on the Internet of Things (IoT), and in particular on the Internet of Vehicles (IoV) ecosystem. IoV technology is faced with complex challenges, such as data processing, more or less delicate and demanding IT task management and high-pressure calculations, as well as fast and efficient execution of IT tasks while respecting time constraints and taking different technologies into account. We can affirm that the IoV has transformed transport systems in so far as its ecosystem enables a dynamic exchange of information and data, creating an interconnection between vehicles (Vehicular Network) as well as with the entire road network, enabling autonomous and more intelligent driving. This study focuses on AI and Mobile Edge Computing (MEC) to create a flexible and reliable IoV environment that optimizes operations like data processing and security mechanism reinforcement.