With single-decree Paxos you can write a storage which provides the following API:
function changeQuery(key, change, query) {
var value=this.db.get(key); value = change(value);
this.db.commit(key, value);
return query(value);
}
By providing different implementations of change & query you can achieve different beviour including CAS.
With single-decree Paxos you can write a storage which provides the following API:
function changeQuery(key, change, query) {
var value=this.db.get(key); value = change(value);
this.db.commit(key, value);
return query(value);
}
By providing different implementations of change & query you can achieve different beviour including CAS.