simonsoft / authormodel

Authormodel is an abstraction between your average WYSI-whatever editor and your storage. It supports Structured Documentation.
https://www.npmjs.com/package/authormodel
0 stars 1 forks source link

Implement linked sorting #17

Open solsson opened 9 years ago

solsson commented 9 years ago

Array-based sort order, i.e. Backbone's default, is unappropriate for collaboration because it won't let us sacrifice the C in CAP theorem.

Units should instead be ordered based on a referencing field. Possibly with fallback to timestamp from #15.

Ideally a change of sort order should only affect the unit that is being moved.

This issue meas we need to reconsider #9, as "up" and "down" based on index won't be supported. Only move.after is native. Up and down must be abstractions on top of that, and assume that local state is ok.