Opened at 2008-05-09T01:26:07Z
Last modified at 2013-07-27T01:44:34Z
#413 new enhancement
mutable files: expose version info to HTTP clients
Reported by: | warner | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | eventually |
Component: | code-frontend-web | Version: | 1.0.0 |
Keywords: | mutable integrity versioning webapi wui | Cc: | |
Launchpad Bug: |
Description (last modified by zooko)
in #328, we overhauled the internal API for mutable files, to make them safe to use for structured data that requires test-and-set semantics. But this is not currently exposed to the webapi: clients using HTTP can only blindly overwrite mutable files, making them unsuitable for carrying more structured data that must be manipulated outside the tahoe node.
I'm not convinced that passing a servermap outside (and back into!) the tahoe node over HTTP is a good idea. Maybe passing a handle to one might be safe.
If you like this ticket, you might also like #906.
Change History (11)
comment:1 Changed at 2008-06-01T20:48:57Z by warner
- Milestone changed from eventually to undecided
comment:2 Changed at 2008-12-06T05:04:45Z by warner
comment:3 Changed at 2011-07-23T02:20:12Z by davidsarah
I don't think that the sequence number alone is sufficient for test-and-set semantics, since there might be different shares with the same sequence number. By 'roothash', do you mean a hash that depends on the contents of the (encrypted and encoded) current version, or one that only depends on which file this is? If the former then a (sequence_number, roothash) pair would be sufficient.
#993 will probably add an internal API to get the sequence number. Should this get the (sequence_number, roothash) pair instead?
comment:4 Changed at 2011-07-23T02:21:24Z by davidsarah
- Keywords integrity added
- Milestone changed from undecided to eventually
comment:5 Changed at 2011-07-24T03:35:51Z by zooko
"roothash" means the root of the Merkle Tree over the (encrypted) shares of one specific version of the file, so it is sufficient to uniquely identify one version. Yes, everything that talks about "versions" of mutable files should specify the version as a (sequence_number, roothash) tuple.
comment:6 Changed at 2013-07-26T23:22:56Z by zooko
- Description modified (diff)
comment:7 follow-up: ↓ 8 Changed at 2013-07-27T01:27:40Z by daira
Let's split the more ambitious second and third bullets of comment:2 into a separate ticket and just make this about exposing the sequence number and roothash in t=json and t=info -- otherwise it's too much to implement in one go.
comment:8 in reply to: ↑ 7 Changed at 2013-07-27T01:33:32Z by daira
comment:9 Changed at 2013-07-27T01:34:52Z by daira
- Summary changed from mutable files: expose version info to HTTP clients? to mutable files: expose version info to HTTP clients
comment:10 Changed at 2013-07-27T01:35:30Z by daira
- Keywords versioning webapi wui added
comment:11 Changed at 2013-07-27T01:44:34Z by daira
Okay, so we should represent the version info in some way that can be put in an HTTP query arg without encoding. How about a decimal sequence number, a '.' (which is unreserved in URIs), and a zbase32 hash?
Zooko and chatted a bit about this tonight. It might be sufficient to pass a single version identifier. Mutable files have a sequence-number / roothash pair which points to a specific version of the file's contents. This does not contain as much information as the full servermap, but it might be enough.
The webapi for this might look like:
Both mutable files and directories could have a control like this.