||Mechiel Lukkien <email@example.com>|
||Fri, 17 Aug 2007 22:16:46 +0200|
||remove unpackroot and unpackentry, they are in vac.m and appl/lib/vac.b (as Entry.unpack and Root.unpack).
Venti \- access to Venti content-addressed filestore.
venti := load Venti Venti->PATH;
new: fn(fd: ref Sys->FD): ref Session;
read: fn(s: self ref Session, score: Venti->Score, etype: int, maxn: int): array of byte;
write: fn(s: self ref Session, etype: int, buf: array of byte): (int, Venti->Score);
sync: fn(s: self ref Session): int;
eq: fn(a: self Score, b: Score): int;
text: fn(a: self Score): string;
parse: fn(s: string): (int, Score);
is a block storage server intended for archival applications.
module provides low-level access to a Venti server.
The module assumes that the physical connection
to the server has already been established
On a Venti server, a block is addressed by the SHA1 hash of
the contents of that block, known as a
Blocks are additionally tagged with a
facilitating recovery in the event of corruption.
represents an session with a Venti server.
performs the initial handshake with the Venti server,
.IB s .read(\fIscore\fP,\ \fIetype\fP,\ \fImaxn\fP)
tries to retrieve the block
The block must be no longer than
is conventionally one of the constants
.BR Pointertype [0-9],
represent different depth levels within a Venti tree.
.IB s .write(\fIetype\fP,\ \fIbuf\fP)
The block will be tagged with type
It returns a tuple, say
contains the Venti score for the block that has been written.
tells the Venti server to make sure that all data is committed to