# Collaborative Caching for Implementing a Location-Privacy Aware LBS on a MANET
## 4 Proposed M-LBS Scheme
### Design Details  
Mobile users are always aware of their position and therefore know which cell they are in. When a user detects that it has crossed into a new cell, it broadcasts a greeting to all users in this cell to discover who the _cell master_ is. The cell master is essentially a user who resides in the cell and collects statistics about the cell, such as the number of nodes present, the number of historical queries resolved in the cell, the frequency of query types, and the number of historical queries sent to the LBS. The new node can identify itself with the cell master by a pseudonym, which it maintains while moving within the cell.  
Suppose that the cell master does not respond to a mobile user. In this case, the user concludes that the cell is empty, becomes the new cell master node, and attempts to locate the cell retention node (this is a former cell master node that is not present in the cell and maintains the cell statistics until the new master node is reached) using successive geocasts, following a protocol similar to that proposed in [10]. For our purposes, a geocast is a communication primitive that allows sending a message to all mobile users present in a geographical location, and it is not relevant to our system to determine the routing protocol under which it is implemented. To perform a geocast, we only need to identify the origin and destination cells of a message that is understood to be directed to all nodes located in the destination cell.  
When a mobile user detects that they have left their current cell, a _cell exit protocol_ is executed to distribute cache content among users who are within the previous cell. This data distribution maintains relevant information while minimizing redundancy within the cell. If the node is the latest node in the cell or the current nodes lack available cache storage, the user carries this information to the new cell. We propose two optimization-focused exit protocols in Section 4.4. Upon entering a new cell, the user sends a greeting message to establish their presence. If the mobile user was a cell master, they must first transfer this role to another node in their previous cell.  
When a user moves within a cell, they can create an LBQ (location-based query), which is defined as a circular-range query centered on the user's position. This query seeks to determine the details of all public points of interest (POIs) in a specific category within the range. For example, a user looking for breakfast might query the menus and prices of restaurants in their neighborhood. The user determines which cells intersect with their query range, as shown in Figure 2 (where a red circle centered on the user intersects cells 13, 14, 18 and 19) and checks their cache for relevant data. For cells without cached data, they send a geocast requesting information. Users store all received data, implementing cache replacement policies as needed (detailed in Section 4.2).  
If a user receives no response within the maximum waiting time, they prepare to access the LBS. This intention is communicated to the _cell master_ for recording. Users concerned about privacy can also contact an anonymizer to obscure both their position and query [4; 7]. When a node receives an LBQ, it searches its cache for responses. If found, it notifies its _cell master_ and sends the grouped responses in a single geocast to the requesting cell.