Comments (3)
I'd like to include in the spec a strategy for handling the entries and operations contained in a deleted document. I believe there is a good strategy which is a compromise between respecting data deletion requests & retaining the log id ordering we need. I'll flesh out my proposal below. I think what I'm suggesting is a little harder than we've been imagining, probably because we love pinned relations ;-p I like the idea of starting from "delete means delete" (as far as that is possible) and then refining that to not make pinned relations broken and annoying.
PROPOSAL:
When a document is found to contain a DELETE operation a node SHOULD:
- delete all operations associated with this document for every author
- delete all entries except where
seq_num == 1
for every authorThe exception to this rule are documents which follow a system schema, these MUST NOT be purged as described above.
This would mean that the document is in effect "gone" (it's CREATE operation has been deleted) and any incoming operations targeting this document would be rejected. A node would no longer replicate entries associated with this document on the network. I used SHOULD in the requirement above as this leaves a little flexibility to the node to retain, for example, known about pinned relations.
PROS:
- well.... deletion!
- it's a simple approach but still rewards us with full payload deletion and a fair amount of entry deletion.
- we don't break our rule for strictly incrementing log IDs
CONS:
- we lose all document views for a deleted document, pinned relations would break which refer to these views (this is a PRO depending on how you look at it I suppose).
- we lose metadata about the document (is deleted)
ALTERNATIVE APPROACHES:
- retain the DELETE operation/payload and entry plus a route from it to the root of the document (this needs a lot more unpacking). This means we would retain meta data info about a document (it existed once, and is now deleted) . It means more complexity though and could be looked at / added later.
FUTURE:
- this could be adapted in the future to allow nodes to make more fine grained decisions about deletion, as discussed here
from handbook.
Actually, in order to make sure the deletion request propagates/persists on the network, we probably need to retain the DELETE operation so it can be replicated further. This means the "alternative approach" might actually be required.
from handbook.
This is now specified under requirement OP9
https://p2panda.org/specification/data-types/operations so I will close this issue.
However, the specification needs further consideration and so I will open a new issue to discuss that.
from handbook.
Related Issues (20)
- Specify yasmf HOT 1
- Finally specify document deletion HOT 2
- Grammour and spellning sanity check HOT 3
- Glossary of terms
- Validate that relations in an operations fields exist HOT 1
- Specify strictly incrementing log ids HOT 1
- How can a schema create a relation to itself? HOT 1
- Authenticated query routes
- Sub-nets
- More boringer ideas for lib/repo naming
- Extremely portable schema HOT 2
- Specification of `SchemaId` differs from implementation in `p2panda-rs`
- Clients query remote node while local one syncs
- Requirement `OP9` (operation deletion) is not correct
- Find a solution to deploy more than one static page
- Document exclusion lists facilitating deletion HOT 3
- Replication: Make operation bytes optional in `Entry` message
- Replication: require entries to arrive in topologically sorted order
- Validation: require that concurrent updates cannot be published from the same author HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from handbook.