[aerogear-dev] Concerns on JS Conflict Resolution lib
lholmqui at redhat.com
Mon Dec 15 11:31:08 EST 2014
So i have some concerns on the Current state of the conflit resolution POC that i created.
in it's current state, i had 3 methods in the api
* Read - just a GET
* Save - PUT/POST with an added "conflict" callback to handle the conflict resolution
* Remove - just a DELETE
This was all done before we wrote this spec
but even then, from the JS client perspective, it felt a lot like a pipe. In jQuery.ajax, you can actually listen for a "409".
The other thing that concerns me is that on the client side, people are using frameworks such as Ember, Angular, Backbone,etc... that have there own ways of doing server requests so i would hate to start re-inveting the wheel again.
while the read/remove don't really do anything different(they are just GET/DELETE's), the save method(PUT/POST) does. This is were all the "conflict resolution happens”. (what type on resolution algorithm, auto-merge, etc...)
I think it would be interesting to try to integrate this part into existing frameworks, rather than trying to create Pipeline again.
i think for node.js this might be interesting too, since we could create a piece of middleware that hooks into an express/connect request
Again, this might only be a concern on the JS client side, not sure what the other platforms are like in this regard
More information about the aerogear-dev