4 ms·
> This forces developers to consider conflict resolution at the point they are writing APIs Would an example of what you have in mind be writing an atomic "/in
by sizediterable 7y ago
> This forces developers to consider conflict resolution at the point they are writing APIs
Would an example of what you have in mind be writing an atomic "/increment" endpoint instead of a "/set?value=possiblyOldValue+1" endpoint? (using GET notation instead of POST just to make illustration easier)
- aboodman 7y agoYep.
- zffr 7y agoFrom what I can tell from the website, replicache retries HTTP requests periodically until they succeed. With an non-idempotent request like `/increment` how does replicache know when to stop retrying? if request succeed, but the response fails, could replicache increment twice?
- aboodman 7y agoThe APIs Replicache calls at customer service must be idempotent. Replicache passes a version vector to the customer that customer uses to ensure this, and to enforce causal consistency. Customers must make several relatively small changes to their backends to support Replicache, including this one.