# Exploiting Mobile Edge Computing for Enhancing Vehicular Applications in Smart Cities
## 4 The Proposed Protocol
### Delay-Controlled Data Dissemination  
We propose to utilize the traffic condition as we described above to control data dissemination for an improved coverage, less overhead and minimized delay. Whenever a traffic event is detected, the detecting edge node initiates a message and attaches traffic condition information to it. Then it broadcasts it to its neighboring vehicles and other edges as shown in Figure 3. Each edge can predict the required traffic information to share with neighboring vehicles according to possible forwarding directions. Receiving vehicles can then accommodate their broadcasting suppression delay according to the traffic condition in their specific direction.  
Receiving vehicles utilize the edge estimation of the traffic condition factor \(CF\) according to Equation (2), which is utilized to set the total number of timeslots \(n\). This number is computed by receiving vehicles using the following linear equation:  
\[n=CF\times(-m+1)+m \tag{4}\]  
where \(m\) is the maximum number of timeslots that is set as follows:  
\[m=\frac{R}{w} \tag{5}\]  
where \(R\) is the transmission radio range, and \(w\) is a distance parameter we set by adding the default length of a vehicle to the safety distance assumed between two vehicles. A receiving vehicle assumes n timeslots with equal distances along the transmission range, and then it determines the slot number \(S_{k}\) it belongs to using its own location information as follows:  
\[S_{k}=\left\lfloor\left(1-\frac{\min(d,R)}{R}\right)\times n\right\rfloor \tag{6}\]  
Setting the total number of timeslots n according to \(CF\) allows for setting more slots under low speeds, where traffic density is high, such that few vehicles participate in message forwarding, and consequently, the broadcasting overhead is decreased. On the other hand, fewer timeslots are set at high speeds, where traffic density is low, such that the transmission delay is not affected. Sharing \(CF\) as detected by the edge allows for setting the same number of slots \(n\) in each direction among all receiving vehicles.  
Waiting delays are calculated by each receiving vehicle according to its slot number \(S_{k}\). The delay at a certain timeslot \(k\) in direction \(j\) is computed as:  
\[d_{kj}=S_{k}\times\tau+\Delta_{j} \tag{7}\]  
where \(\tau\) is the minimum one-hop delay, which is the medium access delay added to the propagation delay. \(k\) is an integer between 0 and \(n\), and \(\Delta_{j}\) is a random delay added to each direction to prevent collisions among different directions.  
The farthest vehicles are assigned to the earliest timeslot using (6), such that they can forward messages before other vehicles that are closer to the sender. Whenever a vehicle receives a duplicate  
Figure 2: Speed data of a sample road generated by individual vehicles and collected by the nearest edge.  
of the same message it has already received, it cancels broadcasting the same message, if scheduled. This way, the maximum forwarding distance can be reached while unnecessary broadcasts scheduled by closer vehicles are suppressed.  
In the case of forwarding via VANET, traffic condition information may not be available in the received messages. Nevertheless, relay vehicles can connect to the nearest edge to update traffic condition in each direction before disseminating data further. We assume the existence of an RSU at each intersection for data collection of incoming links. Required parameters with their weights are identified such that each link has a vector of collected sensor data for each parameter. This data is collected from the latest set of traversing vehicles. An average is computed for each parameter and the  
Figure 3: Our Proposed Edge-based Data Dissemination Protocol.  
condition factor is computed as in (2). The condition factor of each link is utilized to weight it in the adjacency matrix as in (1).