Great to hear that you guys are interested in collaborating a bit with us! We are really excited about what we have so far and where we want to go with this to hopefully help bring SimplePush to the browser. I have added our developer mailing list to the CC.

Another repo we wouldn't mind you taking a peek at is the client side polyfill stuff I have been working on here https://github.com/aerogear/aerogear-js/blob/Notifier/src/simple-push/aerogear.simplepush.js and the bit that does most of the work is here https://github.com/aerogear/aerogear-js/blob/Notifier/src/notifier/adapters/simplePush.js. It currently lives on a branch for the new Notifier bits I am adding to AeroGear.js for some API unification for different messaging protocols. Basically what we are doing is using websockets (or a fallback) via SockJS and storing some channel info in localStorage for re-registration, etc.

Any and all feedback would be appreciated. Even if it's "You're crazy! Don't do that! Do this!" :)

Thanks and also excited to be able to work with you on this as well!

On Jun 4, 2013, at 10:30 AM, JR Conlin <jrconlin@mozilla.com> wrote:

We have push-notifications@mozilla.org, however that list is not widely used. I wouldn't mind adding it as a CC to the discussion, however.

I'm fine using your public mail list, if you don't mind me pointing to it from our wiki pages or summarizing discussion points there.

Neat, you're implementing a netty version. I'll have to dig into it and see how you're building that out.

I should also probably mention that to get things up to large scale, the go version I built does a few things different than the strict spec says. <https://github.com/jrconlin/pushgo>

1. The server doesn't really care that much about valid channelIDs.
As you know, when you start to have to deal with very large numbers of connections, you really want to reduce your data storage dependencies. Since SimplePush is a "best effort" system (we're not guaranteeing delivery of messages in all cases since that's prohibitively expensive), we merely collect channelIDs for a given UAID and report them to the client on flush. This allows us to not have to do a data fetch, since the client will discard any unknown channelID, passing those values to the client does not cause user facing issues. I can prevent random "griefing" from malicious users by using a simple AES hash on the endpoint. If the hash fails to decrypt, I don't even bother trying to store anything.

I also don't report back failures to PUT requests. The less information that I give malicious parties, the better, and legit parties will always get the same result.

2. I take advantage of memcache's self expiring records to auto-prune entries. Legit notifications live for 3 days. This is based on the idea that notifications tend to be fairly ephemeral and you probably don't really care if an accident slowed down your commute home last Thursday.

We're excited that you want to contribute and look forward to working with you.

On 2013/6/4 5:20 AM, Erik Jan de Wit wrote:
Forgot to add these guys

Cheers,
Erik Jan

Begin forwarded message:

*From: *Erik Jan de Wit <erikjan.dewit@gmail.com
<mailto:erikjan.dewit@gmail.com>>
*Subject: **Re: Firefox OS App Day*
*Date: *June 4, 2013 8:48:26 AM GMT+02:00
*To: *jr conlin <jrconlin@gmail.com <mailto:jrconlin@gmail.com>>
*Cc: *Nikhil Marathe <nmarathe@mozilla.com
<mailto:nmarathe@mozilla.com>>, JR Conlin <jrconlin+moz@gmail.com
<mailto:jrconlin+moz@gmail.com>>

Hi,

Great to hear from you, we are building something based on the specs
that you wrote. The idea is that this will serve as a polyfill we have
a server as well
https://github.com/danbev/aerogear-simplepush-server To be able to
stay in sync with what you are doing we need have some additional
questions is it ok for you to have a discussion on our public mailing
list?

Cheers,
Erik Jan

On Jun 2, 2013, at 8:46 PM, jr conlin <jrconlin@gmail.com
<mailto:jrconlin@gmail.com>> wrote:

Hi Erik Jan,

Yes, we're the folks you probably want to talk to. Nikhil works on
the Client portion (the elements that run on the device or browser),
and I work on the Server portion.

We'd love to hear your questions, since we've been fairly deep into
this for a while and it's always good to have folks point out the
confusing bits.

I can tell you that a bunch of the more confusing elements might go
away if we note that SimplePush isn't supposed to be 100% guaranteed
delivery, but "Best Effort". Doing 100% guaranteed is very expensive
from a hardware and software point of view and costs tend to
seriously escalate once you get past a few hundred users. Instead,
the system tries it's best to send a dataless "ping" to the device,
in many cases, leaving how the ping actually gets to the device as a
responsibility of the system that is closest to the device.

Think about how email is sent around. Just because you hit "send"
doesn't mean that the email has appeared at the destination. Often
it's handed around to multiple systems before finally making it to
the location.

In that scenario, "errors" become a bit harder to nail down. There
are definite errors when a device can't talk to it's immediate
server, and we try to handle those appropriately. There are also
potential errors that may happen if an end point tries to ping a
device that doesn't exist. Where things get fuzzy are the errors
around a device that just got run over by a bus or sat in a drawer
with a dead battery for a week.

In any case, feel free to contact us via email or if you like on
irc.mozilla.org/#push <http://irc.mozilla.org/#push>

On 6/2/2013 10:10 AM, Henrik 'henx' Mitsch wrote:
Hi Nikhil and JR,

looking at https://wiki.mozilla.org/WebAPI/SimplePush you seem to be
the main editors. Last weekend we had a Firefox OS App Day in
Switzerland. It was awesome!

Erik Jan was one of the participants. He has a question concerning
Simple Push (see below). Can you guys help him out?

Best regards,
 Henrik
 Mozilla Rep



On 28.05.13 09:59, Erik Jan de Wit wrote:
Hi Henrik,

I was talking with my colleges about the nice day we had saturday.
And I mentioned that you could bring us in contact with people that
build the Simple Push into Mozilla. Like I've explained before we
made an implementation as well based off the specs that are on the
MDN, but would be nice if we could sync with the one that was
developed for Mozilla OS as the specs have some holes. For instance
how to handle errors is not really clear. Could you bring us in
contact with the people that implemented this in Firefox?

Thanks, Erik Jan