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

NeoFS URI Standard #1256

Open
erikzhang opened this issue Nov 20, 2019 · 6 comments
Open

NeoFS URI Standard #1256

erikzhang opened this issue Nov 20, 2019 · 6 comments
Labels
Milestone

Comments

@erikzhang
Copy link
Member

@erikzhang erikzhang commented Nov 20, 2019

We should have a NeoFS URI standard.

Specification

<schema>://<ContainerID>/<ObjectID>
<schema>://<ContainerID>/<ObjectID>/metadata

The URI allows us to easily download an object or its metadata.

Examples

neofs://8hBvn8VwYbP4BLPANZoYgiMhBEiwLmmpbbPfG53mxhyP/839fd203-9f98-4f69-8f4f-0cd2a6a671cb

This URI allows us to download an object by giving its ContainerID and ObjectID.

neofs://8hBvn8VwYbP4BLPANZoYgiMhBEiwLmmpbbPfG53mxhyP/839fd203-9f98-4f69-8f4f-0cd2a6a671cb/metadata

This URI allows us to download the metadata in JSON format.

@realloc

This comment has been minimized.

Copy link

@realloc realloc commented Nov 21, 2019

There also must be the container ID part. So the NeoFS address would look like this:
neofs://<ContainerID>/<ObjectID>

neofs://8hBvn8VwYbP4BLPANZoYgiMhBEiwLmmpbbPfG53mxhyP/839fd203-9f98-4f69-8f4f-0cd2a6a671cb

Where ObjectId is UUID and ContainerID is SHA256 hash of the container structure.

More detailed description can be found in NeoFS API documentation.

@erikzhang

This comment has been minimized.

Copy link
Member Author

@erikzhang erikzhang commented Nov 21, 2019

Can't we find the object by ObjectID? Do you mean that objects with the same ObjectID may exist in different containers?

@realloc

This comment has been minimized.

Copy link

@realloc realloc commented Nov 21, 2019

ObjectID is not enough. Container defines storage policy, so it's required to find and object.

There is a tutorial video explaining this.

@erikzhang

This comment has been minimized.

Copy link
Member Author

@erikzhang erikzhang commented Nov 21, 2019

Waiting for #1261

@realloc

This comment has been minimized.

Copy link

@realloc realloc commented Nov 25, 2019

Maybe URL discussion form #1270 should be moved here.

@erikzhang

This comment has been minimized.

Copy link
Member Author

@erikzhang erikzhang commented Nov 26, 2019

Oracle.Get($"neofs://{ContainerID}/{ObjectID}"); //Object.Get
Oracle.Get($"neofs://{ContainerID}/{ObjectID}/range/{Offset}|{Length}"); //Object.GetRange
Oracle.Get($"neofs://{ContainerID}/{ObjectID}/hash/{Offset}|{Length}"); //Object.GetRangeHash
Oracle.Get($"neofs://{ContainerID}/{ObjectID}/header"); //Object.Head
@lock9 lock9 added the neofs label Nov 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.