jakearchibald / jakearchibald/byte-storage

streams are too high level

Open
#9 1 comment 3 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
42
Forks
2
PR merge metrics
No merged PRs in 30d

Description

I would like to suggest making the base level operation a simple read of a byte range that returns that exact byte range, and then build the stream api on top of that.

basically, just something analgous to POSIX _read_ and _write_ https://www.gnu.org/software/libc/manual/html_node/I_002fO-Primitives.html

if you are building an interesting on disk data structure like say, an append only b-tree, there are a lot of small things to read (branches in the tree) these are likely to be a single block or smaller, so creating a whole stream for that is a significant overkill.

streams can be useful too, but if you have a simple read/write you can _make_ efficient streams, but not the other way around.

Contributor guide

No contributing guide indexed for this repository

Research direction

The issue names no files or tests. Start by locating the current stream API and its read/write entry points, then compare them with the proposed exact byte-range operations. Done means agreeing on the base API and how streams would be built on top of it.

Written by the indexing model from the issue text.

Assessment

Domain
api
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.