DJDNS / go-deje

Golang library for DEJE Next, a protocol/technology for decentralized document hosting and concurrent editing.
GNU Lesser General Public License v2.1
8 stars 0 forks source link

Obsolete DocumentFile in favor of serializable Document #7

Closed MaddieM4 closed 10 years ago

MaddieM4 commented 10 years ago

This dichotomy is a bit silly, when we can be selective about what we expose to the JSON serializer. The real reason for this being separate, was the Manager system, but that's hopefully going away in #6. Hoo-rah.

Tricky bit will be deserialization. We don't want to trust the external system's hashing, but we probably also don't want to distrust it in an expensive way. So we'll need a Validate() function that checks all the items to be sure they live in the right hash, moving them if necessary, and completely reconstructing the ThingByGroup fields in the process.

Come to think of it, this will probably require the logic/model unification to happen first. Ick. I was hoping to do this as an incremental step leading up to the unification, but considering that the files will need to serialize and deserialize Events and Quorums....