<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Nov 27, 2014 at 11:05 PM, Matthias Wessendorf <span dir="ltr">&lt;<a href="mailto:matzew@apache.org" target="_blank">matzew@apache.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hrm,<div><br></div><div>not sure on that hard integration. Originally we thought about something like:</div><div><br></div><div>1) write little native libs (Android/iOS) that help to collect long/lat.</div><div>2) combine them with the registration SDK</div><div><br></div><div>If location is enabled/allowed, store the long/lat to _a_ database - not the database of the existing metadata. So that would be a completely different REST api hook</div><div><br></div><div>We could even model that as a separate (micro) service.</div></div></blockquote><div>Yes, after thinking about this over the weekend, I like that :)</div><div>Some kind of independant server/(micro-service) , a sort of UGS (Unified Geo Server ;) ).</div><div><br></div><div>It would offer 2 endpoints :</div><div>- registration / updating of geo data coupled with an &quot;alias&quot; / devicetoken or smt else we have to agree on.</div><div>- a &quot;search&quot; api that returns the aliases or devicetokens </div><div><br></div><div>Then the question is, do we want this service to interact directly with the clients/devices ? Or that UPS &quot;talks&quot; with that geoserver and act a bit like a broker ? One benefit of this latest approach is that this geoserver could be in the same KC realm as UPS.</div><div><br></div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><br></div><div>Currently I am not sure if it&#39;s a good idea to blow up the metadata (with geo data) and doing the same for the sender.</div><div><br></div><div><br></div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote"><span class="">On Thu, Nov 27, 2014 at 5:52 PM, Sebastien Blanc <span dir="ltr">&lt;<a href="mailto:scm.blanc@gmail.com" target="_blank">scm.blanc@gmail.com</a>&gt;</span> wrote:<br></span><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr"><p style="margin-bottom:16px;color:rgb(51,51,51);font-family:&#39;Helvetica Neue&#39;,Helvetica,&#39;Segoe UI&#39;,Arial,freesans,sans-serif;font-size:16px;line-height:25.6000003814697px;margin-top:0px!important">Hi Folks !</p><p style="margin-top:0px;margin-bottom:16px;color:rgb(51,51,51);font-family:&#39;Helvetica Neue&#39;,Helvetica,&#39;Segoe UI&#39;,Arial,freesans,sans-serif;font-size:16px;line-height:25.6000003814697px">During our last f2f we agreed on adding some geolocation support for the next UnifiedPush Release (1.1). I would like to start here a thread to discuss this topic.</p><p style="margin-top:0px;margin-bottom:16px;color:rgb(51,51,51);font-family:&#39;Helvetica Neue&#39;,Helvetica,&#39;Segoe UI&#39;,Arial,freesans,sans-serif;font-size:16px;line-height:25.6000003814697px">Let&#39;s keep in mind : <em>Crawl, Walk, Run</em></p><p style="margin-top:0px;margin-bottom:16px;color:rgb(51,51,51);font-family:&#39;Helvetica Neue&#39;,Helvetica,&#39;Segoe UI&#39;,Arial,freesans,sans-serif;font-size:16px;line-height:25.6000003814697px">I would like to start with a concrete proposition and initiate the discussions from there :</p><h1 style="font-size:2.25em;margin:1em 0px 16px;line-height:1.2;padding-bottom:0.3em;border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:rgb(238,238,238);color:rgb(51,51,51);font-family:&#39;Helvetica Neue&#39;,Helvetica,&#39;Segoe UI&#39;,Arial,freesans,sans-serif"><a name="149f34a72d287514_149f22d3a4a1df21_user-content-installations" href="https://gist.github.com/sebastienblanc/d89e41b72c9de537dbde#installations" rel="noreferrer" style="color:rgb(65,131,196);text-decoration:none;display:block;padding-right:6px;padding-left:30px" target="_blank"></a>Installations</h1><h2 style="margin-top:1em;margin-bottom:16px;line-height:1.225;font-size:1.75em;padding-bottom:0.3em;border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:rgb(238,238,238);color:rgb(51,51,51);font-family:&#39;Helvetica Neue&#39;,Helvetica,&#39;Segoe UI&#39;,Arial,freesans,sans-serif"><a name="149f34a72d287514_149f22d3a4a1df21_user-content-model-change" href="https://gist.github.com/sebastienblanc/d89e41b72c9de537dbde#model-change" rel="noreferrer" style="color:rgb(65,131,196);text-decoration:none;display:block;padding-right:6px;padding-left:30px" target="_blank"></a>Model Change</h2><p style="margin-top:0px;margin-bottom:16px;color:rgb(51,51,51);font-family:&#39;Helvetica Neue&#39;,Helvetica,&#39;Segoe UI&#39;,Arial,freesans,sans-serif;font-size:16px;line-height:25.6000003814697px">The idea is to add 2 new fields to the <code style="font-family:Consolas,&#39;Liberation Mono&#39;,Menlo,Courier,monospace;font-size:14px;padding:0.2em 0px;margin:0px;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;background-color:rgba(0,0,0,0.0392157)">Installation</code> Object :</p><pre style="font-family:Consolas,&#39;Liberation Mono&#39;,Menlo,Courier,monospace;font-size:14px;margin-top:0px;margin-bottom:16px;padding:16px;overflow:auto;line-height:1.45;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;word-wrap:normal;color:rgb(51,51,51);background-color:rgb(247,247,247)"><code style="font-family:Consolas,&#39;Liberation Mono&#39;,Menlo,Courier,monospace;font-size:14px;padding:0px;margin:0px;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;word-break:normal;border:0px;display:inline;line-height:inherit;word-wrap:normal;background:transparent">double longitude;
double latitude;

