Skip to content

client-batch: allow sending PONGs? #553

@JustAnotherArchivist

Description

@JustAnotherArchivist

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions