News for hackers. Stuff that matters.
Re:Asana S-1 by swyx on Tuesday August 25, 2020 @08:47AM (#24270737)
why both? isn't that wasteful? which one wins if they disagree? do you sync both at the same frequency?
Re:Asana S-1 by eloff on Tuesday August 25, 2020 @02:19PM (#24274309)
It depends on the business logic. If e.g. a user updates a numeric value on an entity, and there's a conflict probably you choose the most recent value. The action taken (user updates value) is pretty useless in this case. In other cases, e.g. inventory reduced by X because X units purchased/consumed - then it's more important to have the action itself, and a conflict would involve applying both actions and possibly alerting someone if that causes the value to be invalid (e.g. inventory below 0.)