Re: [Webpush] Message update PR

Costin Manolache <costin@gmail.com> Tue, 12 January 2016 01:04 UTC

Return-Path: <costin@gmail.com>
X-Original-To: webpush@ietfa.amsl.com
Delivered-To: webpush@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id E23BC1ACCEA for <webpush@ietfa.amsl.com>; Mon, 11 Jan 2016 17:04:34 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.999
X-Spam-Level:
X-Spam-Status: No, score=-3.999 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, GB_I_LETTER=-2, HTML_MESSAGE=0.001, SPF_PASS=-0.001] autolearn=ham
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id MoboAgEnWNAO for <webpush@ietfa.amsl.com>; Mon, 11 Jan 2016 17:04:32 -0800 (PST)
Received: from mail-oi0-x233.google.com (mail-oi0-x233.google.com [IPv6:2607:f8b0:4003:c06::233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id A51BF1ACCE8 for <webpush@ietf.org>; Mon, 11 Jan 2016 17:04:32 -0800 (PST)
Received: by mail-oi0-x233.google.com with SMTP id p187so45356695oia.2 for <webpush@ietf.org>; Mon, 11 Jan 2016 17:04:32 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=g/Xgl54Jfifzzgm5qnd6Q0gXkh2m7RSfMfuDFPMj40M=; b=a9UD62vYB76yDhTELkQlIB3AE8SrkmVMlUhIL19qunftmsLPzaclU6DpOxRy6RLjpq y3J9WCvNtEOmJ7oeX1y/ruqe/Erjs+2RfeN5ggzxD+RV6mbO+eCKfzSKLuV7Q0zAyq7/ DNl8PqH4m/3ja6ASED7ymTPlCmtQPkQf58TFLBgGYdNPHE+aMrArPHK3b/bJzekuRrBs Vzb12Rg7zhIX8PznIaLFwrFHIik5Jhhs6d6bkKGlhGLs5OBoK5Vkgs52MmtrpGQ80BCV gzV4KGQ64/oIDqVlIx1z28BkUfrfvCkEq3Z6oYcvw9p6BL6H1ZJvl4vUh7OHmMiw/nQx f2vQ==
MIME-Version: 1.0
X-Received: by 10.202.204.136 with SMTP id c130mr93699163oig.93.1452560671986; Mon, 11 Jan 2016 17:04:31 -0800 (PST)
Received: by 10.76.8.74 with HTTP; Mon, 11 Jan 2016 17:04:31 -0800 (PST)
In-Reply-To: <CABkgnnVmF0_tw5Yn2w9=QZwWAZmLGDt1bapv0bXWFtp17av_dw@mail.gmail.com>
References: <CABkgnnX-oO5yc58zp3CzLhsp8UQv_QW6RZw_xEPOd9nUukCoCg@mail.gmail.com> <BY2PR0301MB06470F90FC2A3801FEB0917983F70@BY2PR0301MB0647.namprd03.prod.outlook.com> <CAP8-FqkTkKSQHEHz=HREjkgAd_PuiUcEMLdTJT+fTY4uf_p0Rg@mail.gmail.com> <CABkgnnVmF0_tw5Yn2w9=QZwWAZmLGDt1bapv0bXWFtp17av_dw@mail.gmail.com>
Date: Mon, 11 Jan 2016 17:04:31 -0800
Message-ID: <CAP8-Fq=P3KQ4mAP=Ouycmn4vvNLB1n30pBf1aBaAJ30kqM-k3Q@mail.gmail.com>
From: Costin Manolache <costin@gmail.com>
To: Martin Thomson <martin.thomson@gmail.com>
Content-Type: multipart/alternative; boundary=001a1137b112de5b97052918a2da
Archived-At: <http://mailarchive.ietf.org/arch/msg/webpush/cxtXZ6RJOUSKzJOg42oNwo3uf-k>
Cc: Brian Raymor <Brian.Raymor@microsoft.com>, "webpush@ietf.org" <webpush@ietf.org>
Subject: Re: [Webpush] Message update PR
X-BeenThere: webpush@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: Discussion of potential IETF work on a web push protocol <webpush.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/webpush>, <mailto:webpush-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/webpush/>
List-Post: <mailto:webpush@ietf.org>
List-Help: <mailto:webpush-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/webpush>, <mailto:webpush-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 12 Jan 2016 01:04:35 -0000

On Mon, Jan 11, 2016 at 3:57 PM, Martin Thomson <martin.thomson@gmail.com>
wrote:

> On 12 January 2016 at 04:00, Costin Manolache <costin@gmail.com> wrote:
> > - +1 in general
> >
> > - Doubts about the name "Topic" - many pubsub users will be confused, it
> is
> > not really a topic,
> > just a key
>
> I'm happy to take suggestions on the name, it's just a name :)
>

'collapse_key' is what is used in GCM, I think having 'collapse' or
'override' or
'replace' or 'update' in the name would describe what happens.


>
> From my perspective however, the pubsub use fits almost perfectly with
> this use, so I think that the name is a bit of an advantage.
>

I don't think it fits so well.
If you publish 3 messages on a pubsub topic, you expect subscribers to get
3 messages,
not to have them all collapsed. And the topic is mapped to a list of
receivers, etc.

I know broadcast is not in scope for this release - but if/when we add it,
it will make things
more confusing with topic.


> > -  We may relax the '4 collapse keys' limit for GCM, shouldn't be a
> problem
> > for webpush.
>
> That would be awesome (I hear that collapse keys are very heavily used
> by some big sites, I wonder if you aren't already feeling the pressure
> there).
>

The intent of having just 4 keys was to encourage senders to use 'collapse'
just for sync,
and not attempt too much granularity. You tell the device to sync, with
some info (10 mails and 7 spams),
this gets updated while device is offline - and results in one sync that
fetches everything.

A single collapse key may have been better, to avoid confusion :-). At that
time it was not yet
clear how well things will work, and sync was the main use case. Most
senders with collapse
seem to be using a single key.