</code></pre><p style="margin-top:0px;margin-bottom:16px;color:rgb(51,51,51);font-family:&#39;Helvetica Neue&#39;,Helvetica,&#39;Segoe UI&#39;,Arial,freesans,sans-serif;font-size:16px;line-height:25.6000003814697px">These field <strong>should</strong> be optional !</p><h2 style="margin-top:1em;margin-bottom:16px;line-height:1.225;font-size:1.75em;padding-bottom:0.3em;border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:rgb(238,238,238);color:rgb(51,51,51);font-family:&#39;Helvetica Neue&#39;,Helvetica,&#39;Segoe UI&#39;,Arial,freesans,sans-serif"><a name="149f34a72d287514_149f22d3a4a1df21_user-content-registration" href="https://gist.github.com/sebastienblanc/d89e41b72c9de537dbde#registration" rel="noreferrer" style="color:rgb(65,131,196);text-decoration:none;display:block;padding-right:6px;padding-left:30px" target="_blank"></a>Registration</h2><p style="margin-top:0px;margin-bottom:16px;color:rgb(51,51,51);font-family:&#39;Helvetica Neue&#39;,Helvetica,&#39;Segoe UI&#39;,Arial,freesans,sans-serif;font-size:16px;line-height:25.6000003814697px">When the device registers, along with alias, categories etc ... it will also be possible to pass a latitude and longitude.</p><p style="margin-top:0px;margin-bottom:16px;color:rgb(51,51,51);font-family:&#39;Helvetica Neue&#39;,Helvetica,&#39;Segoe UI&#39;,Arial,freesans,sans-serif;font-size:16px;line-height:25.6000003814697px">Later, we will probably offer a endpoint to update these properties. <code style="font-family:Consolas,&#39;Liberation Mono&#39;,Menlo,Courier,monospace;font-size:14px;padding:0.2em 0px;margin:0px;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;background-color:rgba(0,0,0,0.0392157)">PUT /registry/device/{token}</code></p><h1 style="font-size:2.25em;margin:1em 0px 16px;line-height:1.2;padding-bottom:0.3em;border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:rgb(238,238,238);color:rgb(51,51,51);font-family:&#39;Helvetica Neue&#39;,Helvetica,&#39;Segoe UI&#39;,Arial,freesans,sans-serif"><a name="149f34a72d287514_149f22d3a4a1df21_user-content-sender" href="https://gist.github.com/sebastienblanc/d89e41b72c9de537dbde#sender" rel="noreferrer" style="color:rgb(65,131,196);text-decoration:none;display:block;padding-right:6px;padding-left:30px" target="_blank"></a>Sender</h1><h2 style="margin-top:1em;margin-bottom:16px;line-height:1.225;font-size:1.75em;padding-bottom:0.3em;border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:rgb(238,238,238);color:rgb(51,51,51);font-family:&#39;Helvetica Neue&#39;,Helvetica,&#39;Segoe UI&#39;,Arial,freesans,sans-serif"><a name="149f34a72d287514_149f22d3a4a1df21_user-content-server-side" href="https://gist.github.com/sebastienblanc/d89e41b72c9de537dbde#server-side" rel="noreferrer" style="color:rgb(65,131,196);text-decoration:none;display:block;padding-right:6px;padding-left:30px" target="_blank"></a>Server Side</h2><p style="margin-top:0px;margin-bottom:16px;color:rgb(51,51,51);font-family:&#39;Helvetica Neue&#39;,Helvetica,&#39;Segoe UI&#39;,Arial,freesans,sans-serif;font-size:16px;line-height:25.6000003814697px">We need to extend the current sender API to be able to add geolocation as a criteria. I see that as something like :</p><pre style="font-family:Consolas,&#39;Liberation Mono&#39;,Menlo,Courier,monospace;font-size:14px;margin-top:0px;margin-bottom:16px;padding:16px;overflow:auto;line-height:1.45;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;word-wrap:normal;color:rgb(51,51,51);background-color:rgb(247,247,247)"><code style="font-family:Consolas,&#39;Liberation Mono&#39;,Menlo,Courier,monospace;font-size:14px;padding:0px;margin:0px;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;word-break:normal;border:0px;display:inline;line-height:inherit;word-wrap:normal;background:transparent">{
  &quot;message&quot;:{
    &quot;alert&quot;:&quot;HELLO!
  },
  &quot;criteria&quot;:{
   &quot;geolocation&quot;:
       {
      &quot;latitude&quot; : 40.2566
      &quot;longitude&quot;: 2.36556
      &quot;within&quot; : 5 
      &quot;unit&quot; : &quot;Km&quot; // optional, default is Km  
       }
  }
}

