CSCI 470 |
Pruning data. Users may disappear from the network without deleting themselves from the tracker. You need to implement a pruning mechanism. If more than 1 minute has elapsed since a user's last update command, then you should delete that user from the tracker. This pruning should happen in a timely manner (i.e. queries should not show stale users more than a few second beyond the one-minute staleness limit).{ "status": "OK", "near": [ { "name": "carol", "northing": 50, "easting": 150, "distance": 70.710678, "timestamp": 1362722508 }, { "name": "bob", "northing": 150, "easting": 150, "distance": 70.710678, "timestamp": 1362722494 } ] }
The above uses the handy all-in-one JAR file: jetty-all-9.2.8.jarJETTY_LIB=/home/kvertanen javac -cp ${JETTY_LIB}/jetty-all-9.2.8.jar:${JETTY_LIB}/servlet-api-3.1.jar *.java java -cp .:${JETTY_LIB}/servlet-api-3.1.jar:${JETTY_LIB}/jetty-all-9.2.8.jar GeoTrackServer
Page last updated: February 22, 2015