Getting started - AndersMalmgren/Knockout.Concurrency GitHub Wiki
For the simplest of scenarios this could do
ViewModel = function() {
this.name = ko.observable("John").extend({ concurrency: true});
this.getData = function() {
//Simulate backend data
var data = { name: "John Doe" };
new ko.concurrency.Runner().run(this, data);
}
}
ko.applyBindings(new ViewModel());
-
Add the Concurrency extender to your observable
-
When you receive new data from your backend call the concurrency engine to check for conflicts
new ko.concurrency.Runner().run(this, data);
Without any additional config the framework also supports arrays http://jsfiddle.net/rCVk4/6/