-
Notifications
You must be signed in to change notification settings - Fork 11
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
Several sources of truth about contest start #178
Comments
Why it's a problem: |
According to the spec This means the following:
In other words, What you describe sounds like bugs in the systems. I suggest we close this issue as there is IMO nothing to fix in the spec. |
I think this is/should be actually a bug: once
The only practical issue I can see is that for a brief amount of time after contest start there's a discrepancy, or the event feed delivering the state change event is behind. But this should not take more than milliseconds normally.
I agree. Just wondering if we should say anything about |
I disagree that this is a bug as the spec is currently written. Maybe an argument could be made that we should specify that the "scheduled" start time can't be set in the past? This would imply that when the current time reaches
Agreed, that is bot a bad idea to clarify.
I definitely think we should not go there. Event delivery really can't be controlled by the server (at all). |
But we do say:
I know it says may, but I find this a bit inconsistent. But we could easily clarify this. |
The main reason I think it's worth fixing on the spec level is the general principle of making less illegal state representable. Even if we say that such states are a bug in ccs, the client still needs to be able to handle them because non-atomic updates between different endpoints are non-atomic, so you can observe such states. Another problem is that if there is a ccs bug, it's very hard for the client's end-user to understand, especially if they run into such a problem the first time, because some random parts, which don't depend on "if the contest is running," are still working. So I would say, while the specification is consistent and unambiguous here, maybe we still should change it, to make both server and client less error prone. |
It really is not "inconsistent". Inconsistent would imply that it's overspecified, and it's possibly a bit underspecified. Specifically, if the contest does not actually start when scheduled, the current spec allows for either null or the old scheduled time. The advantage of the current (arguably maybe unspecified) requirements is that it is possible to implement. If we fix this by requiring that |
What change are you suggesting? |
Move It would still force some clients to deal with inconsistencies (e.g. timer should probably start contest on scheduled time optimistically, even without state event, as it just looks better). But in much more predictable way. |
I agree that it would have the benefit you claim. I really don't like it. It will break our categorization of data. I would much rather make it much more clear that
How is that an inconsistency? (I feel there is a lot of misuse of the term "inconsistent" in this thread) |
FWIW, I think the spec is fine in what it actually enforces today and I don't think we should remove or change the requirements of either field. The distinction between configuration and state is an important one. But I do think we could improve the descriptions to make it clearer for both implementers and clients. From previous discussions, the intent was that When you look at it this way it's easy to see that something like a schedule or countdown should be based on |
Ah, I see. That division of data (configurable vs unconfigurable) also makes sense. The one I was mostly thinking about is "can/can't reasonably change after contest was set up". Let's argree on just clarifying some parts suggested above, without changing required semantics. |
There are currently two ways of implementing check if the contest has started:
start_time
reported by contest endpoint already passedstarted
in state is not null.It's unclear what it means if they are inconsistent, e.g. :
Maybe it would be better to unify it into being part of the only the state (but not contest). We can also consider moving hold_time.
In that case there would be two separated concepts:
contest
is the description of permanent contest properties (length, freeze length, rules, names, etc.)state
is the description of changing properties (start_time can be rescheduled, held time is temporary, etc.)The may disadvantage I see is that some clients can now need both
state
andcontest
, while before only thecontest
would be enough.The text was updated successfully, but these errors were encountered: