-
Notifications
You must be signed in to change notification settings - Fork 28
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
sendState should behave asynchronously #134
Comments
@oliverfoster Any thoughts on this? |
The state is concurrently read in once and updated multiple times? How is an old state read in after an update is sent? What is the exact mechanism / order of flow? Strategically, it's best usually to add a "last updated" timestamp on the state. Such that only states that are newer than the local/previous are accepted as updates and retries are attempted on conflict. |
Basically its a one-button submit for all components:
|
Yes, I don't understand where a state is being read in and in conflict. I see that submitting multiple questions at the same time would rapidly send statements. |
Subject of the issue/enhancement/features
We have a custom plugin that forces submit of multiple components in one functional batch
(In essence:
)
When it comes to handling a large volume of components, we have found that this effectively creates a race condition and the state that comes back may actually not be the last state sent, thus cutting off some question values when the state is loaded again on subsequent views.
I believe setting an await on https://github.com/adaptlearning/adapt-contrib-xapi/blob/master/js/XAPI.js#L1082 should help us out in this regard
The text was updated successfully, but these errors were encountered: