<div dir="ltr"><p style="margin-right:0px;margin-bottom:15px;margin-left:0px;color:rgb(0,0,0);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:13.63636302947998px;line-height:20px;margin-top:0px!important">Hi folks!</p>
<p style="margin-right:0px;margin-bottom:15px;margin-left:0px;color:rgb(0,0,0);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:13.63636302947998px;line-height:20px;margin-top:0px!important"><span style="font-size:13.63636302947998px">As discussed a few times, we have the following "high-level" construct of data (required for push):</span><br>
</p><ul style="margin:15px 0px;padding:0px 0px 0px 30px;color:rgb(0,0,0);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:13.63636302947998px;line-height:20px"><li>PushApplication ("HR Mobile")</li>
<li>MobileApplication ("HR for iPhone", "HR for iPad", "HR for Android")</li><li>Installation ("Matthias uses iPhone HR", "Matthias uses Android HR", "Bruno uses iPad HR")</li>
</ul><p style="margin:15px 0px;color:rgb(0,0,0);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:13.63636302947998px;line-height:20px">(More details <a href="https://gist.github.com/matzew/6012edf62d1915689a67" style="color:rgb(65,131,196);text-decoration:none">here</a>)</p>
<h3 style="margin:20px 0px 10px;padding:0px;font-size:18px;color:rgb(0,0,0);font-family:Helvetica,arial,freesans,clean,sans-serif"><a name="data-per-installation-per-device" class="" href="https://gist.github.com/matzew/04346e212e317d976532#data-per-installation-per-device" style="color:rgb(65,131,196);text-decoration:none;display:block;padding-left:30px"></a>Data per installation per device</h3>
<p style="margin:0px 0px 15px;color:rgb(0,0,0);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:13.63636302947998px;line-height:20px">Now, thinking about what to store for an actual device gives you lot's of choices. For instance, Helios/Orbiter stores a lot of information in the "device" database (e.g. (current) Location Data, Locale etc).</p>
<p style="margin:15px 0px;color:rgb(0,0,0);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:13.63636302947998px;line-height:20px">Like you can see here:</p><p style="margin:15px 0px;color:rgb(0,0,0);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:13.63636302947998px;line-height:20px">
<a href="https://raw.github.com/helios-framework/helios.io/assets/helios-screenshot.png" target="_blank" style="color:rgb(65,131,196);text-decoration:none"><img src="https://raw.github.com/helios-framework/helios.io/assets/helios-screenshot.png" alt="Helios Web UI Screenshot" style="border: 0px; max-width: 100%;"></a></p>
<p style="margin:15px 0px;color:rgb(0,0,0);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:13.63636302947998px;line-height:20px">All the information is really app specific (e.g. not every app needs to know the current location...); (A side-note... our client SDK should be flexible to store what ever the application requires...)</p>
<h4 style="margin:20px 0px 10px;padding:0px;font-size:16px;color:rgb(0,0,0);font-family:Helvetica,arial,freesans,clean,sans-serif"><a name="mandatory-data" class="" href="https://gist.github.com/matzew/04346e212e317d976532#mandatory-data" style="color:rgb(65,131,196);text-decoration:none;display:block;padding-left:30px"></a>Mandatory Data</h4>
<p style="margin:0px 0px 15px;color:rgb(0,0,0);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:13.63636302947998px;line-height:20px">Regardless of what data is desired or not, the following is the minimum that needs to be stored:</p>
<ul style="margin:15px 0px;padding:0px 0px 0px 30px;color:rgb(0,0,0);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:13.63636302947998px;line-height:20px"><li>Device Token (generated by the PushNetwork (e.g. APNs, GCM) - used to identify the device with the actual Network, so that it can send a message to that device)</li>
<li>OS and Device Type (we need to store if this is an installation of the iPad version, the iPhone version or the Android version (to use the above HR example))</li><li>OS Version (the version, never hurts)</li></ul><p style="margin:15px 0px;color:rgb(0,0,0);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:13.63636302947998px;line-height:20px">
This is the minimum of data, required to store in our "device registration" database;</p><p style="margin:15px 0px;color:rgb(0,0,0);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:13.63636302947998px;line-height:20px">
As discussed in <a href="https://issues.jboss.org/browse/AEROGEAR-1101" style="color:rgb(65,131,196);text-decoration:none">AEROGEAR-1101</a>, I would like to store the above "device" data, using the Picketlink IDM (Actually the entire data base (PushApplication, MobileApplication and Installation("device")).</p>
<h3 style="margin:20px 0px 10px;padding:0px;font-size:18px;color:rgb(0,0,0);font-family:Helvetica,arial,freesans,clean,sans-serif"><a name="user-data-" class="" href="https://gist.github.com/matzew/04346e212e317d976532#user-data-" style="color:rgb(65,131,196);text-decoration:none;display:block;padding-left:30px"></a>User Data ?</h3>
<p style="margin:0px 0px 15px;color:rgb(0,0,0);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:13.63636302947998px;line-height:20px">Now... you might wonder if there isn't any user data required ..... Well, that is also up to the application and how works.</p>
<p style="margin:15px 0px;color:rgb(0,0,0);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:13.63636302947998px;line-height:20px">Overall, I see the following two common application models, suppored by the <em>Push Server</em>:</p>
<ul style="margin:15px 0px;padding:0px 0px 0px 30px;color:rgb(0,0,0);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:13.63636302947998px;line-height:20px"><li>device has a user (a known user in an Application (e.g. Marketing) Databases)</li>
<li>device has <em style="margin-top:0px">NO</em> user (no need to have a user for the app)</li></ul><h5 style="margin:20px 0px 10px;padding:0px;font-size:14px;color:rgb(0,0,0);font-family:Helvetica,arial,freesans,clean,sans-serif;line-height:20px">
<a name="user-required" class="" href="https://gist.github.com/matzew/04346e212e317d976532#user-required" style="color:rgb(65,131,196);text-decoration:none;display:block;padding-left:30px"></a>User required</h5><p style="margin:0px 0px 15px;color:rgb(0,0,0);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:13.63636302947998px;line-height:20px">
This would be an app, that requires an account, before it can be used on the device (e.g. something twitter). For applications like that, a user is required, otherwise hard to send a Push Notification to a specific user (e.g. "You have new tweets") ( <em>Also twitter works only with a user, on their "application backend/database"</em> )</p>
<h5 style="margin:20px 0px 10px;padding:0px;font-size:14px;color:rgb(0,0,0);font-family:Helvetica,arial,freesans,clean,sans-serif;line-height:20px"><a name="no-user-concept-on-the-backend" class="" href="https://gist.github.com/matzew/04346e212e317d976532#no-user-concept-on-the-backend" style="color:rgb(65,131,196);text-decoration:none;display:block;padding-left:30px"></a>No User concept, on the backend</h5>
<p style="margin:0px 0px 15px;color:rgb(0,0,0);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:13.63636302947998px;line-height:20px">That's a (very) simple app. Think <em>Sports App</em>. The app displays "sport news" (fetched via HTTP, when the app is opened). A installed application can also receive "broadcasts messages".</p>
<p style="margin:15px 0px;color:rgb(0,0,0);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:13.63636302947998px;line-height:20px"><strong>Scenario:</strong> You download the app in the app store, install it, use it; When ever the backend thinks it needs to send Notifications (eg. "New score 3:1 at Germany - Brazil"), it simply uses the token and submits the message to the actual Push Network. For applications like this, the backend does not need a user;</p>
<h3 style="margin:20px 0px 10px;padding:0px;font-size:18px;color:rgb(0,0,0);font-family:Helvetica,arial,freesans,clean,sans-serif"><a name="application-with-user-required" class="" href="https://gist.github.com/matzew/04346e212e317d976532#application-with-user-required" style="color:rgb(65,131,196);text-decoration:none;display:block;padding-left:30px"></a>Application with User required</h3>
<p style="margin:0px 0px 15px;color:rgb(0,0,0);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:13.63636302947998px;line-height:20px">Now, let's comeback to the apps, where a user is required, in the backend. Somehow the business backend (e.g. HR system) needs to identify a certain user (and their devices), so that it can "submit" Push Notification jobs.</p>
<p style="margin:15px 0px;color:rgb(0,0,0);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:13.63636302947998px;line-height:20px">Bruno, Shane (from Picketlink) and I talked already to store something like a unique ID (e.g. user-id, login-name or user-name) in the "Device" Table (per device):</p>
<pre style="font-size:13px;line-height:19px;font-family:Consolas,'Liberation Mono',Courier,monospace;word-wrap:break-word;margin-top:15px;margin-bottom:15px;background-color:rgb(248,248,248);border:1px solid rgb(204,204,204);overflow:auto;padding:6px 10px;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;color:rgb(0,0,0)">
<code style="font-size:12px;line-height:normal;font-family:Consolas,'Liberation Mono',Courier,monospace;margin:0px;padding:0px;border:none;background-color:transparent;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px">TOKEN | user | DEVICE-TYPE | OS-VERSION
_________________________________________________________________________
823ssar | abstractj | Android | Android4.x.y.blah
1234456 | mwessend | iPad | iOS4.0.1
ghh2712 | mwessend | iPhone | iOS6.1.2
</code></pre><p style="margin:15px 0px;color:rgb(0,0,0);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:13.63636302947998px;line-height:20px">Doing so, we can use that "unique ID" to <em>bridge</em> between the actual "application database" and the stored informations about the device(s), stored in the <em>push-server-database</em>; per user!</p>
<p style="margin:15px 0px;color:rgb(0,0,0);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:13.63636302947998px;line-height:20px"><strong>NOTE</strong> Since the Push Server (and the "device database") is a standalone server (access via HTTP / Java Library), the real (business) backend (e.g. HR App), can than say:</p>
<p style="margin:15px 0px;color:rgb(0,0,0);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:13.63636302947998px;line-height:20px"><em>Send message X to to following users</em> (a list of unique user IDs would be send to the push server, so that the Push Server submit these messages to the actual Push-Networks (ANPs/GCM)so that Apple and Google (for iOS/Android) can deliver the actual notification to the client/device.</p>
<h5 style="margin:20px 0px 10px;padding:0px;font-size:14px;color:rgb(0,0,0);font-family:Helvetica,arial,freesans,clean,sans-serif;line-height:20px"><a name="client-sdk" class="" href="https://gist.github.com/matzew/04346e212e317d976532#client-sdk" style="color:rgb(65,131,196);text-decoration:none;display:block;padding-left:30px"></a>Client SDK</h5>
<p style="margin-top:0px;margin-right:0px;margin-left:0px;color:rgb(0,0,0);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:13.63636302947998px;line-height:20px;margin-bottom:0px!important">Again, As said above, we should (and will) offer hooks to have a convenient way to register the unique ID, together with the token,OS,version etc. <strong>BUT</strong> <em>that is not that important here... ;-)</em></p>
<p style="margin-top:0px;margin-right:0px;margin-left:0px;color:rgb(0,0,0);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:13.63636302947998px;line-height:20px;margin-bottom:0px!important"><em><br></em></p>
<p style="margin-top:0px;margin-right:0px;margin-left:0px;color:rgb(0,0,0);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:13.63636302947998px;line-height:20px;margin-bottom:0px!important"><em>Thoughts?</em></p>
<p style="margin-top:0px;margin-right:0px;margin-left:0px;color:rgb(0,0,0);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:13.63636302947998px;line-height:20px;margin-bottom:0px!important"><em><br></em></p>
<p style="margin-top:0px;margin-right:0px;margin-left:0px;color:rgb(0,0,0);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:13.63636302947998px;line-height:20px;margin-bottom:0px!important"><em><br></em></p>
<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>