[aerogear-dev] Web Push.... (was: Re: AeroGear Native Push Server (DRAFT 0.0.2))

Lucas Holmquist lholmqui at redhat.com
Wed Mar 27 10:44:31 EDT 2013


so something like this then

//client init
//a request to the registration server endpoint, with an id? or maybe we don't need one

//the server
server.post( "/register/:id", function( req ) {
  var user = {
    id: req.params().id,
    channels: [
        "com.new.feed." + req.params().id,
    ]
  };

//Gets stored somehow,
  channels.push( user );

//send back the subscribed channels to the user
response.send( user );

//client gets the response
//client subscribes to the channels that were sent back




On Mar 27, 2013, at 10:30 AM, Matthias Wessendorf <matzew at apache.org> wrote:

> On Wed, Mar 27, 2013 at 11:29 AM, Matthias Wessendorf <matzew at apache.org> wrote:
>> the REST API would be like:
>> 
>> https://gist.github.com/matzew/2da6fc349a4aaf629bce#mobile-web-applications
> 
> 
> Of course ... something like
> 
>     {"channels":["com.news.feed","notifications"]}
> 
> 
> would be a bit too generic.....
> 
> I think.... order to have these channel really for one web app (and
> it's connected clients), these channel names need to be prefixed with
> a uniqure ID...
> 
> 
> 
> I have updated the gist.....
> 
> https://gist.github.com/matzew/2da6fc349a4aaf629bce#unique-channels-per-web-app
> 
> 
> 
>> 
>> 
>> I think... that we should require at least one channel....
>> 
>> With a _LATER_ update (PUT) we can always add new channels;
>> 
>> 
>> -Matthias
>> 
>> On Tue, Mar 26, 2013 at 8:22 PM, Matthias Wessendorf <matzew at apache.org> wrote:
>>> oh, yeah... :)
>>> 
>>> there are 'subscription' channels for those 'online' clients -
>>> 
>>> a (mobile) web app can have n channels to receive different messages
>>> 
>>> A REST Api to regsiter channels for a (mobile) web app (with the
>>> server) will follow
>>> 
>>> On Tue, Mar 26, 2013 at 8:16 PM, Matthias Wessendorf <matzew at apache.org> wrote:
>>>> Hi,
>>>> 
>>>> for web based notifications, I thought about this interface:
>>>> https://github.com/matzew/ag-up-poc/blob/master/src/main/java/org/jboss/aerogear/push/api/WebApplication.java
>>>> 
>>>> 1)
>>>> The interface extends this
>>>> (https://github.com/matzew/ag-up-poc/blob/master/src/main/java/org/jboss/aerogear/push/api/MobileApplication.java)
>>>> 2)
>>>> in here the "instances" are (on native) all installed applications - I
>>>> think for WebApp that "instances" should be all "online / connected"
>>>> clients
>>>> 
>>>> 
>>>> Also.... the notifications are really more like 'you have mail'...
>>>> 
>>>> While systems like SockJS/WebSocket (and others) can send/receive
>>>> large messages - the notification is really a notify...
>>>> (current mindset)
>>>> 
>>>> -Matthias
>>>> 
>>>> 
>>>> On Tue, Mar 26, 2013 at 4:22 PM, Douglas Campos <qmx at qmx.me> wrote:
>>>>> 
>>>>> 
>>>>> On 26/03/2013, at 12:13, Matthias Wessendorf <matzew at apache.org> wrote:
>>>>> 
>>>>>> Right now, this is /NOT/ a spec - nor a guide.... Perhaps I keep it this way, for now ??
>>>>> 
>>>>> ?YES!
>>>>> 
>>>>> --
>>>>> qmx
>>>>> 
>>>>> 
>>>>> _______________________________________________
>>>>> 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
>>> 
>>> 
>>> 
>>> --
>>> Matthias Wessendorf
>>> 
>>> blog: http://matthiaswessendorf.wordpress.com/
>>> sessions: http://www.slideshare.net/mwessendorf
>>> twitter: http://twitter.com/mwessendorf
>> 
>> 
>> 
>> --
>> Matthias Wessendorf
>> 
>> blog: http://matthiaswessendorf.wordpress.com/
>> sessions: http://www.slideshare.net/mwessendorf
>> twitter: http://twitter.com/mwessendorf
> 
> 
> 
> -- 
> 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




More information about the aerogear-dev mailing list