# Querying on Federated Sensor Networks
## 3 L-FSN Protocol
### Intra-Island Querying  
To optimize for efficiency and achieve a large scale querying system, the layered FSN management by L-FSN provides opportunities to use different intra-island querying protocols on each island. For intra-island querying, query packets follow a path depending on the intra-island querying protocol. Intra-island querying protocols are seamlessly connected with EGs. If an intra-island querying protocol uses the EG of an island as a root structure of the algorithm, EG will automatically catch up with the island information. In this way, an EG will not consume extra effort to retrieve network data.  
Intra-island querying protocols of L-FSN can be developed according to directions of querying protocols designed for WSNs. We categorize querying protocols in the WSNs literature according to their underlying data routing mechanisms, as geometrical, hierarchical cluster-based, hash-based, and tree-based [4]. In this section, we select a querying protocol from each of these categories and discuss how an EG can be related with these protocols.  
_Geometrical querying protocols_ allow packets to be routed according to the geometrical directions of a destination location for storage and retrieval. As an example protocol to this category, Rumor Routing [5] is built on the intersection probability of query paths and data paths. In Rumor Routing, query and data packets are propagated through a random path. In geometrical protocols, data can be collected in EGs while propagated. If an EG has received the data information previously, it replies back to the querying node.  
_Hierarchical cluster-based querying protocols_ allow packets to be routed through clusterheads. Distributed quad-tree (DQT) [6] has a hierarchical cluster-based infrastructure that is built according to the geographical coordinates of the deployment area. In DQT structure, the deployment area is divided into geographical cells, and there is a hierarchical relationship among cells up to root clusterhead cells. For applying hierarchical cluster-based querying protocols into islands as intra-island querying protocols, we can assign an EG as the root clusterhead of the island.  
_Hash-based querying protocols_ route data to a destination location for storage and retrieval using a hashing mechanism. Geographic Hash Table (GHT) [7] is an example protocol for hash-based querying protocols, in which a query packet is propagated to the corresponding hashed location where relevant data packet is advertised. On hash-based approaches, an EG can be selected as the rendezvous point. For applying hash-based querying protocols into islands as intra-island querying protocols, we can assign an EG as the rendezvous point for both query and data packets.  
_Tree-based querying protocols_ use the message flooding technique to maintain a tree-like routing structure among network nodes. Directed Diffusion protocol [8] is an example protocol for tree-based approaches, which uses the query flooding technique. When a query message is received by a data source node, this node replies back along a reverse query propagation path. Tree-based querying protocols can be adopted as intra-island querying protocols considering an EG as the root of the tree.