Post edition is one the the killer features that currently lack to diaspora*. So, I think it would be a nice time to start a discussion on technical blocking points and how to solve them.
The main problem I see, currently is the risk to loose consistency of a post across pods and time. Currently, a post can has only two states : it exists or not. So, the risk of loosing consistency is limited. Though, we sometimes see this problem of unconsistency when someone deletes a post. So, I’d say the question is mainy about:
- how to detect and correct inconsistencies,
- limit the possibility for consistencies to appear.
The second point is mainly related to one of the axioms of the CAP theorem: there is an incompressible time between the moment the data is written on pod A, transmitted through network, and written on pod B. So, consistency lost can be limited by limiting the possibility to edit a post for a certain time.
For instance, user writes a post on pod A but he is not satisfied and decides to edit it. The edition is taken in account, but will be transmitted to other pod ten minutes after creation or last edition. During this time, every new edition erases last one on user’s pod but not yet transmited.
The second point can be solved, IMHO, by adding to metadata to posts or comments. The data can be of two types :
A simple data is a data whom hash value can be easily computed (basically a text). This is basically any comment. A complex is a data which is composed of either other complex data, either simple ones. A complex’s data hash can be computed from the hash computation of all of its child.
So, the idea is the following: when a pod receives a new data, both its current and previous hash keys are transitted. If the previous hash doesn’t corresponds to the one the pod already have, then it knows it has missed data and can ask the origin pod to transmit the last version of the data so that unconsistency are corrected.
Please tell me your remarks.
Note: This discussion was imported from Loomio. Click here to view the original discussion.