Run server-side code
Dear Jatos team,
I was wondering if Jatos supports running server-side code. For many computations, it would be saner to have them run on the server rather than on the client's side (not only bonus computation but also a deterministic allocation of users to conditions, adaptive experiments, etc.).
Maybe something similar to https://psiturk.readthedocs.io/en/latest/customizing.html#example-automatically-computing-performance-bonus ?
In my case, I would like to avoid having any participant tampering with the code to get a higher bonus.
Thank you in advance.
Best wishes,
Juliana
Comments
Dear Juliana,
that’s an interesting point. The short answer is no, at the moment this is not possible.
I looked at the psiturk documentation and didn’t understand completely what they describe there, but it sounds as though the client basically gets access to the database. That sounds like a pretty bad idea: an ill-intended participant could even delete the whole dataset you’ve collected.
We will think about including something like this in the future, but for now: if your concern is specifically about the bonus, I think that the safest, lo-tech solution is to calculate it yourself, offline. You’re presumably not paying bonuses programmatically to participants, so why get into all the trouble? Ultimately, any solution will give the client side some control over the results and bonuses so it won’t be bulletproof (but as I said maybe I didn’t fully understand the solution from psiturk).
You could also consider minifying or obfuscating your JavaScript. It’s of course no solution, because it’s easy to find a workaround to recover the original code but it takes one extra step.
Best
elisa