Repository navigation
Retry answers, order them per phone, and send phones totals only - #12
Open
irinanazarova wants to merge 1 commit into
Open
irinanazarova wants to merge 1 commit into
irinanazarova wants to merge 1 commit into
Conversation
An answer request had no timeout, so on wifi that accepts a connection and then carries nothing the phone stayed on "Sending..." with its buttons disabled. Each attempt is now aborted after 8 seconds and retried twice on a network error, timeout or server error. Each answer carries a seq that increases per phone and survives a reload; quiz-answer forwards it, and the presenter ignores an answer older than one it already counted from that phone. The sync broadcast carries only each question's total, which is all phones display, so a busy free-text question no longer sends its whole tally to every phone.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Three changes from comparing slide-quiz with other realtime voting apps.
A hung answer request no longer leaves the phone on "Sending...". The answer request had no timeout, and the audience page disables the buttons until it settles. Each attempt is now aborted after 8 seconds; network errors, timeouts, 408, 429 and 5xx are retried twice (about 1 and 2 seconds later, with jitter). A 4xx is not retried. The error is reported once, after the last attempt.
The presenter ignores an answer that arrives after the same phone's newer one. Every answer carries a
seq(increasing per phone, saved in sessionStorage so it survives a reload and a clock that moved back). Retries reuse it.quiz-answerforwards it, and the presenter saves it with each session's vote. Answers withoutseq(older functions) are counted in arrival order, as before.Phones get totals only. The sync payload sends
{ votes: {}, total }per question, since phones display only the total. The shape is unchanged, so 0.7.2 audience pages accept it.Compatibility:
@0.7CDN range) with old functions: valibot strips the extraseq, so answers go through unchanged.seqis ignored.votesfromParticipantQuizManagernow gets{}. This is in the changelog.Tests: