Can't we depend on TCP's Nagle algorithm to do this coalescing for us?
>
> if you're doing per-page status updates, you're going to
> be sending at least one packet per page regardless of whether
> you use TCP or UDP. the difference would be that each packet
> sent in TCP would be acknowledged by the receiver, in
> most cases doubling the number of packets sent over the link.
Why would the receiver acknowledge each packet? I thought the receiver
was supposed to ack the longest contiguous prefix of the stream that
has been received correctly -- a cumulative acknowledgement scheme.
Therefore there may only be one ACK for multiple segments transmitted.
I thought one ACK for two segments is typical.
> for most kinds of links you are concerned about minimizing
> bandwidth (rather than packets) or delay (to improve response
> time for interactive applications). the latter doesn't apply
> in this case. as for users of links that charge per-packet,
> they can avoid the problem by not requesting per-page status updates.
>
> if you're doing less frequent notifications (like job completion
> notifications), the volume of data is less, but in this you probably
> do want reliable delivery and acknowledgement. an RPC-like protocol
> layered on UDP would work. but if you're only sending a single
> notification per print job, it's probably not worth the savings.
>
> so offhand, as long as IPP notifications can nearly always occur in a
> single TCP session and a single HTTP transaction per print job
> (and especially if it can be piggybacked in the same HTTP/TCP session
> used to submit the print job), I can't make a strong case for using
> UDP for IPP notifications, or even for supporting it as an option.
>
> of course, if there's an important case that I'm missing, let me know.
>
> (just in case the http session gets disconnected, you probably will
> want to have the capability of reconnecting, but it should be
> the exception rather than the rule. and you need to define what
> happens in this case - do you replay all status messages since
> the start of the print job or do you just replay those issued after
the
> start of that http session?)
>
> hope this helps,
>
> Keith