Skip to content
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

docs: mention queueuing messages when no response #4176

Open
wants to merge 2 commits into
base: latest
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion articles/flow/advanced/server-client-communication.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ The `syncId` is always incremented by 1 after a new UIDL response is generated.

=== clientId

The `clientId` holds the latest communication state identifier given by the client. The client token is incremented on the client after sending the message. The server increments the value in the response to match the next expected `clientId` (i.e., client updated after message sent).
The `clientId` holds the latest communication state identifier given by the client. The client token is incremented on the client after sending the message, but only if the client has already received a response from the server to the previously sent message. Until this response has been received, the client attempts to resend the message until some kind of response is received, and the messages generated during that time are placed in a queue to wait. Once the server has received the message from the client, it increments the token value in the response to match the next expected `clientId` (i.e., client updated after message sent).

On the client, pending messages are removed from the queue as handled when `clientId` from server matches the next expected value. If the id is less than expected, the client waits since the server has not yet seen all messages. The response should arrive later. Otherwise, the client trusts the server and updates the id to the server's expectations.

Expand Down