<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Matthias,<div><br></div><div>A couple of comments:</div><div><br></div><div>* You mention disable notifications feature for "mobile variant instances". I was wondering if you considered the same for "mobile variants" and "push applications"? Could help admins disable misbehaving apps, and developers manage older app versions.</div><div><br></div><div>* API access: during "app registration", developer login seems like a good idea. I am not so sure about "sending" messages though, as this will likely be initiated by a server-side component with no developer in the loop. <br><div apple-content-edited="true"><br>
</div><div apple-content-edited="true">Thanks for the spec! The clear definitions made it very easy to read. </div><div apple-content-edited="true"><br></div><div apple-content-edited="true">D.</div><div apple-content-edited="true"><br></div>
<br><div><div>On May 6, 2013, at 3:33 AM, Matthias Wessendorf <<a href="mailto:matzew@apache.org">matzew@apache.org</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr">Moved the current draft to the homepage, see <a href="https://github.com/aerogear/aerogear.org/pull/57">https://github.com/aerogear/aerogear.org/pull/57</a><div><br></div><div style="">-M</div></div><div class="gmail_extra">
<br><br><div class="gmail_quote">On Tue, Apr 30, 2013 at 1:57 PM, Bruno Oliveira <span dir="ltr"><<a href="mailto:bruno@abstractj.org" target="_blank">bruno@abstractj.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Really helpful Matthias. Thanks!<br>
<br>
<br>
--<br>
"The measure of a man is what he does with power" - Plato<br>
-<br>
@abstractj<br>
-<br>
Volenti Nihil Difficile<br>
<div class="im"><br>
<br>
<br>
On Tuesday, April 30, 2013 at 8:54 AM, Matthias Wessendorf wrote:<br>
<br>
> On IRC, Bruno raised a valid concern: The earlier version had "use cases"<br>
><br>
><br>
> I updated the GIST (<a href="https://gist.github.com/matzew/b918eb45d3f17de09b8f" target="_blank">https://gist.github.com/matzew/b918eb45d3f17de09b8f</a>) and added:<br>
> * more definitions<br>
> * usage scenarios<br>
> * use cases<br>
><br>
><br>
> -Matthias<br>
><br>
><br>
><br>
><br>
><br>
><br>
><br>
</div><div class="im">> On Mon, Apr 29, 2013 at 3:27 PM, Matthias Wessendorf <<a href="mailto:matzew@apache.org">matzew@apache.org</a> (mailto:<a href="mailto:matzew@apache.org">matzew@apache.org</a>)> wrote:<br>
> > Hi,<br>
> ><br>
> > I started a GIST to convert the different gists and readme's into a server-side spec<br>
> > (<a href="https://gist.github.com/matzew/b918eb45d3f17de09b8f" target="_blank">https://gist.github.com/matzew/b918eb45d3f17de09b8f</a>)<br>
> ><br>
> ><br>
> > * Regarding the "mobile variant instance":<br>
> > We need to decide, what a SimplePush client may need on-top of the data, described below (and in the gist). (since they have clientIDs + channels)<br>
> ><br>
> > * Similar... we need to reflect the "" on a "selected" (and broadcast) send as well.<br>
> ><br>
> > * Sec: there is a different meeting, on the sec - content will be integrated (or linked from this spec)<br>
> ><br>
> ><br>
> > If this doc, looks good, I will submit it as a PR so that we get it on the homepage<br>
> ><br>
> ><br>
> > Next:<br>
> > CLIENT SPEC is coming later today (or tomorrow)<br>
> ><br>
> > Thoughts ?<br>
> > Matthias<br>
> ><br>
> ><br>
> ><br>
> ><br>
> ><br>
> > AeroGear Unified Push Server (Draft 0.0.3)<br>
> ><br>
</div>> > The AeroGear Unified Push Server is a server that allows sending native push messages to different mobile operation systems. The initial version of the server supports Apple's APNs (<a href="http://developer.apple.com/library/mac/#documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Chapters/ApplePushService.html%23//apple_ref/doc/uid/TP40008194-CH100-SW9" target="_blank">http://developer.apple.com/library/mac/#documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Chapters/ApplePushService.html%23//apple_ref/doc/uid/TP40008194-CH100-SW9</a>), Google Cloud Messaging (<a href="http://developer.android.com/google/gcm/index.html" target="_blank">http://developer.android.com/google/gcm/index.html</a>) and Mozilla's Simple Push (<a href="https://wiki.mozilla.org/WebAPI/SimplePush" target="_blank">https://wiki.mozilla.org/WebAPI/SimplePush</a>).<br>
<div class="im">> ><br>
> > Motivation / Purpose<br>
> ><br>
> > Goal: Any (JBoss/AeroGear powered) mobile application, that is backed by JBoss technology (e.g. admin console, Errai, drools, etc.), is able to easily work with mobile push messages. For a JBoss "backend application" it should be as simple as possible, to send messages to its different mobile clients.<br>
> ><br>
> > Definitions<br>
> ><br>
> > Before we get into details, it's important that we have a good lexicon.<br>
> ><br>
> > Push Application<br>
> ><br>
> > A logical construct that represents an overall mobile application (e.g. Mobile HR).<br>
> ><br>
> > Mobile Variant<br>
> ><br>
> > A mobile variant of the Push Application. There can be multiple variants for a Push Application (e.g. HR Android,HR iPad, HR iPhone free, HR iPhone premium or HR Mobile Web).<br>
> ><br>
> > Mobile Variant Instance<br>
> ><br>
> > Represents an actual installation on a mobile device (e.g. User1 connected via MobileWeb or User2 runs HR iPhone premium on his phone)<br>
> ><br>
> > Overview<br>
> ><br>
> > The AeroGear Unified Push Server contains three different components:<br>
> ><br>
> > Registration: Registry for Push Applications, Mobile Variants and Mobile Variant Instances<br>
> > Storage: A database, storing the registered applications and instances<br>
> > Sender: Receives messages and sends them to different Mobile Variant Instances<br>
> ><br>
> ><br>
> > The graphic below gives a little overview:<br>
> ><br>
</div><div class="im">> > Functionality<br>
> > Registration<br>
> ><br>
> > Three different registration types are provided by the AeroGear Unified Push Server.<br>
> ><br>
> > Push Application Registration<br>
> ><br>
> > Adds a logical construct, that represents an overall mobile application (e.g. Mobile HR). The Push Application contains the following properties:<br>
> ><br>
> > Name<br>
> > Description<br>
> > A collection of Mobile Variants<br>
> ><br>
> ><br>
> > The server offers an HTTP interfaces to apply a Push Application registration:<br>
> ><br>
> > curl -v -H "Accept: application/json" -H "Content-type: application/json" -X POST -d '{"name" : "MyApp", "description" : "awesome app" }' <a href="http://server/applications" target="_blank">http://SERVER/applications</a><br>
> ><br>
> > The response returns an ID for the Push Application.<br>
> ><br>
> > Mobile Variant Registration<br>
> ><br>
> > Adds a mobile variant for an existing Push Application. There can be multiple variants for a Push Application (e.g. HR Android, HR iPad, HR iPhone free, HR iPhone premium or HR Mobile Web).<br>
> ><br>
> ><br>
> > The server supports the following variant types:<br>
> ><br>
> > iOS<br>
> > Android<br>
> > SimplePush<br>
> ><br>
> > iOS Variant<br>
> ><br>
> > An iOS variant represents a logical construct for one iOS application (e.g. HR for iPhone or HR for iPad ). The iOS variant requires some APNs specific values:<br>
> ><br>
> > APNs Push Certificate file<br>
> > Passphrase<br>
> ><br>
> ><br>
> > The server offers an HTTP interfaces to register an iOS varian:<br>
> ><br>
</div>> > curl -i -H "Accept: application/json" -H "Content-type: multipart/form-data" -F "certificate=@/Users/matzew/Desktop/MyCert.p12" -F "passphrase=TopSecret" -X POST <a href="http://server/applications/{PUSH_ID}/iOS" target="_blank">http://SERVER/applications/{PUSH_ID}/iOS</a> (<a href="http://server/applications/%7BPUSH_ID%7D/iOS" target="_blank">http://SERVER/applications/%7BPUSH_ID%7D/iOS</a>)<br>
<div class="im">> ><br>
> > NOTE: The above is a multipart/form-data, since it is required to upload the "Apple Push certificate"!<br>
> ><br>
> ><br>
> > The response returns an ID for the iOS variant.<br>
> ><br>
> > Android Variant<br>
> ><br>
> > An Android variant represents a logical construct for one Android application (e.g. HR for Android). The Android variant requires some Google specific values:<br>
> ><br>
> > Google API Key<br>
> ><br>
> ><br>
> > The server offers an HTTP interfaces to register an Android variant:<br>
> ><br>
</div>> > curl -v -H "Accept: application/json" -H "Content-type: application/json" -X POST -d '{"googleKey" : "IDDASDASDSA"}' <a href="http://server/applications/{PUSH_ID}/android" target="_blank">http://SERVER/applications/{PUSH_ID}/android</a> (<a href="http://server/applications/%7BPUSH_ID%7D/android" target="_blank">http://SERVER/applications/%7BPUSH_ID%7D/android</a>)<br>
<div class="im">> ><br>
> > _The response returns an ID for the Android variant.<br>
> ><br>
> > SimplePush Variant<br>
> ><br>
> > An SimplePush variant represents a logical construct for one SimplePush application (e.g. HR mobile Web). The SimplePush variant requires some Simple Push Network specific values:<br>
> ><br>
> > URL of the PushNetwork server<br>
> ><br>
> ><br>
> > The server offers an HTTP interfaces to register an SimplePush variant:<br>
> ><br>
</div>> > curl -v -H "Accept: application/json" -H "Content-type: application/json" -X POST -d '{"pushNetworkURL" : "<a href="http://localhost:7777/endpoint/" target="_blank">http://localhost:7777/endpoint/</a>"}' <a href="http://server/applications/{PUSH_ID}/simplePush" target="_blank">http://SERVER/applications/{PUSH_ID}/simplePush</a> (<a href="http://server/applications/%7BPUSH_ID%7D/simplePush" target="_blank">http://SERVER/applications/%7BPUSH_ID%7D/simplePush</a>)<br>
<div class="im">> ><br>
> > The response returns an ID for the SimplePush variant.<br>
> ><br>
> > Mobile Variant Instance Registration<br>
> ><br>
> > Adds an mobile variant instance to an existing mobile variant (e.g. User1 runs HR-iPad on his device). It is possible that one user can have multiple devices. A mobile variant instance contains the following properties:<br>
> ><br>
> > Required Data<br>
> > deviceToken<br>
> ><br>
> ><br>
> > The platform specific device token, that identifies the device with the used push network, in order to deliver messages<br>
> ><br>
> > operatingSystem<br>
> ><br>
> ><br>
> > It is required for the device to submit it's exact name of the underlying OS.<br>
> ><br>
> > osVersion<br>
> ><br>
> ><br>
> > It is required for the device to submit it's exact version of the underlying OS.<br>
> ><br>
> > Mobile Variation ID<br>
> ><br>
> ><br>
> > ID received when registering a Mobile Variant. This ID needs to be submitted as a request header (ag-mobile-variant). NOTE: It is possible that this ID goes away, in favor for a digital signature in a future release<br>
> ><br>
> > Optional Data<br>
> > deviceType<br>
> ><br>
> ><br>
> > It is recommended to store the (exact) device type (e.g. phone vs tablet).<br>
> ><br>
> > alias<br>
> ><br>
> ><br>
> > If the business application requires the conecpt of a user, the registration must submit an unique identifier (like a username), to identify the user. It is possible that one user has multiple devices.<br>
> ><br>
> > Business Data<br>
> ><br>
> > The above are technical information bits that are required to get a message to the device. This the app wants to send notification based on a criteria, the relevant data has to be stored in the business backend. This way the backend app is very flexible on the criterias (e.g. max salary, geolocation, number of children, etc). All this data is NOT directly related to the technical functionality of sending data. The usage of the AeroGear Pipe is highly recommended to store business data on the business backend.<br>
> ><br>
> ><br>
> > The server offers an HTTP interfaces to register an mobile variant instance:<br>
> ><br>
</div>> > curl -v -H "Accept: application/json" -H "Content-type: application/json" -H "ag-push-app: {id}" -H "ag-mobile-app: {id}" -X POST -d '{ "alias" : "<a href="mailto:user@company.com">user@company.com</a> (mailto:<a href="mailto:user@company.com">user@company.com</a>)", "deviceToken" : "someTokenString", "deviceType" : "ANDROID", "mobileOperatingSystem" : "android", "osVersion" : "4.0.1" }' <a href="http://server/registry/device" target="_blank">http://SERVER/registry/device</a><br>
<div class="im">> ><br>
> > NOTE: Platform specific Client SDKs will be provided to submit the require data to the AeroGear Unified Push Server.<br>
> ><br>
> > Storage<br>
> ><br>
> > A (configurable) database that stores all registered applications and instances.<br>
> ><br>
> > Sender<br>
> ><br>
> > HTTP interface that receives messages for a delivery to different Mobile Push Networks. A few different Sender Types are supported by the push server.<br>
> ><br>
> > Global Broadcast Sender<br>
> ><br>
> > Sends a push message to all mobile variants (and all of its mobile variant intances), of a given Push Application:<br>
> ><br>
</div>> > curl -v -H "Accept: application/json" -H "Content-type: application/json" -X POST -d '{"key":"blah", "alert":"HELLO!"}' <a href="http://server/sender/broadcast/{PushApplicationID}" target="_blank">http://SERVER/sender/broadcast/{PushApplicationID}</a> (<a href="http://server/sender/broadcast/%7BPushApplicationID%7D" target="_blank">http://SERVER/sender/broadcast/%7BPushApplicationID%7D</a>)<br>
<div class="im">> ><br>
> > Sends a JSON map to the server. If platform specific key words (e.g. alert for APNs) are used, they are honored for the specific platform. This transformation is done by the AeroGear Unified Push Server.<br>
> ><br>
> > Variant specific Broadcast<br>
> ><br>
> > Sends a push message to only one mobile variants (and all of its mobile variant intances).:<br>
> ><br>
</div>> > curl -v -H "Accept: application/json" -H "Content-type: application/json" -X POST -d '{"key":"blah", "alert":"HELLO!"}' <a href="http://server/sender/broadcast/variant/{MobileVariantID}" target="_blank">http://SERVER/sender/broadcast/variant/{MobileVariantID}</a> (<a href="http://server/sender/broadcast/variant/%7BMobileVariantID%7D" target="_blank">http://SERVER/sender/broadcast/variant/%7BMobileVariantID%7D</a>)<br>
<div class="im">> ><br>
> > Sends a JSON map to the server. If platform specific key words (e.g. alert for APNs) are used, they are honored for the specific platform. This transformation is done by the AeroGear Unified Push Server.<br>
> ><br>
> > Selected Sender<br>
> ><br>
> > Sends a push message to a selected list of identified users (regardless of their variant):<br>
> ><br>
</div>> > curl -v -H "Accept: application/json" -H "Content-type: application/json" -X POST -d '{ alias: ["<a href="mailto:user@foo.com">user@foo.com</a> (mailto:<a href="mailto:user@foo.com">user@foo.com</a>)", "<a href="mailto:bar@moz.org">bar@moz.org</a> (mailto:<a href="mailto:bar@moz.org">bar@moz.org</a>)", ....], message: {"key":"blah", "alert":"HELLO!"} }' <a href="http://server/sender/selected" target="_blank">http://SERVER/sender/selected</a><br>
<div class="im">> ><br>
> > The alias value is used to identied the desired users. The payload (messages) is a standard JSON map. If platform specific key words (e.g. alert for APNs) are used, they are honored for the specific platform. This transformation is done by the AeroGear Unified Push Server.<br>
><br>
><br>
><br>
><br>
><br>
> --<br>
> Matthias Wessendorf<br>
><br>
> blog: <a href="http://matthiaswessendorf.wordpress.com/" target="_blank">http://matthiaswessendorf.wordpress.com/</a><br>
> sessions: <a href="http://www.slideshare.net/mwessendorf" target="_blank">http://www.slideshare.net/mwessendorf</a><br>
> twitter: <a href="http://twitter.com/mwessendorf" target="_blank">http://twitter.com/mwessendorf</a><br>
</div>> _______________________________________________<br>
> aerogear-dev mailing list<br>
> <a href="mailto:aerogear-dev@lists.jboss.org">aerogear-dev@lists.jboss.org</a> (mailto:<a href="mailto:aerogear-dev@lists.jboss.org">aerogear-dev@lists.jboss.org</a>)<br>
> <a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a><br>
<br>
<br>
<br>
_______________________________________________<br>
aerogear-dev mailing list<br>
<a href="mailto:aerogear-dev@lists.jboss.org">aerogear-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>Matthias Wessendorf <br><br>blog: <a href="http://matthiaswessendorf.wordpress.com/" target="_blank">http://matthiaswessendorf.wordpress.com/</a><br>sessions: <a href="http://www.slideshare.net/mwessendorf" target="_blank">http://www.slideshare.net/mwessendorf</a><br>
twitter: <a href="http://twitter.com/mwessendorf" target="_blank">http://twitter.com/mwessendorf</a>
</div>
_______________________________________________<br>aerogear-dev mailing list<br><a href="mailto:aerogear-dev@lists.jboss.org">aerogear-dev@lists.jboss.org</a><br>https://lists.jboss.org/mailman/listinfo/aerogear-dev</blockquote></div><br></div></body></html>