Add polling or interrupt for distributed computation status to wuserver
Imported issue: Initially reported by Nadia Heninger in https://gforge.inria.fr/tracker/?group_id=2065&aid=18804
We would like an interface for a monitoring script to tell if the distributed computation has finished, so we can trigger actions like automatically terminating unneeded ec2 instances. Right now the server will send such a message to slaves who contact it to request more jobs, but we would like our monitoring script to be able poll without requesting a job.
This can be done in a few ways:
-
Interrupt style: We register an IP address and the wuserver contacts it with some message when it's finished sieving.
-
Polling style: We add an additional path to the wuserver like /isdone, and it will return an appropriate response code or message about the status when it gets a request. Basically the way send_WU behaves now, without actually sending a workunit. (My students hacked up this solution in a couple minutes to test; patch attached.)
-
Watching log files: The ugly option is continuously download or monitor the log file and match on certain terms as they appear.