share / sharedb-postgres

PostgreSQL adapter for ShareDB
MIT License
46 stars 22 forks source link

What's the purpose of the op-table? #9

Closed buffpojken closed 1 week ago

buffpojken commented 5 years ago

Sorry if this is the inappropriate place for this question - but what's the purpose of the op-table?

As far as I can tell, the snapshot-table contains everything needed to maintain a proper, conflict-managed version of a given document? Is the op-table for history-purposes like replay, undo/redo or similar?

alecgibson commented 1 week ago

The op table is needed to resolve conflicts, since out-of-date inflight ops need to be transformed against other ops that have been committed. It's also used to catch old clients up to the current version without sending the whole snapshot.