?

Log in

No account? Create an account

Protocol design question - Journal of Omnifarious

Jan. 27th, 2007

11:58 am - Protocol design question

Previous Entry Share Next Entry

Comments:

From:srlamb
Date:January 28th, 2007 02:49 am (UTC)

Re: What's the goal of coalescing chunks?

(Link)
Hmm, I still don't understand what you mean by flexibility. Without changing the structure of the chunks, it seems like they should be able to store uncoalesced chunks concatenated together, multiple headers and all.
(Reply) (Parent) (Thread)
[User Picture]
From:omnifarious' OpenID account [omnifarious.org]
Date:January 29th, 2007 12:17 am (UTC)

Re: What's the goal of coalescing chunks?

(Link)

Yeah, you're right. *thumps head* Sometimes you just get caught in stupid thought traps.

(Reply) (Parent) (Thread)
[User Picture]
From:omnifarious
Date:January 30th, 2007 11:27 pm (UTC)

Re: What's the goal of coalescing chunks?

(Link)

Oh, I just remembered the real reason... :-) I don't want people who use the protocol to be able to make assumptions about chunk lengths being preserved. If the chunk lengths are forced to be preserved by the nature of the protocol, then it would be very tempting to use that fact.

I think I will be using your solution with short MACs. I'll just use a 16 bit MAC as a health check along the way, and a full MAC at the end. The MACs will not include message lengths, but truncation will be prevented because an intermediary will not be able to extend a short MAC into a full MAC to use at the end.

I don't know whether or not the intermediate health checks are useful. But I feel better putting them in, and they shouldn't be that big an efficiency burden given that the message header will typically be more than a hundred bytes anyway.

(Reply) (Parent) (Thread)