Re: Managing format of push payloads

2016-05-02 Thread Mark Hammond
On 29/04/2016 2:22 AM, Richard Newman wrote: Thanks for the reply! Speaking at a very high level: so long as you version the protocol, version the data format, and strongly define the types in the format (none of the "sometimes a number, sometimes a number as a string" crap we have in Sync), I'

Re: Managing format of push payloads

2016-05-01 Thread Ryan Kelly
On 28/04/2016 17:13, Mark Hammond wrote: > [...snip...] > > This is somewhat aspirational (ie, I'm not suggesting we would do all > that work up-front), but there's already a bug on file to perform > client-side schema validations for telemetry (bug 1249925) and we could > possibly piggy-back of

Re: Managing format of push payloads

2016-04-28 Thread Richard Newman
Speaking at a very high level: so long as you version the protocol, version the data format, and strongly define the types in the format (none of the "sometimes a number, sometimes a number as a string" crap we have in Sync), I'm happy. Remember that users don't upgrade clients as often as we'd li

Re: Managing format of push payloads

2016-04-28 Thread Mark Hammond
On 28/04/2016 9:28 PM, Mark Hammond wrote: I think that's similar to what Phil mentioned. IMO I think a production environment is where this would be used *sigh* - is *not* where this would be used. Hopefully that was clear from the rest of the message... Mark. __

Re: Managing format of push payloads

2016-04-28 Thread Mark Hammond
On 28/04/2016 6:03 PM, Rémy Hubscher wrote: Hi all, For the AMO blocklist project, we are working on in the storage team, we are using JSON Schema validation to make sure clients and servers are on the same page (the administration panel, the gecko client and the importation/exportation scripts

Re: Managing format of push payloads

2016-04-28 Thread Rémy Hubscher
Hi all, For the AMO blocklist project, we are working on in the storage team, we are using JSON Schema validation to make sure clients and servers are on the same page (the administration panel, the gecko client and the importation/exportation scripts as well as the storage layer.) IMHO, It is ve

Re: Managing format of push payloads

2016-04-28 Thread Phil Booth
My $0.02: I'm pro-validation but ambivalent about JSON Schema specifically. However it should be straightforward for the auth server to convert from JSON Schema to Joi validation objects via, e.g. https://www.npmjs.com/package/enjoi, provided we can stick to the subset that is implemented there (or

Managing format of push payloads

2016-04-28 Thread Mark Hammond
Hi all, Edouard has been working on adding payloads to our push messages and we were having a bit of a discussion about how to define these payloads. This is becoming relevant to FxA and to Sync, hence I'm copying both lists. When defining the data in a payload for a certain message, both th