<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Dec 1, 2014 at 4:46 PM, Summers Pittman <span dir="ltr"><<a href="mailto:supittma@redhat.com" target="_blank">supittma@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF">
<div>What other companies provide geofencing
and what do their APIs look like?<br>
I know Google has some stuff for Android buried in Google Play
Services.<br>
<br>
In general I think it might be less big brother if instead of the
user reporting their location we add in metadata to filter
incoming messages. This will have us sending more metadata but we
don't have to worry about what if some bad guy compromises the
server and start following his mother-in-law.</div></div></blockquote><div>Sorry, I'm not sure to understand the alternative you propose.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div text="#000000" bgcolor="#FFFFFF"><div><div><div class="h5"><br>
<br>
<br>
On 11/27/2014 11:52 AM, Sebastien Blanc wrote:<br>
</div></div></div>
<blockquote type="cite"><div><div class="h5">
<div dir="ltr">
<p>Hi
Folks !</p>
<p>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>Let's
keep in mind : <em>Crawl, Walk, Run</em></p>
<p>I
would like to start with a concrete proposition and initiate
the discussions from there :</p>
<h1><a name="14a068869b0a253b_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><a name="14a068869b0a253b_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>The
idea is to add 2 new fields to the <code>Installation</code> Object
:</p>
<pre style="font-family:Consolas,'Liberation Mono',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,'Liberation Mono',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>These
field <strong>should</strong> be optional !</p>
<h2><a name="14a068869b0a253b_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>When
the device registers, along with alias, categories etc ... it
will also be possible to pass a latitude and longitude.</p>
<p>Later,
we will probably offer a endpoint to update these properties. <code>PUT
/registry/device/{token}</code></p>
<h1><a name="14a068869b0a253b_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><a name="14a068869b0a253b_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>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,'Liberation Mono',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,'Liberation Mono',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">{
"message":{
"alert":"HELLO!
},
"criteria":{
"geolocation":
{
"latitude" : 40.2566
"longitude": 2.36556
"within" : 5
"unit" : "Km" // optional, default is Km
}
}
}
</code></pre>
<p>In
this example, the Push Notification will be sent only to
devices within a radius of 5 km of the supplied location.</p>
<p>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><a name="14a068869b0a253b_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>The
different Sender Clients (Java, Node.js, .net) should be
updated accordingly.</p>
<h1><a name="14a068869b0a253b_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>In
this fisrt iteration, the registration code would to be
updated to include latitude and longitude for :</p>
<ul>
<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>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>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>Comments
and questions welcome !</p>
<p>Sebi</p>
</div>
<br>
<fieldset></fieldset>
<br>
</div></div><span class=""><pre>_______________________________________________
aerogear-dev mailing list
<a href="mailto:aerogear-dev@lists.jboss.org" target="_blank">aerogear-dev@lists.jboss.org</a>
<a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a></pre>
</span></blockquote><span class="HOEnZb"><font color="#888888">
<br>
<br>
<pre cols="72">--
Summers Pittman
>>Phone:<a href="tel:404%20941%204698" value="+14049414698" target="_blank">404 941 4698</a>
>>Java is my crack.
</pre>
</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>