Subject: Re: [hybi] working group last call on draft-ietf-hybi-permessage-compression-04 (until November 14th)

From: Takeshi Yoshino <[email-masked]>
Date: Fri, 2 Nov 2012 14:32:27 +0900

Thank you for review, Peter.

On Thu, Nov 1, 2012 at 6:49 AM, Peter Thorson <[email-masked]> wrote:

> First a question: are there any existing implementations of
> permessage-compress (either client or server) suitable for me to test
> interoperability with?
>

pywebsocket server supports it. Tell me if you want to check your impl with
it.

> Regarding Extension Negotiation
> Section 3. Extension Negotiation describes the grammar of the list of
> compression method descriptions. It references `token` in the ABNF. Is
> token universally defined in ABNF? Or does token here refer to the
> definition of token from RFC2616(HTTP 1.1)? In RFC6455 (Websocket
> Protocol), which also uses RFC2616 tokens explicitly mentions this and
> cites RFC2616 for the definition of token.
>

Yes. They're constructions borrowed from RFC 2616. I'll add a reference and
citation mark ups.

> Overall, this section is largely similar to section 9.1 (Extension
> Negotiation) of RFC6455 except with less detail (specifically: no mention
> of the borrowed HTTP 1.1 semantics including critical reminders of things
> like the implied *LWS rules). If each extension is going to include the
> exact details of extension negotiation I'd suggest that it include all of
> this language.
>

OK. I'll do so (LWS, etc.).

>  Alternatively, a much simpler description of extension negotiation that
> refers the reader to RFC6455 section 9.1 for the details might be
> appropriate.
>

How about this?

OLD
   The grammar of the list is "requested-method-list" defined in the
following ABNFs.
   ...
NEW
   The ABNF for the list is the same as extension-list defined in the
Section 9.1 of [RFC6455] to define the grammar of the
Sec-WebSocket-Extensions header.

OLD
   Its grammar is "method-agreement" defined in the following ABNF.
   ...
NEW
   Its ABNF is extension defined in the Section 9.1 of [RFC6455] to define
the grammar of the Sec-WebSocket-Extensions header.

> Some minor english issues:
>

Thanks.

> *Some observations from my work implementing this extension*
>
> snip

> - Compression breaks a number of optimizations that servers can use to
> reduce CPU and memory usage like outgoing message
> preparation/de-duplication.
>

Do you mean that even if some part of frame construction (copying, etc.)
can be skipped, whole frame octets must always go through compressor and it
consumes CPU and memory?

---

From: Julian Reschke <[email-masked]>
Date: Fri, 02 Nov 2012 10:08:26 +0100

On 2012-11-02 06:32, Takeshi Yoshino wrote:
>     Section 3. Extension Negotiation describes the grammar of the list
>     of compression method descriptions. It references `token` in the
>     ABNF. Is token universally defined in ABNF? Or does token here refer
>     to the definition of token from RFC2616(HTTP 1.1)? In RFC6455
>     (Websocket Protocol), which also uses RFC2616 tokens explicitly
>     mentions this and cites RFC2616 for the definition of token.
>
>
> Yes. They're constructions borrowed from RFC 2616. I'll add a reference
> and citation mark ups.
>
>     Negotiation) of RFC6455 except with less detail (specifically: no
>     mention of the borrowed HTTP 1.1 semantics including critical
>     reminders of things like the implied *LWS rules). If each extension
>     is going to include the exact details of extension negotiation I'd
>     suggest that it include all of this language.
>
>

You will also need to include text that explains that you use RFC 
2616-style ABNF (instead of RFC 5234) -- or update it.

Did you actually check the ABNF with an ABNF parser yet?

Best regards, Julian

---

From: Takeshi Yoshino <[email-masked]>
Date: Mon, 5 Nov 2012 16:50:22 +0900

> 2616-style ABNF (instead of RFC 5234) -- or update it.
OK.

> Did you actually check the ABNF with an ABNF parser yet?
Not yet. I just did quick check by using http://www.anfdata.cz/bnfparser2/ but
with two more grammar line
  repetition     =  ([repeat] element) / ([list] element)
  list         =  *DIGIT "#" *DIGIT
and changing alternation symbol from "/" to "|".

Is there any convenient online checker with the ABNF constructions defined
in RFC 2616 predefined?

Thanks
Takeshi

---

From: Julian Reschke <[email-masked]>
Date: Mon, 05 Nov 2012 09:36:58 +0100

On 2012-11-05 08:50, Takeshi Yoshino wrote:
> On Fri, Nov 2, 2012 at 6:08 PM, Julian Reschke <[email-masked]
> <mailto:[email-masked]>> wrote:
>
>     ...
> Not yet. I just did quick check by using
> http://www.anfdata.cz/bnfparser2/ but with two more grammar line

