# A Mobility Management Using Follow-Me Cloud-Cloudlet in Fog-Computing-Based RANs for Smart Cities
## 4 Mobility Management Using Follow-Me Cloud-Cloudlet Approach
### Follow-Me Cloudlet Phase  
This phase implements the cooperation of cloud-cloudlet \(CL_{s\to d}\). After performing _follow-me_ phase, assume that we have \(TIM=(\underbrace{1,1,\cdots,1}_{m}\underbrace{0,0,\cdots,0}_{n-m})\). When UE moves to a different region, and initiate the handover procedure, un-transmitted packets are still transmitted from the current serving data center of \(c_{s}\) to the new serving cloudlet \(l_{d}\), note that the data migration procedure is still not initiated, such that we may have \(TIM=(\underbrace{1,1,\cdots,1}_{m^{\prime}}\underbrace{0,0,\cdots,0}_{n-m^ {\prime}})\), where \(m\leq m^{\prime}\). That is, there are \(m^{\prime}-m\) pre-transmitted packets. Some of these \(n-m^{\prime}\) bits of TIM can be set to be 1 if these corresponding packets are already exited in cache of \(l_{d}\). The detailed procedure is given. 1. When \(UE\) is moving to the new region with F-AP\({}_{d}\) of \(l_{d}\), the \(UE\) initiates a request message, namely \(REQ\_message(UE\_id,prefix_{s},prefix_{d},TIM)\), if the TIM message indicates that \(m\) packets are already successfully received by UE after executing the follow-me phase. The \(REQ\_message\) also informs FMCC to carry the handover information with the report of the remaining un-received packets. The F-AP\({}_{d}\) also checks if \(k\)-th packets is already existed in cache of F-AP\({}_{s}\), then let \(b_{k}=1\) of \(TIM\), where \(m+1\leq k\leq n\). The updated \(TIM\) is re-inserted into the \(REQ\_message(UE\_id,prefix_{s},\) updated \(TIM\)) and forward to IDMD and FMCC. 2. MAG in \(l_{d}\) receives the \(REQ\_message(UE\_id,prefix_{s},TIM)\) from F-AP\({}_{d}\), MAG initiates a proxy binding update (PBU), \(PBU\_message(UE\_id,prefix_{s},prefix_{d},TIM)\) or \(PBU\_message\) to LMA and forward it to IDMD. After IDMD receiving \(PBU\_message\), IDMD updates the binding cache entry (BCE) table, \(BCE\_table[UE\_id,prefix_{s},prefix_{d},LMA_{d}]\), \(BCE\_table\). The IDMD generates the proxy binding acknowledgement (PBA), \(PBA\_message\) to two LMA of the \(l_{s}\) and \(l_{d}\). 3. FMCC receives the _session-migration-request_ message, \(SMR\_message(MN\_id,prefix_{s},prefix_{d})\) from IDMD if IDMD receives \(REQ\_message(UE\_id,prefix_{s},\) updated \(TIM)\). FMCC sends \(SMR\_message(MN\_id,prefix_{s},prefix_{d})\) to decision making application module (DMAM). DMAM is activated by the request from FMCC. DMAM is responsible of making the decision of the data migration to search for an optimal cloud \(c_{d}\). 4. DMAM analyzes the user information, \(UE\_information(prefix_{s},prefix_{d},etc. )\) in addition to the mapping information of \(c_{d}\) and \(l_{d}\) by generating _get-mapping-information_ message, \(GMI\_message\), to mapping information gateway (MIGW). MIGW then initiates a post-mapping-information message, \(PMI\_message\), to DMAM. 5. After DC of cloud \(c_{s}\) verifying the received TIM message, the DC of cloud \(c_{s}\) randomly pre-transmits some \(k^{\prime}\)-th un-transmitted packets, where \(b^{\prime}_{k}=0\) and \(m+1\leq k^{\prime}\leq n\). The corresponding bits are set 1, for \(b^{\prime}_{k}=1\), in the TIM message if the packet are successfully pre-transmitted toward to cloudlet \(l_{d}\) and kept the pre-transmitted packets in cache of \(l_{d}\). This pre-transmission operation is done until the new route path is determined in _follow-me cloud-cloudlet_ phase. Finally, some of these \(n-m^{\prime}\) bits of TIM can be set to be 1 if these corresponding packets are already exited in cache of \(l_{d}\). 6. Finally, FMCC notifies \(c_{s}\) and \(c_{d}\) about the current user's information containing current \(TIM\) message, the location information through the analysis of DMAM and MIGW. As shown in Figure 8, \(UE\) moves from \(l_{1}\) to \(l_{2}\) and transmits a new \(REQ\_message(UE\_id,prefix_{1},prefix_{2},TIM)\) to \(l_{2}\), where TIM is (1, 1, 1, 1, 0, 0, 0, 0, 0, 0).