[aerogear-dev] WebPush - register/create-channel

Daniel Bevenius daniel.bevenius at gmail.com
Tue Dec 2 03:13:39 EST 2014


>right and the URI, returned to the 'user agent' can be stored on your
'application', like UPS.
No. The WebLink URL of type "push:channel" returned from the registration
request is not shared. When an application requests a channel, the device
uses the "push:channel" URL to create a new channel for the application.
This channel creation request will contain a "Location" header with the URL
that the application will share with a backend, enabling it to send
notifications.

>I wonder why I (being a device/user-agent) explicitly have to create that
channel.
I think the spec needs to cater for the ability to have a single web
browser case where there a service worker serves multiple applications. For
a mobil device it might not make sense to have this shared, and in this
case the API can hide the registration. From the end users point of view it
could be seen as only a register, something like:
http://w3c.github.io/push-api/#example

>Not sure, but I think it might be useful to have an unmonitor, to quite
the abo of some content, e.g. at some point  #Rihanna might get boring :-)
If that is the case then I think you can delete the channel. Since the
"device" is not specific to a single applications (it could be serving
multiple) it still need to be monitoring to receive notifications for other
channels.

>Or am I having a misunderstanding of the concept here ?
Well if you are, then it is me doing a bad job at explaining/describing
things. I should say that I'm still learning and might not have correct
answers for things yet.




On 2 December 2014 at 08:49, Matthias Wessendorf <matzew at apache.org> wrote:

>
>
> On Tue, Dec 2, 2014 at 8:40 AM, Daniel Bevenius <daniel.bevenius at gmail.com
> > wrote:
>
>> >Not sure I get why that is not created on default. When I am not doing
>> the create-channel, an 'application' (e.g. curl or UPS) has no location to
>> send a >payload for the device, right?
>> My understanding is that the device registers not the application, which
>> for example could be a web browser/user agent.
>>
>
> right and the URI, returned to the 'user agent' can be stored on your
> 'application', like UPS.
>
> I wonder why I (being a device/user-agent) explicitly have to create that
> channel.
>
>
>
>> It will then create channels for potentially multiple applications.
>>
>
> ok, I see that a few extra 'creates' are needed, for multiple channels.
> But what's the use case of a register without creating a channel? Just
> simply to monitor on an existing or different channel ?
>
>
>> In the case of usage with the Push-API, a service worker would handle the
>> interaction with the WebPush server and hand out channels to applications.
>> It would also be responsible for handling the inbound notifications, and
>> can take different actions depending on the state of the webapp (post it to
>> an open window, store it, show notification).
>>
>> >Can a device have multiple monitoring channels? (e.g. channels per
>> topic, like #Rihanna #ZZtop #ACDC ? Can a device 'un monitor' ?
>> I think that an application would create separate channels for topic it
>> requires.
>> Not sure about unmonitoring. I've not see anything about that (unless I
>> completely missed it)
>>
>
> Not sure, but I think it might be useful to have an unmonitor, to quite
> the abo of some content, e.g. at some point  #Rihanna might get boring
> :-)
> Well, sue I can still 'ignore' it in my code of the service-worker, but
> would be nice if that guy was no longer bothered :)
>
> Or am I having a misunderstanding of the concept here ?
>
>
>
>
>>
>>
>>
>>
>>
>> On 1 December 2014 at 17:49, Matthias Wessendorf <matzew at apache.org>
>> wrote:
>>
>>> Hi,
>>>
>>> after performing register, I get URIs for my channel/monitor, like:
>>>
>>>
>>> register
>>>  [streamid:3] ChannelLink:
>>> webpush/7df2add5-ec4b-42a2-805f-5f8fcf8faa96/channel, MonitorLink:
>>> webpush/7df2add5-ec4b-42a2-805f-5f8fcf8faa96/monitor
>>>
>>>
>>> I wonder why I do have to explictly create the channel?
>>> create-channel webpush/7df2add5-ec4b-42a2-805f-5f8fcf8faa96/channel
>>>
>>> Not sure I get why that is not created on default. When I am not doing
>>> the create-channel, an 'application' (e.g. curl or UPS) has no location to
>>> send a paylload for the device, right?
>>>
>>>
>>>
>>> Can a device have multiple monitoring channels? (e.g. channels per
>>> topic, like #Rihanna #ZZtop #ACDC ? Can a device 'un monitor' ?
>>>
>>>
>>> Thanks :-)
>>>
>>>
>>> --
>>> Matthias Wessendorf
>>>
>>> blog: http://matthiaswessendorf.wordpress.com/
>>> sessions: http://www.slideshare.net/mwessendorf
>>> twitter: http://twitter.com/mwessendorf
>>>
>>> _______________________________________________
>>> aerogear-dev mailing list
>>> aerogear-dev at lists.jboss.org
>>> https://lists.jboss.org/mailman/listinfo/aerogear-dev
>>>
>>
>>
>> _______________________________________________
>> aerogear-dev mailing list
>> aerogear-dev at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/aerogear-dev
>>
>
>
>
> --
> Matthias Wessendorf
>
> blog: http://matthiaswessendorf.wordpress.com/
> sessions: http://www.slideshare.net/mwessendorf
> twitter: http://twitter.com/mwessendorf
>
> _______________________________________________
> aerogear-dev mailing list
> aerogear-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/aerogear-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/aerogear-dev/attachments/20141202/7e3c85ce/attachment.html 


More information about the aerogear-dev mailing list