</code></pre><p style="margin-top:0px;margin-bottom:16px;color:rgb(51,51,51);font-family:&#39;Helvetica Neue&#39;,Helvetica,&#39;Segoe UI&#39;,Arial,freesans,sans-serif;font-size:16px;line-height:25.6000003814697px">In this example, the Push Notification will be sent only to devices within a radius of 5 km of the supplied location.</p><p style="margin-top:0px;margin-bottom:16px;color:rgb(51,51,51);font-family:&#39;Helvetica Neue&#39;,Helvetica,&#39;Segoe UI&#39;,Arial,freesans,sans-serif;font-size:16px;line-height:25.6000003814697px">On the implementation side, I think it make sense to use Hibernate Search since it has nice support for<a href="https://docs.jboss.org/hibernate/search/4.2/reference/en-US/html/spatial.html" rel="noreferrer" style="color:rgb(65,131,196);text-decoration:none" target="_blank">Spatial queries</a>.</p><h2 style="margin-top:1em;margin-bottom:16px;line-height:1.225;font-size:1.75em;padding-bottom:0.3em;border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:rgb(238,238,238);color:rgb(51,51,51);font-family:&#39;Helvetica Neue&#39;,Helvetica,&#39;Segoe UI&#39;,Arial,freesans,sans-serif"><a name="149f34a72d287514_149f22d3a4a1df21_user-content-sender-client" href="https://gist.github.com/sebastienblanc/d89e41b72c9de537dbde#sender-client" rel="noreferrer" style="color:rgb(65,131,196);text-decoration:none;display:block;padding-right:6px;padding-left:30px" target="_blank"></a>Sender Client</h2><p style="margin-top:0px;margin-bottom:16px;color:rgb(51,51,51);font-family:&#39;Helvetica Neue&#39;,Helvetica,&#39;Segoe UI&#39;,Arial,freesans,sans-serif;font-size:16px;line-height:25.6000003814697px">The different Sender Clients (Java, Node.js, .net) should be updated accordingly.</p><h1 style="font-size:2.25em;margin:1em 0px 16px;line-height:1.2;padding-bottom:0.3em;border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:rgb(238,238,238);color:rgb(51,51,51);font-family:&#39;Helvetica Neue&#39;,Helvetica,&#39;Segoe UI&#39;,Arial,freesans,sans-serif"><a name="149f34a72d287514_149f22d3a4a1df21_user-content-client-sdks" href="https://gist.github.com/sebastienblanc/d89e41b72c9de537dbde#client-sdks" rel="noreferrer" style="color:rgb(65,131,196);text-decoration:none;display:block;padding-right:6px;padding-left:30px" target="_blank"></a>Client SDKs</h1><p style="margin-top:0px;margin-bottom:16px;color:rgb(51,51,51);font-family:&#39;Helvetica Neue&#39;,Helvetica,&#39;Segoe UI&#39;,Arial,freesans,sans-serif;font-size:16px;line-height:25.6000003814697px">In this fisrt iteration, the registration code would to be updated to include latitude and longitude for :</p><ul style="padding:0px 0px 0px 2em;margin-top:0px;margin-bottom:16px;color:rgb(51,51,51);font-family:&#39;Helvetica Neue&#39;,Helvetica,&#39;Segoe UI&#39;,Arial,freesans,sans-serif;font-size:16px;line-height:25.6000003814697px"><li>iOS (Including Safari ? )</li><li>Android ( Including Chrome Apps ?)</li><li>JS UPS-SPS Lib</li><li>Cordova Plugin</li><li>Amazon</li><li>Windows</li></ul><p style="margin-top:0px;margin-bottom:16px;color:rgb(51,51,51);font-family:&#39;Helvetica Neue&#39;,Helvetica,&#39;Segoe UI&#39;,Arial,freesans,sans-serif;font-size:16px;line-height:25.6000003814697px">Retrieving the current position of the device is not in scope of this first version, later we could offer some features around that.</p><p style="margin-top:0px;margin-bottom:16px;color:rgb(51,51,51);font-family:&#39;Helvetica Neue&#39;,Helvetica,&#39;Segoe UI&#39;,Arial,freesans,sans-serif;font-size:16px;line-height:25.6000003814697px">There are some jiras to track these tasks : <a href="https://issues.jboss.org/browse/AGPUSH-828" rel="noreferrer" style="color:rgb(65,131,196);text-decoration:none" target="_blank">https://issues.jboss.org/browse/AGPUSH-828</a></p><p style="margin-top:0px;margin-bottom:16px;color:rgb(51,51,51);font-family:&#39;Helvetica Neue&#39;,Helvetica,&#39;Segoe UI&#39;,Arial,freesans,sans-serif;font-size:16px;line-height:25.6000003814697px">Comments and questions welcome !</p><p style="margin-top:0px;margin-bottom:16px;color:rgb(51,51,51);font-family:&#39;Helvetica Neue&#39;,Helvetica,&#39;Segoe UI&#39;,Arial,freesans,sans-serif;font-size:16px;line-height:25.6000003814697px">Sebi</p></div>
<br></div></div><span class="">_______________________________________________<br>
aerogear-dev mailing list<br>
<a href="mailto:aerogear-dev@lists.jboss.org" target="_blank">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></span></blockquote></div><span class="HOEnZb"><font color="#888888"><br><br clear="all"><div><br></div>-- <br><div>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>
</font></span></div>
<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></div></div>