3 ms·
Most of these systems do deletes with tombstones. Then you can safely insert after/inbetween deleted items.
by gizmo 3y ago
Most of these systems do deletes with tombstones. Then you can safely insert after/inbetween deleted items.
- moralestapia 3y agoIs the solution to that, a) [1, 5] or b) [1, <new element>, 5] ?
- chrisco255 3y agoBy your example, 5 was marked as deleted, so it would just be [1, <new element>]. Most likely this would be implemented with a single mutator for each element. But if you implemented a "range delete", then it would depend on what the order of arrival was. Notably, the server has to sequence actions somehow, so there isn't going to be an issue of "all actions arriving at the same time". If C arrived last in that case, the new element would be there. But if C arrived first, you'd just be left with [1].
- moralestapia 3y agoWhoops, you're right, Is the solution to that, a) [1] or b) [1, <new element>] ? >Notably, the server has to sequence actions somehow [...] Yes, that's my whole point, you have to fallback to something like LLW, and then it's over for the transactional model :P. Edit: Btw, I'm not trying to be the snarky, pessimistic dude. This kind of models are really interesting and I love working with them. I am just trying to illustrate how things could go awry without much complexity involved.
- chrisco255 3y agoNo, the server is going to process the actions in a single queue. So again, it's whatever action arrives first.
- moralestapia 3y agoThen it's LLW and you're no longer playing this game.
- chrisco255 3y agoI don't know what LLW means, but you seem fixated on the acronym. It's just first come, first serve transaction ordering from the world I come from.
- gnat 3y agoPerhaps it's a typo/braino for LWW, Last Write Wins.
- moralestapia 3y agoIt is! Thanks!