-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Internal organization for this repository (internal, core, shell, http, cmd, test) #1158
Comments
all SGTM. except one comment:
|
On Tue, Apr 28, 2015 at 04:53:28PM -0700, Juan Batiz-Benet wrote:
I expect we'll have stuff that's so low-level that we can't imagine |
Starting to use the core/... (low-level, all the knobs you need) shell/... (high-level, handle the common case easily) disctinction laid out in [1]. Creating a file node from a reader is hard to do right, because there's a lot of filesystem metadata that we don't have access to (access mode, ownership, etc.). You can guess at those based on the adding process's umask, effective user, etc., but figuring out what you want guessed at or what you want set explicitly, or whether you want wrapping metadata at all is complicated. This function isn't going to do any of that [2], it's just a high-level wrapper to create a minimal file object with the default chunking, pinning, etc. all taken care of in ways that will probably work for you ;). [1]: ipfs#1158 [2]: ipfs#1136 (comment)
Folks should be using the node-returning AddFromReader defined in shell/fsnode instead, since that creates the same node but returns the dag.Node object itself, instead of the stringified key. It's cheaper to go from Node to stringified key than it is to go the other way around, and you need the Node to do anything besides printing the stringified key, so the shell/fsnode version has a better API and we want to push people in that direction. The shell/fsnode version also uses our intended high-/low-level API distinction (core/... is for low-level stuff) [1]. This commit starts the deprecation/migration using the procedure outlined here [2]. [1]: ipfs#1158 [2]: ipfs#1159
Starting to use the core/... (low-level, all the knobs you need) shell/... (high-level, handle the common case easily) disctinction laid out in [1]. Creating a file node from a reader is hard to do right, because there's a lot of filesystem metadata that we don't have access to (access mode, ownership, etc.). You can guess at those based on the adding process's umask, effective user, etc., but figuring out what you want guessed at or what you want set explicitly, or whether you want wrapping metadata at all is complicated. This function isn't going to do any of that [2], it's just a high-level wrapper to create a minimal file object with the default chunking, pinning, etc. all taken care of in ways that will probably work for you ;). [1]: ipfs#1158 [2]: ipfs#1136 (comment)
Folks should be using the node-returning AddFromReader defined in shell/fsnode instead, since that creates the same node but returns the dag.Node object itself, instead of the stringified key. It's cheaper to go from Node to stringified key than it is to go the other way around, and you need the Node to do anything besides printing the stringified key, so the shell/fsnode version has a better API and we want to push people in that direction. The shell/fsnode version also uses our intended high-/low-level API distinction (core/... is for low-level stuff) [1]. This commit starts the deprecation/migration using the procedure outlined here [2]. [1]: ipfs#1158 [2]: ipfs#1159
Starting to use the core/... (low-level, all the knobs you need) shell/... (high-level, handle the common case easily) disctinction laid out in [1]. Creating a file node from a reader is hard to do right, because there's a lot of filesystem metadata that we don't have access to (access mode, ownership, etc.). You can guess at those based on the adding process's umask, effective user, etc., but figuring out what you want guessed at or what you want set explicitly, or whether you want wrapping metadata at all is complicated. This function isn't going to do any of that [2], it's just a high-level wrapper to create a minimal file object with the default chunking, pinning, etc. all taken care of in ways that will probably work for you ;). I'm not clear on where the 'unix' part of the name comes from (these seem like pretty generic filesystem nodes to me, or if anything, they're POSIX filesystem nodes), but: On Wed, Apr 29, 2015 at 01:30:04PM -0700, Juan Batiz-Benet wrote [3]: > > package fsnode > > i think this package should be called unixfs as that's the > abstraction that this is calling to. So that's what we're going with. [1]: ipfs#1158 [2]: ipfs#1136 (comment) [3]: ipfs#1136 (comment)
Folks should be using the node-returning AddFromReader defined in shell/unixfs instead, since that creates the same node but returns the dag.Node object itself, instead of the stringified key. It's cheaper to go from Node to stringified key than it is to go the other way around, and you need the Node to do anything besides printing the stringified key, so the shell/unixfs version has a better API and we want to push people in that direction. The shell/unixfs version also uses our intended high-/low-level API distinction (core/... is for low-level stuff) [1]. This commit starts the deprecation/migration using the procedure outlined here [2]. [1]: ipfs#1158 [2]: ipfs#1159
Starting to use the core/... (low-level, all the knobs you need) shell/... (high-level, handle the common case easily) disctinction laid out in [1]. Creating a file node from a reader is hard to do right, because there's a lot of filesystem metadata that we don't have access to (access mode, ownership, etc.). You can guess at those based on the adding process's umask, effective user, etc., but figuring out what you want guessed at or what you want set explicitly, or whether you want wrapping metadata at all is complicated. This function isn't going to do any of that [2], it's just a high-level wrapper to create a minimal file object with the default chunking, pinning, etc. all taken care of in ways that will probably work for you ;). I'm not clear on where the 'unix' part of the name comes from (these seem like pretty generic filesystem nodes to me, or if anything, they're POSIX filesystem nodes), but: On Wed, Apr 29, 2015 at 01:30:04PM -0700, Juan Batiz-Benet wrote [3]: > > package fsnode > > i think this package should be called unixfs as that's the > abstraction that this is calling to. So that's what we're going with. [1]: ipfs#1158 [2]: ipfs#1136 (comment) [3]: ipfs#1136 (comment)
Folks should be using the node-returning AddFromReader defined in shell/unixfs instead, since that creates the same node but returns the dag.Node object itself, instead of the stringified key. It's cheaper to go from Node to stringified key than it is to go the other way around, and you need the Node to do anything besides printing the stringified key, so the shell/unixfs version has a better API and we want to push people in that direction. The shell/unixfs version also uses our intended high-/low-level API distinction (core/... is for low-level stuff) [1]. This commit starts the deprecation/migration using the procedure outlined here [2], with the API-release-notes directory proposed here [3] and accepted here [4]. [1]: ipfs#1158 [2]: ipfs#1159 [3]: https://github.com/ipfs/go-ipfs/pull/1136/files#r29379579 [4]: https://github.com/ipfs/go-ipfs/pull/1136/files#r29498385
Discussion in [1]. [1]: ipfs#1158
Based on [1]. [1]: ipfs#1158
Starting to use the core/... (low-level, all the knobs you need) shell/... (high-level, handle the common case easily) disctinction laid out in [1]. Creating a file node from a reader is hard to do right, because there's a lot of filesystem metadata that we don't have access to (access mode, ownership, etc.). You can guess at those based on the adding process's umask, effective user, etc., but figuring out what you want guessed at or what you want set explicitly, or whether you want wrapping metadata at all is complicated. This function isn't going to do any of that [2], it's just a high-level wrapper to create a minimal file object with the default chunking, pinning, etc. all taken care of in ways that will probably work for you ;). I'm not clear on where the 'unix' part of the name comes from (these seem like pretty generic filesystem nodes to me, or if anything, they're POSIX filesystem nodes), but: On Wed, Apr 29, 2015 at 01:30:04PM -0700, Juan Batiz-Benet wrote [3]: > > package fsnode > > i think this package should be called unixfs as that's the > abstraction that this is calling to. So that's what we're going with. [1]: ipfs#1158 [2]: ipfs#1136 (comment) [3]: ipfs#1136 (comment)
Folks should be using the node-returning AddFromReader defined in shell/unixfs instead, since that creates the same node but returns the dag.Node object itself, instead of the stringified key. It's cheaper to go from Node to stringified key than it is to go the other way around, and you need the Node to do anything besides printing the stringified key, so the shell/unixfs version has a better API and we want to push people in that direction. The shell/unixfs version also uses our intended high-/low-level API distinction (core/... is for low-level stuff) [1]. This commit starts the deprecation/migration using the procedure outlined here [2], with the API-release-notes directory proposed here [3] and accepted here [4]. [1]: ipfs#1158 [2]: ipfs#1159 [3]: https://github.com/ipfs/go-ipfs/pull/1136/files#r29379579 [4]: https://github.com/ipfs/go-ipfs/pull/1136/files#r29498385
this is good enough for now |
Starting to use the core/... (low-level, all the knobs you need) shell/... (high-level, handle the common case easily) disctinction laid out in [1]. Creating a file node from a reader is hard to do right, because there's a lot of filesystem metadata that we don't have access to (access mode, ownership, etc.). You can guess at those based on the adding process's umask, effective user, etc., but figuring out what you want guessed at or what you want set explicitly, or whether you want wrapping metadata at all is complicated. This function isn't going to do any of that [2], it's just a high-level wrapper to create a minimal file object with the default chunking, pinning, etc. all taken care of in ways that will probably work for you ;). I'm not clear on where the 'unix' part of the name comes from (these seem like pretty generic filesystem nodes to me, or if anything, they're POSIX filesystem nodes), but: On Wed, Apr 29, 2015 at 01:30:04PM -0700, Juan Batiz-Benet wrote [3]: > > package fsnode > > i think this package should be called unixfs as that's the > abstraction that this is calling to. So that's what we're going with. [1]: ipfs#1158 [2]: ipfs#1136 (comment) [3]: ipfs#1136 (comment)
Folks should be using the node-returning AddFromReader defined in shell/unixfs instead, since that creates the same node but returns the dag.Node object itself, instead of the stringified key. It's cheaper to go from Node to stringified key than it is to go the other way around, and you need the Node to do anything besides printing the stringified key, so the shell/unixfs version has a better API and we want to push people in that direction. The shell/unixfs version also uses our intended high-/low-level API distinction (core/... is for low-level stuff) [1]. This commit starts the deprecation/migration using the procedure outlined here [2], with the API-release-notes directory proposed here [3] and accepted here [4]. [1]: ipfs#1158 [2]: ipfs#1159 [3]: https://github.com/ipfs/go-ipfs/pull/1136/files#r29379579 [4]: https://github.com/ipfs/go-ipfs/pull/1136/files#r29498385
Starting to use the core/... (low-level, all the knobs you need) shell/... (high-level, handle the common case easily) disctinction laid out in [1]. Creating a file node from a reader is hard to do right, because there's a lot of filesystem metadata that we don't have access to (access mode, ownership, etc.). You can guess at those based on the adding process's umask, effective user, etc., but figuring out what you want guessed at or what you want set explicitly, or whether you want wrapping metadata at all is complicated. This function isn't going to do any of that [2], it's just a high-level wrapper to create a minimal file object with the default chunking, pinning, etc. all taken care of in ways that will probably work for you ;). I'm not clear on where the 'unix' part of the name comes from (these seem like pretty generic filesystem nodes to me, or if anything, they're POSIX filesystem nodes), but: On Wed, Apr 29, 2015 at 01:30:04PM -0700, Juan Batiz-Benet wrote [3]: > > package fsnode > > i think this package should be called unixfs as that's the > abstraction that this is calling to. So that's what we're going with. [1]: ipfs#1158 [2]: ipfs#1136 (comment) [3]: ipfs#1136 (comment)
Folks should be using the node-returning AddFromReader defined in shell/unixfs instead, since that creates the same node but returns the dag.Node object itself, instead of the stringified key. It's cheaper to go from Node to stringified key than it is to go the other way around, and you need the Node to do anything besides printing the stringified key, so the shell/unixfs version has a better API and we want to push people in that direction. The shell/unixfs version also uses our intended high-/low-level API distinction (core/... is for low-level stuff) [1]. This commit starts the deprecation/migration using the procedure outlined here [2], with the API-release-notes directory proposed here [3] and accepted here [4]. [1]: ipfs#1158 [2]: ipfs#1159 [3]: https://github.com/ipfs/go-ipfs/pull/1136/files#r29379579 [4]: https://github.com/ipfs/go-ipfs/pull/1136/files#r29498385
On Mon, Apr 27, 2015 at 11:17:18PM -0700, Jeromy Johnson wrote:
So after a fairly brief chat on IRC with @jbenet, my understanding was
that we wanted something like:
internal/…
Really low-level stuff where we reserve the right tobreak interfaces as often as we like.
core/…
The official, low-level API that gives consumers all theknobs they need, which we try hard to keep stable.
shell/…
The official, high-level API that gives consumers easyaccess to common operations (e.g. create a file node from a reader
without wrapping with metadata). We work really hard to keep
this stable.
Then on top of the
core/…
andshell/…
Go APIs, we'd build:http/…
The REST APIcmd/…
The command-line APItest/…
Integration tests, etc.To avoid cyclic imports (see part of my commit message in ccb3f39
(util/testutil/addcat/addcat: Factor out add/cat/verify helper,
2015-04-26), I'd jump through whatever hoops had to be jumped through
to ensure imports never cut further down in that stack. For example,
you could import all of
core
andshell
fromcmd/…
ortest/…
, but youcouldn't import any of
shell/…
fromcore/…
.Spun off from ipfs/team-mgmt#6.
The text was updated successfully, but these errors were encountered: