[aerogear-dev] Sync - Server items (JAX-RS and JPA)
Burr Sutter
bsutter at redhat.com
Wed Jul 9 11:11:26 EDT 2014
On Jul 9, 2014, at 11:03 AM, Matthias Wessendorf <matzew at apache.org> wrote:
> Hi,
>
> we had a meeting on this 'server side' sync topic. In terms of delivering a 'quick solution' around JavaEE (JAX-RS/JPA):
>
> 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):
> https://github.com/edewit/aerogear-push-quickstarts/tree/conflict
>
> ==> It basically is "optimistic locking" and returning 409 to the client, telling there is a conflict; NOTE: there is NO merge.
>
> What we could do....
in what timeframe? :-)
> * Provide an annotation for all of that work (outside of the quickstart, as a "library");
that could be interesting, but how much boilderplate code is it eliminating? 10 lines?
> * we could also integrate the push notification delivery on conflicts (not sure it really makes sense, for now...).
Seems like overkill to me
>
> 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.
>
>
> OK, in terms of timing,... we could include Erik's work (see [2]) into our 1.0.0 release (of the quickstarts).
And try to get the Forge JAX-RS generation updated
https://issues.jboss.org/browse/FORGE-1916
Just provide the template code - the Forge team will do the rest.
> 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]).
Is this an update to just the quickstarts or to some framework/library code?
> 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.
>
>
> About the long-term solution:
>
> Dan and Luke will continue their research
> --> Server side POC https://github.com/danbev/aerogear-sync-server/tree/differential-synchronization
> --> Client side POC https://github.com/lholmquist/ag-js-ds-poc
>
> We will be also reaching out to other groups, as we are not the only ones interested in 'sync'
>
> Any thoughts or questions ?
> -Matthias
>
>
> [1] https://github.com/forge/core/pull/481
> [2] https://github.com/edewit/aerogear-push-quickstarts/tree/conflict
> [3] Summers POC:
> * https://github.com/secondsun/SmogRideAndroid (client)
> * https://github.com/secondsun/SmogRide (Server)
>
>
>
> On Fri, Jul 4, 2014 at 9:46 AM, Erik Jan de Wit <edewit at redhat.com> wrote:
>
> On 4 Jul,2014, at 9:28 , Matthias Wessendorf <matzew at apache.org> wrote:
>>
>> 2) Initial quick and simple solution based on JAX-RS and JPA:
>> - We have versioning in JPA (optimistic locking) - Use it (send 409 on server and send right data)
>> -- Use JAX-RS ExceptionMapper for exceptions around the optimistic locking ?
>
> Added handling of OptimisticLockException to forge https://github.com/forge/core/pull/481 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.
>
>> - Client library will have helper methods for managing data
>
> POC of client handeling this https://github.com/edewit/aerogear-push-quickstarts/tree/conflict/client/cordova/angular/www this will just show the client version and the server version and the user can choose which version to take
>
>> - Use push to send notifications that data changed?
>> - JAX-RS Annotation to send notifications?
>>
>
>
> _______________________________________________
> aerogear-dev mailing list
> aerogear-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/aerogear-dev
>
>
>
> --
> Matthias Wessendorf
>
> blog: http://matthiaswessendorf.wordpress.com/
> sessions: http://www.slideshare.net/mwessendorf
> twitter: http://twitter.com/mwessendorf
> _______________________________________________
> aerogear-dev mailing list
> aerogear-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/aerogear-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/aerogear-dev/attachments/20140709/2e7ad44b/attachment-0001.html
More information about the aerogear-dev
mailing list