Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider changing directory fanout scheme in "Annex A: Filesystem Storage" #59

Open
alilleybrinker opened this issue Sep 20, 2023 · 0 comments
Labels
c-spec Category: Improvements or additions to the OmniBOR specification

Comments

@alilleybrinker
Copy link
Member

Per @jsgf's comment in #37:

${OMNIBOR_DIR}/objects/${Artifact Identifier Type uri prefix with ':' replaced by '_'}/${OmniBORID:0:2}/${OmniBORID:2:}

The two-digits/rest-of-digits technique for doing directory fanout has always bugged me. Why not do two-digits/all-digits just so that you can do, for example find -name full-id without having to muck about?

This has not yet been resolved. The options so far presented are:

  • Keep as-is: Continue to structure directories with the first two characters of the ID as the outer directory name, and the remaining characters in the interior directory.
  • Change to Jeremy's scheme: Continue using the first two characters of the ID for the outer directory name, but then use all characters in the interior directory.

Considerations:

  • The existing scheme matches what Git does; may be more familiar to some consumers (human and automated) of OmniBOR data.
  • Duplicating the initial two characters results in longer names. Some may object to the duplication / waste of the two additional characters. Windows has a limit on path names, so the additional two characters may constrain valid OMNIBOR_DIR settings on Windows.
  • Having the full name in the interior path makes finding the relevant data easier (as Jeremy suggests with the find -name <full-id> command).

There may be additional options for what to do here as well.

@alilleybrinker alilleybrinker added the c-spec Category: Improvements or additions to the OmniBOR specification label Sep 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c-spec Category: Improvements or additions to the OmniBOR specification
Projects
None yet
Development

No branches or pull requests

1 participant