[aerogear-dev] First (Very Rough) Draft of JS AeroGear.SyncManager

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[aerogear-dev] First (Very Rough) Draft of JS AeroGear.SyncManager

Kris Borchers
So I have continued on from my basic data status tracking that I added to start doing some real syncing. This is very early and only "works" when you save to a store. I have started with an event based model where if a save is made to a store that has dataSync enabled, it fires a custom event on the document. From there, if a conductor (individual SyncManager instance named for the conductor of an orchestra keeping everyone "in sync") has been created that monitors this store, it will catch that event and attempt to perform a save to the pipe that was associated with this conductor on creation. Callbacks can be provided to perform actions on a success or error during sync in addition to the callbacks that would be fired on a normal pipe save but none of that has been tested. :)

This does introduce some API changes that I think are good and gets us on our way to an awesome new feature that I think devs will really appreciate.

Like I said, this is all very early but wanted to throw it out there before I am gone all next week. I would appreciate all thoughts.


Thanks,
Kris

P.S. - I hope this doesn't come through again but looks like my first attempt to send to the list failed.

_______________________________________________
aerogear-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-dev