>
> > Can we change a bit the wording to allow some optimizations we do: a
> message
> > with topic (collapse
> > key) may be optimized for 'sync usage' - i.e. even if the device is
> online,
> > if push service detects
> > frequent messages in a topic (for example user receives lots of email) it
> > may delay and collapse
> > messages. I.e. not only " If the user agent is offline".
>
> That should always be possible.  If the text implies otherwise, then
> we should correct that.
>
> > Also I would prefer (for implementation purpose) a simpler ID syntax
> instead
> > of quoted string.
> > It's going to be a database key, short an unambiguous seems better. URI
> path
> > component would
> > be nice.
>
> Would the base64(url) alphabet suit you well enough?  I didn't add
> that restriction.
>
> What about a length restriction?  I think that Ben and I discussed
> just rejecting push messages with ridiculously long topic names.
>
>
Agreed, base64(url) with a reasonable size is good.

A 64-bit long or UUID would be great too. AFAIK most collapse keys are 2..4
letters ( mail, cl,
all, sync ...)



> > Finally, a more generic approach would be to allow the sender to specify
> a
> > MessageID - than
> > multiple messages with the same ID could override each other ( identical
> > with topic ), but the main
> > benefit is that senders will avoid a lookup and mapping push-service IDs
> to
> > their internal IDs in
> > acks. Push service can internally combine the subscription ID with the
> > sender-provided message ID.
>
> Maybe I'm not understanding you here, but isn't that exactly what this
> change does?
>

Not sure :-)

Current patch requires the messages to include the topic header, and it
still
generates 3 message IDs ( "creates a new push message resource")

Alternative would be to just allow updating the original resource, if it was
not sent.

BTW - there is one important change in the patch, allowing push senders to
DELETE
the resource. Allowing update would be consistent with that.


Costin