Circuitscape / cloudCS

Circuitscape HTML interface
Other
0 stars 0 forks source link

Offline execution #9

Closed tanmaykm closed 10 years ago

tanmaykm commented 10 years ago

It is natural for users not to wait in front of the computer for a long running task to finish. There is also the possibility of laptops going into sleep, disconnecting the browser.

The current implementation expects users to be online. Session is cleaned up as soon as the user disconnects. I think we may need an offline execution support where a user can start a task, and log out while the task is running. The results can then be uploaded to Google Drive when done. If the user logs in before the task is complete, the running task is again re-attached to the new session and the user can see messages flowing again.

This had come to my mind earlier but had kept it aside to implement later, but looking at the execution logs I feel we may have to do this before we get others to try.

bmcrae commented 10 years ago

Agreed, that would be a nice enhancement. I let my laptop go to sleep a couple of times during the 24m run today before moving to a desktop where I can ensure the browser will stay open.

tanmaykm commented 10 years ago

The above commits add offline execution capability. Here are a few points explaining this feature:

Please give it a try.

bmcrae commented 10 years ago

Seemed to run smoothly until it timed out while solving focal pair 143 of

  1. Interestingly the task appeared to be lost- I wasn't able to see results in the drive or get a response when I tried to monitor the background task or show previous task logs. But closing the window and signing back in gave me access to the previous task log. I hadn't closed the browser window, but my laptop had been asleep.

On Fri, Jan 3, 2014 at 11:10 PM, Tanmay Mohapatra notifications@github.comwrote:

The above commits add offline execution capability. Here are a few points explaining this feature:

  • Once a task is started, whether single or batch, it will not be interrupted if connection between the browser and server breaks or even if the user logs out.
  • A running task can be monitored by reattaching to it with the "Monitor Background Task" menu option.
  • Logs of a completed task can be viewed with the "Show Previous Task Logs" menu option.
  • A user is limited to one background task.
  • Maximum time allowed for a task and for a session are configurable, beyond which tasks/sessions are purged.

Please give it a try.

— Reply to this email directly or view it on GitHubhttps://github.com/Circuitscape/cloudCS/issues/9#issuecomment-31573262 .

bmcrae commented 10 years ago

Ran a batch of 6m problems with no issue. One neat and unexpected thing is how easy it is to check a run on my smartphone. Very cool!

If it is possible to upload results after each .ini file is completed, that would please users doing many runs that together take lots of time to run. But not critical.

ViralBShah commented 10 years ago

We could have the system send out an email when the work is completed.

tanmaykm commented 10 years ago

The earlier issue of task appearing to be lost seems to be the condition where the session was timed out on the server while the user's browser was still logged in. We need to display a message prompting a re-login in such a case. I shall also increase the time limit to 36hrs and will include the number of points in calculating problem complexity.

And yes, we could send an e-mail once the task is complete.

tanmaykm commented 10 years ago

Closed via https://github.com/Circuitscape/cloudCS/commit/76e6e1c3bab2630987faff29c1c0c34ef3bfd3b0 and https://github.com/Circuitscape/cloudCS/commit/bc2491a3b6fb91dd7f22b56e9f3459d572be7b7d