<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><br><div><div>On Jul 9, 2014, at 11:03 AM, Matthias Wessendorf &lt;<a href="mailto:matzew@apache.org">matzew@apache.org</a>&gt; wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr"><div>Hi,</div><div><br></div><div>we had a meeting on this 'server side' sync topic. In terms of delivering a 'quick solution' around JavaEE (JAX-RS/JPA):&nbsp;</div><div><br></div><div>Erik'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">https://github.com/edewit/aerogear-push-quickstarts/tree/conflict</a></div><div><br></div><div>==&gt; It basically is "optimistic locking" 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>in what timeframe? :-)<br><blockquote type="cite"><div dir="ltr"><div>* Provide an annotation for all of that work (outside of the quickstart, as a "library");</div></div></blockquote>that could be interesting, but how much boilderplate code is it eliminating? 10 lines?<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>Seems like overkill to me<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 'sync server'. I liked Summers comment: "I think the EE stuff is a stop gap until the sync server is done IE the cheap 50% solution". I agree with that; Eventually it will go away in fav. of the 'sync-server' 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's work (see [2]) into our 1.0.0 release (of the quickstarts).</div></div></blockquote>And try to get the Forge JAX-RS generation updated</div><div><a href="https://issues.jboss.org/browse/FORGE-1916">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><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>Is this an update to just the quickstarts or to some framework/library code?</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'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&nbsp;</div><div>--&gt; Server side POC <a href="https://github.com/danbev/aerogear-sync-server/tree/differential-synchronization">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">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 'sync'</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">https://github.com/forge/core/pull/481</a></div><div>[2] <a href="https://github.com/edewit/aerogear-push-quickstarts/tree/conflict">https://github.com/edewit/aerogear-push-quickstarts/tree/conflict</a></div>
<div>[3] Summers POC:</div><div>* <a href="https://github.com/secondsun/SmogRideAndroid">https://github.com/secondsun/SmogRideAndroid</a> (client)</div><div>* <a href="https://github.com/secondsun/SmogRide">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 class=""><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&nbsp;ExceptionMapper for exceptions around the optimistic locking ?</div>
</blockquote><div><br></div></div><div>Added handling of OptimisticLockException to forge&nbsp;<a href="https://github.com/forge/core/pull/481" target="_blank">https://github.com/forge/core/pull/481</a>&nbsp;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 class=""><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&nbsp;<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>&nbsp;this will just show the client version and the server version and the user can choose which version to take</div>
<div class=""><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">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">aerogear-dev@lists.jboss.org</a><br>https://lists.jboss.org/mailman/listinfo/aerogear-dev</blockquote></div><br></body></html>