dougt/webpush-protocol — pull request #4 by jrconlin (2014-05-02 17:36:40+00:00)
Title: Modifications to make wire protocol match prod

Added modifications provide:
* Closer match to current production server
* Address future expansion (reserve "wp-" prefixed field names)
* Resolve Data retention with stateless server
** Ideally UA would return an optional "Last Connect" field to the
server. If this date is beyond the expiry window, server would
auto-gen a new UAID. This allows for data stores with self
expiring records as well as major event recoveries.
* some formatting/spelling/grammar

Added note: I believe that specifying the data interchange outside of mozilla at this point is premature. I'm fine with publishing a white paper of discoveries and strongly encourage an exchange requirements doc between the client and server teams, but trying to nail down a hard spec at this point is probably not an optimal way to spend time.

For instance, the most effective way to scale large systems is to keep them as stateless as possible. Doing that means putting state as close to the parties that require it as is possible. The UserAgents are the ultimate source of truth regarding which apps require notifications and which don't. The server should be more of a "mailbox" that just holds data from the server until the client is ready for it. There are things that the server can do to help reduce "noise" (e.g. on an unregister, a client can send an app an invalid or "dead letter" endpoint to the app which the server will discard immediately)

These are lessons that need to be learned by each provider, based on the resources and technologies they have available. Codifying these requirements just means that the standard is less likely to be implemented correctly as individual providers discover more efficient mechanisms available to them.