Ian Clarke wrote:
> 
> 
> Well, if you let us know how you propose to implement versioning, I will
> be happy to point-out the disadvantages of doing it ;-)
> 
> Ian.


Fair enough.  

The basic issue is how to update content.  A versioning system would not
allow any document to be modified or deleted to be replaced by a newer
version.  The old version would hang around the system until it was
eventually dropped from the datastore, or not if it was popular enough. 
Two capabilities need to be provided.  The ability to retrieve the
latest version of the document automatically and the ability to access a
specific version.

To retrieve a later version of a document, you should be able to make
another request using the same search key.  If Freenet encounters two
versions of the same document using the same key, it should return the
newer one.  This implies that the version information is seperate from
the plaintext the search key is hashed from.  One option is to make a
'Version' header field.

So, a node receives a request for a document with no version information
specified.  If the doc is not in its datastore, it forwards the request
as normal.  If the doc is in the datastore, the node forwards the
request as normal but adds a header field of 'Version.GreaterThan' the
document it already has.  If that request fails, it returns the doc in
its datastore.  If the request returns a doc with a later version, that
version is passed to the node that originated the request and optionally
placed in the datastore. Clients (or nodes) could also add a header
field of 'Version.Equals' or some such to request a specific version of
a document.

For inserts, the author would set the version header field to a proper
value and include a public key to authenticate the document.  If a node
determines that this document is authentic, it places it in its data
store.  Eventually, the older version will be purged.

That's the general idea.  Fire away. :)

_______________________________________________
Freenet-dev mailing list
Freenet-dev at lists.sourceforge.net
http://lists.sourceforge.net/mailman/listinfo/freenet-dev

Reply via email to