coglabuzh / online-exps

Unleash the full potential of JavaScript and supercharge your web experiments with this library for experimental programming - based on jsPsych - work in progress! 🎯
2 stars 0 forks source link

Get the data from participants who lost connection with the server #20

Open chenyu-psy opened 8 months ago

chenyu-psy commented 8 months ago

Hi Ajit,

There is an issue that has troubled me for a long while. Some participants lost connection with our server during the experiment. They reported that the experiment was stopped on the page "Please wait, you are being redirected to Prolific...". When I tried to find the data of these participants from JATOS, only a few trials' data could be found. I have chatted with our IT multiple times for this issue but failed to find a good solution.

I wonder if it is possible to check the connection during the experiment. And if the system finds that the connection between participants and server has been lost, could the system try to send the data to the server after the whole experiment? (Currently, the data is sent after each trial.)

ajit283 commented 8 months ago

Dear Chenyu, currently (at least in the default experiment), the data is indeed sent after each trial. Would you be fine with sending the entire data at the end? The downside of this is that the internet connection needs to work at the end of the experiment, otherwise the entire experiment run is lost.

There doesn't seem to be a way to check the connection with the JATOS server. Making the data transfer dependent on this would also be quite error-prone.

What we definitely should do is increase the number of retries for sending the data: (https://www.jatos.org/jatos.js-Reference.html#jatoshttpretry)

image
chenyu-psy commented 8 months ago

Hi Ajit,

Thank you for your reply. I don't mind whether the data is sent after the whole experiment or after each trial, as long as I can get participants' data. One thing I am not sure is that if it is only something about internet. Because some participants lost connection with JATOS, I did not receive their data after a certain number of trials. If it's only a problem with the internet, it seems like I would only lose some trial data.

I wonder which way you would recommend more: sending data after each trial or after the whole experiment? And do you have any other recommendations for sending data?

Could you please provide an example of how to implement jatos.httpRetry and jatos.httpRetryWait in the experiment? It might be a good idea to add arguments in the setting.ts file to adjust them.