<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Jul 9, 2014 at 5:18 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"><br><div class="gmail_extra"><br><br><div class="gmail_quote"><div class="">On Wed, Jul 9, 2014 at 5:11 PM, Burr Sutter <span dir="ltr">&lt;<a href="mailto:bsutter@redhat.com" target="_blank">bsutter@redhat.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div style="word-wrap:break-word"><br><div><div><div>
On Jul 9, 2014, at 11:03 AM, Matthias Wessendorf &lt;<a href="mailto:matzew@apache.org" target="_blank">matzew@apache.org</a>&gt; wrote:</div><br><blockquote type="cite"><div dir="ltr"><div>Hi,</div><div><br></div><div>we had a meeting on this &#39;server side&#39; sync topic. In terms of delivering a &#39;quick solution&#39; around JavaEE (JAX-RS/JPA): </div>

<div><br></div><div>Erik&#39;s sent a PR to forge (see [1]) and Erik started a branch on adding the minimal/quick solution to our Quickstarts (atm: Cordova and Server):</div>
<div><a href="https://github.com/edewit/aerogear-push-quickstarts/tree/conflict" target="_blank">https://github.com/edewit/aerogear-push-quickstarts/tree/conflict</a></div><div><br></div><div>==&gt; It basically is &quot;optimistic locking&quot; and returning 409 to the client, telling there is a conflict; NOTE: there is NO merge.</div>


<div><br></div><div>What we could do....</div></div></blockquote></div>in what timeframe? :-)</div></div></blockquote><div><br></div></div><div>I think I mentioned that a bit later in my email, at the bottom </div><div class="">
<div><br></div>
<div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div style="word-wrap:break-word"><div><div>
<br><blockquote type="cite"><div dir="ltr"><div>* Provide an annotation for all of that work (outside of the quickstart, as a &quot;library&quot;);</div></div></blockquote></div>that could be interesting, but how much boilderplate code is it eliminating? 10 lines?</div>

</div></blockquote><div><br></div></div><div>Possible - just an idea we had at the Face2Face meeting. To make it darn simple</div><div class=""><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

<div style="word-wrap:break-word"><div><div><br><blockquote type="cite"><div dir="ltr"><div>* we could also integrate the push notification delivery on conflicts (not sure it really makes sense, for now...).</div>
</div></blockquote></div>Seems like overkill to me</div></div></blockquote><div><br></div></div><div>yeah, same feeing; No Push on Conflict it is, for now</div></div></div></div></blockquote><div>If we go for the annotation that could be (in the future) an option to be passed to the annotation (serverUrl:&quot;&quot;,masterId:&quot;&quot;,masterSecret:&quot;&quot;)  </div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div class=""><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

<div style="word-wrap:break-word"><div><div><br><blockquote type="cite"><div dir="ltr">
<div><br></div><div>Note that this is just an initial and very simple solution, not really something considered being called a &#39;sync server&#39;. I liked Summers comment: &quot;I think the EE stuff is a stop gap until the sync server is done IE the cheap 50% solution&quot;. I agree with that; Eventually it will go away in fav. of the &#39;sync-server&#39; that Dan/Luke are working on.</div>

</div></blockquote><blockquote type="cite"><div dir="ltr">
<div><br></div><div><br></div><div>OK, in terms of timing,... we could include Erik&#39;s work (see [2]) into our 1.0.0 release (of the quickstarts).</div></div></blockquote></div>And try to get the Forge JAX-RS generation updated</div>

<div><a href="https://issues.jboss.org/browse/FORGE-1916" target="_blank">https://issues.jboss.org/browse/FORGE-1916</a></div><div><br></div><div>Just provide the template code - the Forge team will do the rest.</div><div>

<div><br><blockquote type="cite"><div dir="ltr"><div>That means we would need to bring the Cordova behavior to iOS and Android (Summers has a POC that does similar bits around @Version Entities and Optimistic Locking (and returning 409), see [3]).</div>

