josephg / ShareJS

Collaborative editing in any app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Combine operations retroactively

kctess5 opened this issue · comments

Is there currently a way to merge past operations? I can see large collaborative documents amassing tens of or even hundreds of thousands of operations over time, which is pretty data and runtime inefficient. It makes much more sense to keep old (like a few months old) changes that are on a larger scale - say sentences long changes instead of letter long changes. I would imagine that this would allow you to retrieve document state at an earlier time more efficiently, considering that you would need to invert and apply less operations.

Some kind of support for retroactively combining operations while maintaining intention preservation would be great.

Something that would also be great, but is perhaps out of the scope of this library would be to maintain a redis copy of the data in memory for active documents (with an arbitrary definition of "active"), and then merge an arbitrary number of changes and push a small number of larger operations to the main database every once in a while. This would theoretically greatly reduce database traffic and also speed up the process of sending out applied changes to the other clients.

As is the same with my previous issue request, I might end up tackling this myself if there is no current support for it - so any suggestions would be welcome.

👍 For reference, see also share/sharedb#25 and share/sharedb-mongo#7

@kctess5 did you ever make any progress on this?