[aerogear-dev] SimplePush Polyfill Changes

Daniel Bevenius daniel.bevenius at gmail.com
Fri Jul 26 10:19:37 EDT 2013


I think this sounds reasonable.


On 26 July 2013 16:15, Kris Borchers <kris.borchers at gmail.com> wrote:

> Hey all,
>
> Before I make a change to this polyfill I wanted to make sure there were
> no concerns or objections. Basically, what I want to do is change the usage
> so that calls to navigator.push.register() or
> navigator.push.registrations() (not yet added) would have to be done after
> a connection is established. Currently, a user can call either of those
> methods at any time which causes headaches when trying to account for
> registrations that happen before the connection and also register
> previously used channels stored in localStorage. Just as an FYI, this is
> not an issue for Mozilla because they already know they have a connection
> when their JS executes because the browser creates the connection during
> startup. I have done a LOT of work to try to account for race conditions
> which may occur and in the process added a LOT of extra code. And even with
> all of that work, I'm still not 100% sure that all race conditions have
> been accounted for once this code is used at scale with lots of connec!
>  tions.
>
> So what am I suggesting? I would like to require our users to create a
> connection to the SimplePush server and do their interactions with that
> server in the success (or onConnect or what ever we want to call it)
> callback. After that, all code would be identical to the Mozilla APIs.
> Then, we could just write a brief guide or tutorial on transitioning code
> between our implementation and Mozilla's to highlight the small difference.
>
> Thoughts?
> _______________________________________________
> 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/20130726/9e4df8e7/attachment.html 


More information about the aerogear-dev mailing list