-
Notifications
You must be signed in to change notification settings - Fork 321
PEP — Click element; runs the Grid Position Estimation Protocol
PEP(IP, [FIXED, LATITUDE, LONGITUDE])
Ports: 1 input, 1 output
Processing: push
Drivers: userlevel
Run the Grid Position Estimation Protocol. Subtypes GridLocationInfo, and can be used in its place.
Produces packets with just the PEP payload. The Grid configuration must arrange to encapsulate them appropriately. I expect this means UDP/IP/Ether. Expects packets with just PEP payload.
The status handler prints out node id, estimated position, and the table of nearby nodes with known locations.
A node that knows its location originates a PEP "fix" every second. Each fix update has a new sequence number.
All nodes remember all the fixes they've heard about in the last 100 seconds, along with the number of hops to the fix.
A node accepts a new update if the sequence number is higher than remembered, or if seq is equal and hop count is less. The node remembers the time-stamp of the last time it accepted each fix.
Every second, a node broadcasts the nearest fixes it knows about. Only fixes heard about in the last 5 seconds are broadcast. Also only fixes with hop count < 10.
There's a problem that an update with a new sequence number may move quickly along a long path, and supersede an older slower update that moved along the minimum length path.
Here's how the PEP protocol handles some interesting cases:
Crash: after about five seconds, nearby nodes will stop propagating a crashed fix's updates. But they remember the fix for 100 seconds, so won't accept looped updates with high hop counts. The 100 seconds has to be longer than 5 seconds plus the maximum allowed hop count; otherwise updates may loop forever.
Re-start: a fix node is only allowed to re-start if it has stayed down for >= 100 seconds, long enough for nodes to flush their entries.
Move closer: if a fix moves closer to you, you'll see (and believe) smaller hop counts.
Move farther: if a fix moves farther from you, you'll see higher hop counts but you'll believe them because the sequence number is larger.
Generated by click-elem2man from ../elements/grid/pep.hh:4
on 2017/10/17.