## 3 Asst
### Dynamic Trajectory  
To provide scalability for a large sensor network, ASST dynamically adjusts the square range of the trajectory in proportion to the query frequency for the data. If the number of queries for the specific data increases, the range of trajectory Tr also increases. On the other hand, if the number of queries for the data decreases, the range of trajectory Tr decreases. This is known as Dynamic Trajectory. To decide the distance H which is the range of trajectory Tr, ASST computes the data popularity (query frequency) p for the data. Initially, we gather the number of total queries on all repository nodes Rn. This information can be gathered through the summation of the number of queries at each node and by piggybacking this on the data packet. The repository node feeds back the query information by returning the data packet to the source node. First, the backbone node b in trajectory Tr gathers query counts from the replica nodes around it, and then it piggybacks the total query counts, which is a summation of the query counts, for both itself and the replica nodes. Next, the backbone node that receives the data packet forwarded from the previous backbone node, adds both its query counts and the replica node's query counts to the query counts from the data packet, and then it forwards this to the next backbone node. When the data packet returns to the first backbone node, the data packet is returned to source S, which computes a new distance H.  
Figure 7 shows the Dynamic Trajectory in ASST. Dynamic Trajectory starts with a minimum distance h1. The source node S sends a data packet with a distance h1. At the next update, the source S sends a data packet with a distance h1 and computes a new distance with the query frequency. The new distance is not applied immediately but at the time of the next update. If the query frequency is increased over the threshold, the distance h is also increased to h2. At distance h2, if the query  
Figure 6: Square-Shaped Trajectory Formation. frequency is decreased, the distance is decreased to h1; if the query frequency is increased again, the distance becomes h3. When the distance is increased or decreased, a new trajectory is generated with the new repository nodes. We do not need to manually remove the old trajectory because each repository node has an update timer. If the data is not updated until the timer is expired, the node discards the data and this leads to deformation of the trajectory. Table 2 shows the procedures of dynamic trajectory in ASST. \begin{table}
\begin{tabular}{|l|} \hline _procedure put_ (_k_, _v_) \\ \(\mathit{TP}(\mathit{Tx},\mathit{Ty})\leftarrow\mathit{Hash}(k)\) \\ \(\mathit{QF}\leftarrow\mathit{get\_Query\_Freq}(k)\) \\ \(h\leftarrow\mathit{QF}\times\mathit{QT}^{2}\) \\ \(\mathit{Vertex}\{4\}\leftarrow\{(\mathit{Tx}-h,\mathit{Ty}-h),(\mathit{Tx}-h, \mathit{Ty}+h),(\mathit{Tx}+h,\mathit{Ty}+h),(\mathit{Tx}+h,\mathit{Ty}-h)\}\) \\ \(\mathit{Min\_Dis}\leftarrow\mathit{MAX}\_DIS\) \\ _for i_ = 1 _to_ 4 _do_ \\ \(\mathit{dis}\leftarrow\mathit{dis}\tan{ce(\mathit{my\_P},\mathit{Vertex}\{i \})}\) \\ _if_ _dis_ \(<\mathit{Min\_Dis}\) \\ \(\mathit{Min\_dis}\leftarrow\mathit{dis}\) \\ \(\mathit{T}\arg{et\_Vertex}\leftarrow\mathit{Vertex}\{i\}\) \\ \(\mathit{Direction}\gets i\) \\ _end if_ \\ _end for_ \\ \(\mathit{Send}(US,k,v,\mathit{TP},h,\mathit{Vertex},T\arg{et\_Vertex},\mathit{ Direction},\mathit{ET})\) \\ _return_ \\ \hline \end{tabular}
\end{table} 
Table 2: Dynamic ASST procedure. Figure 7: Dynamic Trajectory Development.