-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
survey: move server-side all conditional and validation checks (?) #858
Comments
@tahini What is the main advantage of doing that? |
Advantages:
Disadvantage:
|
I don't see any travel survey in the world where scalability would be an issue. so far, even with out biggest survey, we only had a few users at the same time. I'm giving number out of "feeling" here, but unless we have more than 5 users per minute, which would be 300 respondant per hour et thus 4800 per day, I won't even think about scalability! Even then, that's quite low numbers. A few extra thoughts: |
Here's another issue related to this #1, yes the very first issue in this repo!! |
Most of the paradata we have right now relate to timing, so this will make it easier to differentiate what comes from client intervention and automatic side effects and their timing will come from the server (as currently). But indeed, when we do have client-side paradata, like mouse movement and clicks, then we can think on how to send it. |
In a pass to cleanup and properly document redux actions (and what happens during their execution), it appears that there's a bit of gymnastic required because we have some values that are updated by the server (the
serverFieldUpdate
) and also validations that need to be done server side (like access code validation). Mechanisms were developed to support those and required a bit of changes client side, because at the time, we wanted to avoid breaking something that worked fine.Now that we are breaking everything anyway, how about we move all interview side-effect code, like validations and conditional checks, to the server. Anyway, whenever these are called in the
startUpdateInterview
there's a call to the server, except in the case where there are no changes, like when submitting a section, but typically, a callback is called at that moment and that callback makes a server call.What this implies is
evolution-frontend/src/actions/Survey[Admin].ts
and the files in the folderevolution-frontend/src/actions/utils
would need to go to the backend. Widget preparation would be done there. The server would return aRuntimeInterviewAttributes
object ready to be displayed.Thoughts?
The text was updated successfully, but these errors were encountered: