Skip to content
This repository has been archived by the owner on Oct 22, 2021. It is now read-only.

Commit

Permalink
update TODO.
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert Newson committed Feb 17, 2011
1 parent c9ed43e commit 8293f94
Showing 1 changed file with 39 additions and 1 deletion.
40 changes: 39 additions & 1 deletion TODO
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
* streaming - DONE
* checksums - 1/2 DONE, created on write but not verified on read
* checksums - DONE
* cookies - DONE
* reader concurrency
* preallocation
Expand All @@ -12,3 +12,41 @@
* Eof tracked in header.
* start at Eof and skip over all entries to real Eof, write down new Eof if different.

== caching ==

* make metadata files.
* keep ets of metadata.
* {Group, Key, Cookie} -> {File, Offset}

== API ==

Lookup by key as location will change on compaction.

=== READ ===

read(Group, Key, Cookie, Fun) -> {ok, Bin} | {error, Reason}
read(Group, Key, Cookie, Ranges, Fun) -> ok | {error, Reason}

Fun is called with;

{ok, Bin} - a chunk of data.
{checksum, verified|failed} - checksum validity.
eof - end of data.
{error, Reason} - error while reading.

=== WRITE ===

write(Group, Key, Fun) -> {ok, Cookie} | {error, Reason}

Fun is called with one argument, the maximum number of bytes to return in a chunk.

The fun may evaluate to any of the following;

{ok, Bin} - a chunk of data.
eof - end of data.
{error, Reason} - error while reading.

=== MISC ===

delete(Group, Key, Cookie) -> ok | {error, Reason}
compact(Group) -> ok

0 comments on commit 8293f94

Please sign in to comment.