Research Article

Toward Performant and Energy-Efficient Network Queries: A Parallel and Stateless Approach

Algorithm 1

Topology construction for storage nodes.
Input: The message queue at the base station Q; All storage nodes
1: Base station broadcasts the hello message
2: Storage nodes initialize status, respond to base station
3: Base station enqueues the returned messages
4: Base station splits N into coprime by CRT
5: for do    IN PARALLEL
6:  
7:  Update s coordinates, timestamps, and distances
8: end for
9: Base station broadcasts Q
10: while Q is not empty do
11:   Storage node re-calculates distances and timestamps
12:   if Message is received at the correct node then
13:    Base station dequeues Q
14:   else
15:    Storage node forwards the message
16:   end if
17: end while
Output: All storage nodes are topologically complete and have unique two-dimensional coordinates [idx, key].