# Semantic Distributed Data for Vehicular Networks Using the Inter-Planetary File System
## 3 IPFS (Inter-Planetary File System)  
IPFS is an open-source peer-to-peer (P2P) solution for storing and distributing files, websites, or any other kind of data (e.g., maps) in public or private networks. Originally created by [PERSON] [4], IPFS is based on the classic BitTorrent file-sharing protocol, and Git, the industry standard version control system. Despite some similarities, IPFS is not another blockchain network. Like Bitcoin or Ethereum, IPFS provides data immutability: once a node stores new content and shares it with other nodes, it is impossible to delete or modify it. However, IPFS nodes do not use any consensus protocol to add data, and each node only has knowledge about a small fraction of the content stored in the network. For these reasons, IPFS is faster than blockchain and highly scalable. This section analyzes how this technology, designed for breaking the dependence of the Web with centralized servers, can be used to provide edge intelligence to vehicular networks. IoT and vehicular networks entail a huge challenge in terms of network computing. The premise for developing more services based on edge computing and less based on cloud services is clear:  
Figure 3: This example uses a subset of the Car Accident Ontology for VANETs (CAOVA) ontology to describe a car accident. the majority of the content is produced by nodes at the edge of the network, and in terms of network usage and latency, it is more efficient to process it in that same edge of the network [31]. Regarding the vehicular network context, vehicles are end-users making use of edge services running on nearby RSUs. These connections are more direct and efficient than connections to remote cloud servers. However, edge computing solutions are traditionally envisioned as hierarchical: the vehicles connect to the edge services provided by the RSUs, but the RSUs still need to connect to remote servers because most of the data can only be retrieved from them. The usage of a P2P systems alleviates this dependence. The inconveniences of hierarchical solutions, and how P2P communications present an improvement, can be illustrated with a use case: the interested vehicle sends an information request to a nearby RSU to retrieve data. The expectation of the vehicle is to get all the data in a single, fast, and locally confined transaction. It is likely that the information requested by the vehicle is currently unavailable in the nearby RSU, but available in other RSUs. There are multiple alternative approaches on how to solve this issue and allow the vehicle to retrieve the desired information:  
1. The RSU replies to the vehicle that it is unable to return the requested information. The vehicle, on its own, has to send the same request to a different RSU, with a considerable cost in complexity, time, and bandwidth. This option does not comply with the vehicle expectations. 2. Before replying to the vehicle, the RSU connects to a central server to fetch (search and download) the requested information. This option saves time and bandwidth to the vehicle, but requires a server with access to all the data generated by the RSUs. 3. A faster variant of the previous option: The RSU asks the central server not the information but the network address of the RSU that has the information requested by the interested vehicle. Next, the RSU connects to the other RSU to download the information. This approach reduces the number of messages between the RSU and the server. Most of the messages are exchanged between RSUs that are geographically close to each other. 4. Lastly, the P2P variant of the previous option: There is no central server, the RSU is part of a P2P network, and thanks to a distributed search algorithm, the vehicle can find the location of the information and download it without needing to use any hierarchical infrastructure. P2P solutions are potentially faster and more efficient than any other option, although they are technically more complex in terms of software.