Subject: [Webpush] Niceness or urgency of messages #28

From: Brian Raymor <[email-masked]>
Date: Sat, 20 Feb 2016 01:44:04 +0000

I've create a first draft of changes for https://github.com/webpush-wg/webpush-protocol/issues/28. The pull request is available for review at - https://github.com/webpush-wg/webpush-protocol/pull/78

...Brian

---

From: Martin Thomson <[email-masked]>
Date: Fri, 19 Feb 2016 18:34:26 -0800

Thanks for putting this together Brian.

I think that this would be easier to explain if the numbers were
switched for tokens.  Maybe: high, normal, low, super-dooper-low.
(Similar values are defined for the now-defunct Priority field for
mail, apart from the last).

Also, I think that it might pay to note that this header field is not
forwarded to user agents.

On 19 February 2016 at 17:44, Brian Raymor <[email-masked]> wrote:
> _______________________________________________
> Webpush mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/webpush

---

From: Brian Raymor <[email-masked]>
Date: Sat, 20 Feb 2016 06:00:56 +0000

> mail, apart from the last).

I went old school with - http://tools.ietf.org/rfc/rfc577.txt - which we could (almost) have reused:

   Now that I have argued all that, let me suggest interpretations for
   urgency values.  This is so that programmers can have automata-
   generated mail (e.g., notification of the status of previously sent
   mail) carry reasonable urgency values:

      10  Phone in the middle of the night, if necessary.
       9
       8  Deliver to user's terminal NOW.
       7
       6  Deliver to user's terminal only if user is at "exec"
          level.
       5
       4  Deliver immediately after sign-on or before sign-off.
       3
       2  Deliver into standard mailbox.
       1
       0  Junk Mail

I really love "Phone in the middle of the night ...". I would also prefer strings for
self-documentation, but was concerned about the potential lack of clarity related
to ordering in statements such as:

   The push service MUST only deliver messages with an urgency *greater than
   or equal to* the value of the header field.

I also explored similar use cases and noted that the SIP priority header field
registered values:

  "emergency" | "urgent" | "normal" | "non-urgent" 

    http://www.iana.org/assignments/sip-parameters/sip-parameters.xhtml#sip-parameters-73

but this provoked similar concerns about the need for "explicit statement[s] about the ordering of these values" and:

    "This constant use of specific English words rather than numeric values is 
    causing the protocol and its processing to become less efficient and is 
    leading to complications in the definition ..."

     http://www.ietf.org/mail-archive/web/sip/current/msg01441.html

Unfortunately, I could not find a response for the rest of the discussion. I'm definitely open to suggestions about the best way to ensure that this is clear to implementers.

> forwarded to user agents.

Good point. I'll include that in the next commit.

---

From: Martin Thomson <[email-masked]>
Date: Fri, 19 Feb 2016 22:48:09 -0800

Ordering is easy: define the order.

> Unfortunately, I could not find a response for the rest of the discussion. I'm definitely open to suggestions about the best way to ensure that this is clear to implementers.

That is usually a sign that the mail was not taken seriously.  We use
string-based enumerations all the time today.  They have great
extensibility properties, they read well (though mostly for English
speakers, I will conceded), and they don't cost any significant amount
to implement.

---

From: Brian Raymor <[email-masked]>
Date: Tue, 23 Feb 2016 00:42:27 +0000

I've updated the pull request with Martin's feedback.

Please let me know if there's further feedback to incorporate.

...Brian