Comment by hombre_fatal

Comment by hombre_fatal 2 days ago

10 replies

I don't get what this achieves since the whole reason they sent you "hello" is that they want a TCP handshake before they get on with it. So sending hello back just acks the message and they will proceed which is what they wanted.

The annoyance in TFA is that you have to do the handshake at all.

hiAndrewQuinn 2 days ago

Actually, when you put it like that, sending 'hello' back might be the best thing you could do. They sent you a SYN, you send back and ACK, then the real conversation can begin.

I suddenly no longer agree with TFA. This makes way more sense to me in this light.

  • hombre_fatal 3 hours ago

    Right, but the problem is that with async communication, you don't need a synchronous ack handshake.

    Instead you can pipeline both messages: `[hello][are you coming to lunch with us?]`, and that's more convenient and efficient for the receiver and sender.

    The problem that TFA is referring to is that context switching is very expensive for the receiver, so without pipelining, the receiver pays a huge cost just to send back the ack and then again to finally reply to the payload once it is sent. The receiver is asking that you send all messages; it prefers to buffer them.

  • quietbritishjim 2 days ago

    In what way is that better than "Hello. How do I do x?" If they never reply, that's of no practical difference from just sending "Hello" and not getting a reply.

    In TCP, it's useful because it happens in a different layer of abstraction. Even then, QUIC was developed (partly) because it was realised there's no point waiting for the full SYN / SYN ACK / ACK before starting some of the higher-level exchange (although the early data transfer in QUIC is used for TLS initiation rather than application-level data).

    • hiAndrewQuinn 2 days ago

      It's better because X might take a while to write correctly, and you might want some assurance that you have the other person's full attention first before you even send that message. It's a commitment mechanism of sorts.

      • andelink 2 days ago

        This doesn’t make sense to me. What does it matter if you have their attention first? It’s asynchronous communication. I find it so damn rude to demand my attention first before you begin typing out a long message. Like do you want me to watch the chat bubble animation while you type or something?

  • kevindamm 2 days ago

    The relevance of TFA is that this only works if the initiating party is still connected, and to make matters worse there is no ERR_SOCKET_CLOSED returned by most chat clients if that party got distracted before seeing the ACK. Then minutes or hours later they get back "hey sorry, missed your reply, ${QUERY}"

    when they could have just included `${QUERY}` in the initial send, or at least `framing(${QUERY})`.

    • [removed] 2 days ago
      [deleted]