Resident data is data that remains on the router after the PLAN program that created it has terminated. This feature was added to PLAN to enable programs to easily perform network traversals, such as DFS and BFS. To perform these searches, it is necessary to have some way of marking nodes so they are not revisited, as the network topology may be cyclic. Rather than providing a special-purpose service to enable node marking, we opted to provide the more general service of resident data. An example of the use of resident data to perform a DFS is given in the example program rout_tests/traceNet.plan.
Resident data is stored in a table on the router which is indexed by a string which names the data, and a session key. This key serves to differentiate data stored by different instances of the same PLAN application.
One hazard of allowing resident data is that PLAN programs may (maliciously or inadvertently) leave large chunks of data on a router, consuming memory even after the PLAN program has terminated. To combat this problem, each piece of resident data has a timeout associated with it. This timeout is set by the user when the data is created, but may not exceed 5 minutes (in other words, users may be ``nice'' and opt to release their data before the 5 minute limit). In the future, we hope to implement a more semantically-appealing way of cleaning up leftover resident data, such as a form of distributed garbage collection. We also anticipate that eventually the use of this service will require authentication.