Hu? What's that supposed to do?

> Is there any convenient online checker with the ABNF constructions
> defined in RFC 2616 predefined?

Online I don't think.  But there's source in 
<http://trac.tools.ietf.org/wg/httpbis/trac/browser/abnfparser/bap>

Best regards, Julian

---

From: Takeshi Yoshino <[email-masked]>
Date: Mon, 5 Nov 2012 18:08:36 +0900

On Mon, Nov 5, 2012 at 5:36 PM, Julian Reschke <[email-masked]>wrote:

>> <mailto:[email-masked]>**> wrote:
>>
>>
>> http://www.anfdata.cz/**bnfparser2/ <http://www.anfdata.cz/bnfparser2/>but with two more grammar line
To add RFC 2616 specific rules. #rule and (rule1 | rule2).

I didn't mean it's enough. Never mind.

> Online I don't think.  But there's source in <http://trac.tools.ietf.org/*
> *wg/httpbis/trac/browser/**abnfparser/bap<http://trac.tools.ietf.org/wg/httpbis/trac/browser/abnfparser/bap>
> >
>
>
Thanks.

---

From: Julian Reschke <[email-masked]>
Date: Mon, 05 Nov 2012 10:14:10 +0100

On 2012-11-05 10:08, Takeshi Yoshino wrote:
> On Mon, Nov 5, 2012 at 5:36 PM, Julian Reschke <[email-masked]
>         On Fri, Nov 2, 2012 at 6:08 PM, Julian Reschke
>         <[email-masked] <mailto:[email-masked]>
>         <mailto:[email-masked] <mailto:[email-masked]>>__>
>         wrote:
>
>
>         http://www.anfdata.cz/__bnfparser2/
>         <http://www.anfdata.cz/bnfparser2/> but with two more grammar line

Oh - that would add the rules to the grammar of ABNF, not the grammar of 
the field definition (as least it looks like that).

>     <http://trac.tools.ietf.org/__wg/httpbis/trac/browser/__abnfparser/bap
>     <http://trac.tools.ietf.org/wg/httpbis/trac/browser/abnfparser/bap>>
>
>
> Thanks.

I would recommend to either copy the language from the base spec (and 
use the same ABNF variant), or alternatively normatively reference 
HTTPbis, Part1.

Best regards, Julian

---

From: Takeshi Yoshino <[email-masked]>
Date: Wed, 7 Nov 2012 12:15:32 +0900

> the field definition (as least it looks like that).

Yes. What I did is
- add them to the left box of the "Grammar" section of
http://www.anfdata.cz/bnfparser2/
- pasted the permessage-compression ABNF to "Input string"
- clicked "PARSE" to check the validity of the ABNF.

>>     <http://trac.tools.ietf.org/__**wg/httpbis/trac/browser/__**
>> abnfparser/bap<http://trac.tools.ietf.org/__wg/httpbis/trac/browser/__abnfparser/bap>
>>     <http://trac.tools.ietf.org/**wg/httpbis/trac/browser/**
>> abnfparser/bap<http://trac.tools.ietf.org/wg/httpbis/trac/browser/abnfparser/bap>
>> >>
>>
>>
>> Thanks.
>>
>
>
Checked the ABNF using bap @ httpbis.

>From http://tools.ietf.org/html/draft-ietf-httpbis-p1-messaging-21, copied
these rules to core.abnf.

tchar          = "!" / "#" / "$" / "%" / "&" / "'" / "*"
               / "+" / "-" / "." / "^" / "_" / "`" / "|" / "~"
               / DIGIT / ALPHA
               ; any VCHAR, except special
token          =  1*tchar
quoted-string  =  DQUOTE *(qdtext / quoted-pair) DQUOTE
OWS            =  *( SP / HTAB )
qdtext         =  OWS / %x21 / %x23-5B / %x5D-7E / obs-text
obs-text       =  %x80-FF
quoted-pair    =  "\" ( HTAB / SP / VCHAR / obs-text )

and parsed these ABNFs in the permessage-compress I-D successfully.

requested-method-list = 1#method-desc
method-desc = method-name *( OWS ";" OWS method-param)
method-name = token
method-param = token ["=" (token / quoted-string)]

the result is:

requested-method-list =  *( "," OWS ) method-desc *( OWS "," [ OWS
method-desc ] )
method-desc = method-name *( OWS ";" OWS method-param )
method-name = token
method-param = token [ "=" ( token / quoted-string ) ]

using this result (together with the rules copied to core.abnf), checked
examples in the permessage-compress I-D at http://www.anfdata.cz/bnfparser2/

All passed.

> I would recommend to either copy the language from the base spec (and use
> the same ABNF variant), or alternatively normatively reference HTTPbis,
> Part1.
>
>
OK.