</div></blockquote></div>Is this an update to just the quickstarts or to some framework/library code?</div></div></blockquote><div><br></div></div><div>to the quickstarts; see <a href="https://github.com/edewit/aerogear-push-quickstarts/tree/conflict" target="_blank">https://github.com/edewit/aerogear-push-quickstarts/tree/conflict</a></div>
<div><div class="h5">
<div><blockquote type="cite" style="color:rgb(80,0,80);font-family:arial,sans-serif;font-size:13px"><div dir="ltr"><br></div></blockquote></div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

<div style="word-wrap:break-word"><div><div><div><br><blockquote type="cite"><div dir="ltr">
<div>Or we do that after we released the AeroGear Mobile Push 1.0.0 to the community; So it could be bundled with an 1.0.1 in... let&#39;s say September.</div><div><br></div><div><br></div><div>About the long-term solution:</div>


<div><br></div><div>Dan and Luke will continue their research </div><div>--&gt; Server side POC <a href="https://github.com/danbev/aerogear-sync-server/tree/differential-synchronization" target="_blank">https://github.com/danbev/aerogear-sync-server/tree/differential-synchronization</a></div>


<div>--&gt; Client side POC <a href="https://github.com/lholmquist/ag-js-ds-poc" target="_blank">https://github.com/lholmquist/ag-js-ds-poc</a></div><div><br></div><div>We will be also reaching out to other groups, as we are not the only ones interested in &#39;sync&#39;</div>


<div><br></div><div>Any thoughts or questions ?</div><div>-Matthias</div><div><br></div><div><br></div><div>[1] <a href="https://github.com/forge/core/pull/481" target="_blank">https://github.com/forge/core/pull/481</a></div>

<div>[2] <a href="https://github.com/edewit/aerogear-push-quickstarts/tree/conflict" target="_blank">https://github.com/edewit/aerogear-push-quickstarts/tree/conflict</a></div>
<div>[3] Summers POC:</div><div>* <a href="https://github.com/secondsun/SmogRideAndroid" target="_blank">https://github.com/secondsun/SmogRideAndroid</a> (client)</div><div>* <a href="https://github.com/secondsun/SmogRide" target="_blank">https://github.com/secondsun/SmogRide</a> (Server)</div>


<div><br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Jul 4, 2014 at 9:46 AM, Erik Jan de Wit <span dir="ltr">&lt;<a href="mailto:edewit@redhat.com" target="_blank">edewit@redhat.com</a>&gt;</span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div style="word-wrap:break-word"><br><div><div><div>
On 4 Jul,2014, at 9:28 , Matthias Wessendorf &lt;<a href="mailto:matzew@apache.org" target="_blank">matzew@apache.org</a>&gt; wrote:</div><blockquote type="cite"><div dir="ltr"><div><div><br></div><div>2) Initial quick and simple solution based on JAX-RS and JPA:</div>



</div><div>- We have versioning in JPA (optimistic locking) - Use it (send 409 on server and send right data)</div></div></blockquote><blockquote type="cite"><div dir="ltr">-- Use JAX-RS ExceptionMapper for exceptions around the optimistic locking ?</div>


</blockquote><div><br></div></div><div>Added handling of OptimisticLockException to forge <a href="https://github.com/forge/core/pull/481" target="_blank">https://github.com/forge/core/pull/481</a> this will give clients a 409 so that they could show to the user that their copy was out of date. Now the client still need to react to this.</div>


<div><br><blockquote type="cite"><div dir="ltr">- Client library will have helper methods for managing data</div></blockquote><div><br></div></div><div>POC of client handeling this <a href="https://github.com/edewit/aerogear-push-quickstarts/tree/conflict/client/cordova/angular/www" target="_blank">https://github.com/edewit/aerogear-push-quickstarts/tree/conflict/client/cordova/angular/www</a> this will just show the client version and the server version and the user can choose which version to take</div>


<div><br><blockquote type="cite"><div dir="ltr"><div>
<div>- Use push to send notifications that data changed?</div><div>- JAX-RS Annotation to send notifications?</div></div><div><br></div></div></blockquote><div><br></div></div></div></div><br>_______________________________________________<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></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></div>
_______________________________________________<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></blockquote>

</div><br></div></div></div><br>_______________________________________________<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></blockquote></div></div></div><div><div class="h5"><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></div></div></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>