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

client-batch: allow sending PONGs? #553

Open
JustAnotherArchivist opened this issue Sep 2, 2024 · 0 comments
Open

client-batch: allow sending PONGs? #553

JustAnotherArchivist opened this issue Sep 2, 2024 · 0 comments

Comments

@JustAnotherArchivist
Copy link

This was brought up on IRC a little while ago, but the discussion died down rapidly and I noticed it wasn't mentioned anywhere here. I'm filing this so it isn't forgotten and mostly summarising the discussion from June.

The current client-batch spec draft states that:

Once a client has opened a batch, it MUST NOT send any messages that are not part of the batch, until it is closed (with BATCH -reference-tag).

What happens if the client receives a PING while sending a batch? The above means that it can't send the PONG until the client batch is done, which might take longer than the ping timeout. The server would have to account for this in some way. One strategy is to treat any message from the client as a PONG equivalent with regards to ping timeouts (Ergo does this). However, this is definitely not universal. Many real-world servers in fact explicitly do not do that, and timing out while sending lots of messages is not unusual. For that reason, non-trivial clients usually have a message queue and bypass the queue for sending PONGs, but that'd break the client-batch requirement above.

The obvious simple solution would be to permit PONG in the middle of client batches. Another approach would be to prescribe that, at least while a client batch is active, the server must behave as described above, i.e. treat the receipt of any client message as a PONG if it is waiting for one. But that seems a lot messier to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant