SPANNING TREE CONSTRUCTION AND HOP-COUNT ======================================== All the sensor network projects used one of the following two approaches, both of which are reasonable. (1) Periodic flooding: Periodically, the root node would initiate a flooding of a message, which would be further propagated by the other nodes, together with a hop-count. When a node first receives this message, it will set the sender of the message to be its parent, increment its hop-count and then forward the message out. Sequence number: The root adds a new sequence number for every flooding it initiates. When a node receives a message, it updates its parent info if the sequence number is newer or if the sequence number is the same as the most recent one it received and the hop-count received is smaller than the best it has received thus far. Timeout: The hop-count should time out so that a node does not keep stale information. It is best to set the timeout to be greater than the period of the flooding procedure. (2) Distance vector: This is the classic distance vector protocol in which nodes periodically broadcast their distance (from the root) to their neighbors. And on receipt of such a message, a node updates it parent and/or hop-count if the new hop-count is smaller than the current one it has. Sequence number: One could have the root node initiate the distance vector procedure periodically with a new message using a new sequence number. This would make the procedure quite similar to periodical flooding. Count to infinity: As we all know, one problem with the basic distance vector approach is the count to infinity problem, when a subset of nodes gets disconnected from the root. Timeout: Using sequence numbers and having each node periodically timeout its entry (even in the presence of updates) would address the count to infinity problem. DYNAMICS ======== Both of the above approaches work well in the dynamic setting if timeouts and sequence numbers are appropriately set. ALARM ===== Given the spanning tree setup, the alarm implementation is to simply propagate the alarm to the root using the path through the parent. A couple of issues need to be kept in mind: Periodic propagation of alarm: Since communication is unreliable, it is important that the alarm source continually send the alarm. This period should be much smaller than the period used in the spanning tree construction so that alarm is relatively stable. Culmination of alarm: Some of you implemented a "stop alarm" message. In the absence of reliable delivery (through ACKs, etc.), this is not a good idea since a loss of a single message kills this step. When the periodic propagation of alarm stops, then this implicitly signals the end of the alarm. COLLISION AVOIDANCE =================== It is a good idea to use random backoff periods for avoiding collisions. For networks of small size, there is no need to implement RTS/CTS or ACKs. TIMING ====== Appropriate selection of timers and timeout values turned out to be quite critical for the project. For instance, it makes sense to set the period of DV or flood protocol to be more than the alarm generation period. Also, one should avoid making one timer a multiple of the other (or share a large common divisor) since handling events that may simultaneous fire is unpredictable. Use of timeouts and/or sequence numbers to make sure that the network does not maintain stale information and responds well to dynamics. GRADING ======= Allotted points: 3 for explanation/documentation (Exp) 3 for static shortest paths (SSP) 2 for dynamics (Dynamic) 2 for alarm (Alarm) Your score: Exp SSP Dynamic Alarm Gil+Kaushik+Mike 3 3 2 2 Zhifeng+Abhishek+Jingjing 3 2.5 2 1.5 Emrah+Ana-Maria+Maulin 3 3 2 1.5 Vrushali+Priyanka+Sudha 2.5 3 1.5 1 Gokul+Vishal+Chirayu 2 2.5 1 1 Anand+Tejas 3 3 1.5 1.5 Bishal+Jia+San 3 3 2 2 Utkarsh 1.5 1 0 0