informatics-isi-edu / synspy

Synaptic segmentation and visualization with fluorescence microscopy
BSD 3-Clause "New" or "Revised" License
4 stars 1 forks source link

Launcher needs to allow recovery from network errors #42

Closed BDemps closed 7 years ago

BDemps commented 7 years ago

Summary:

It seems that under some circumstances, the user can lose work if there is a network outage when they exit the viewer and the launcher attempts to upload the results of the work session but fails.

Original issue text:

When users click "shift D" it just displays parameters like gain and thresholds without actually dumping the data. "Save Progress" still works, but it would be good for them to be able to save periodically with a dump in case the internet cuts off unexpectedly, severing the tether to the data management server, which is apparently crippling.

karlcz commented 7 years ago

The current viewers know nothing about the remote server, and the launcher handles download and upload only at the beginning and end, respectively, of one viewer launch cycle. Therefore, it's not really feasible to save incremental progress to the server via the D command in the viewer.

The D command does save to the local work area on the client machine, but this only helps in the case that you experience a viewer crash such that the normal save at the end fails. In any case, the launcher can only upload the saved results after it detects that the launched viewer has exited.

I don't think we have enough resources to complicate this launcher/viewer combo with an offline worker mode. But, I think we should fix it if it is losing data. Can you confirm that the launcher actually lost data?

If the network is lost during the launcher upload sequence, I think it should report an error and stick around with a similar dialog to the one that happens after the viewer exits, and let the user try to "save progress" or "complete" the item again with another button press, after they've restored network connectivity.

@mikedarcy

BDemps commented 7 years ago

I see, okay yes we definitely don't need a dump command then. I'll just tell the segmenters to quit periodically to save changes.

Note that yes, one of the segmenters did actually lose data because he closed his Computer lid (knocking it offline) and then when he opened it back up it allowed him to keep clicking and segmenting but then after he clicked the "x", no data was saved from what he did!

On Sep 25, 2017 10:40 AM, "Karl Czajkowski" notifications@github.com wrote:

The current viewers know nothing about the remote server, and the launcher handles download and upload only at the beginning and end, respectively, of one viewer launch cycle. Therefore, it's not really feasible to save incremental progress to the server via the D command in the viewer.

The D command does save to the local work area on the client machine, but this only helps in the case that you experience a viewer crash such that the normal save at the end fails. In any case, the launcher can only upload the saved results after it detects that the launched viewer has exited.

I don't think we have enough resources to complicate this launcher/viewer combo with an offline worker mode. But, I think we should fix it if it is losing data. Can you confirm that the launcher actually lost data?

If the network is lost during the launcher upload sequence, I think it should report an error and stick around with a similar dialog to the one that happens after the viewer exits, and let the user try to "save progress" or "complete" the item again with another button press, after they've restored network connectivity.

@mikedarcy https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_mikedarcy&d=DwMFaQ&c=clK7kQUTWtAVEOVIgvi0NU5BOUHhpN0H8p7CSfnc_gI&r=Lssj6JKak_DaRnExGYcKnQ&m=grk_w5OtssTKaYHGAlUz8p0y6sBeSdqjyHh2PS_BY9Q&s=hOJEEy7DPBJLJ0UnLBsgH8pexYZv_Q4IKBSClvZarrg&e=

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_informatics-2Disi-2Dedu_synspy_issues_42-23issuecomment-2D331957175&d=DwMFaQ&c=clK7kQUTWtAVEOVIgvi0NU5BOUHhpN0H8p7CSfnc_gI&r=Lssj6JKak_DaRnExGYcKnQ&m=grk_w5OtssTKaYHGAlUz8p0y6sBeSdqjyHh2PS_BY9Q&s=boh_R9n1kqk0vqz5AUQDC0l-udiNd0c1KvfIgBvGu5Q&e=, or mute the thread https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_AbQStxNIIAgLwylrWb3fMuXT8DVVsnJnks5sl-2DVugaJpZM4PdInn&d=DwMFaQ&c=clK7kQUTWtAVEOVIgvi0NU5BOUHhpN0H8p7CSfnc_gI&r=Lssj6JKak_DaRnExGYcKnQ&m=grk_w5OtssTKaYHGAlUz8p0y6sBeSdqjyHh2PS_BY9Q&s=IsUuw022RpX4WDcKGikK5Yo5YMwcfwhzCT68qVENVxE&e= .

karlcz commented 7 years ago

I've revised the issue title and description with what I understand to the be the problem, and we'll try to keep it in mind when we have a chance to revisit the launcher code.

In the short term, the workaround is that the user be cognizant of the need for an active internet connection and finish any work session before they suspend their laptop or walk away from the network...

BDemps commented 7 years ago

Yes, that should be good enough - user must be cognizant of their work.

On Sep 29, 2017 10:50 AM, "Karl Czajkowski" notifications@github.com wrote:

I've revised the issue title and description with what I understand to the be the problem, and we'll try to keep it in mind when we have a chance to revisit the launcher code.

In the short term, the workaround is that the user be cognizant of the need for an active internet connection and finish any work session before they suspend their laptop or walk away from the network...

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_informatics-2Disi-2Dedu_synspy_issues_42-23issuecomment-2D333193915&d=DwMFaQ&c=clK7kQUTWtAVEOVIgvi0NU5BOUHhpN0H8p7CSfnc_gI&r=Lssj6JKak_DaRnExGYcKnQ&m=uVSA7l0T3ok1S9_AwDgFzeliwKJt76_sKdv2ydVQvik&s=4UWVt8or2jcud1BrStWfE3osNEAL6M1_ipwcBFWZ2ig&e=, or mute the thread https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_AbQSt52wOFv7sC-5FwwWjVH3-5FntDATMATqks5snS3wgaJpZM4PdInn&d=DwMFaQ&c=clK7kQUTWtAVEOVIgvi0NU5BOUHhpN0H8p7CSfnc_gI&r=Lssj6JKak_DaRnExGYcKnQ&m=uVSA7l0T3ok1S9_AwDgFzeliwKJt76_sKdv2ydVQvik&s=0_B6EdLqWRTE9Degx3yrkcurSMamrWEft62yAYHANdA&e= .

BDemps commented 7 years ago

I feel like we can close this one now. The segmenters have been doing save changes more regularly and it no longer seems to be an issue.