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

Dispatch on uri protocol #214

Open
mrocklin opened this issue Dec 6, 2017 · 6 comments
Open

Dispatch on uri protocol #214

mrocklin opened this issue Dec 6, 2017 · 6 comments

Comments

@mrocklin
Copy link
Contributor

mrocklin commented Dec 6, 2017

We might consider a convenience method to build a mutable mapping that consumes strings of various forms:

  • /path/to/directory
  • /path/to/file.zip
  • s3://bucket/directory
  • gcs://bucket/directory
  • ...

My first instinct is to say that this is out of scope for Zarr, however I don't know where exactly it is in scope (maybe zict?) I thought I'd bring it up here for feedback.

We handle something like this for file systems in Dask by registering functions that import the appropriate module when necessary. See https://github.com/dask/dask/blob/master/dask/bytes/core.py#L478

@alimanfoo
Copy link
Member

alimanfoo commented Dec 6, 2017 via email

@alimanfoo
Copy link
Member

alimanfoo commented Dec 6, 2017 via email

@mrocklin
Copy link
Contributor Author

mrocklin commented Dec 6, 2017

In Dask we pass a storage_options={...} keyword argument any time we accept a URI

@mrocklin
Copy link
Contributor Author

mrocklin commented Dec 6, 2017

Btw I am conscious there is some duplication of functionality between zict and zarr.storage at the moment. Happy to contribute anything back to zict if you think appropriate.

We have Zip and Directory MutableMappings at the moment, but I suspect that they differ a bit. It would be interesting to see how they differ and how Zict might learn from Zarr.

@joshmoore
Copy link
Member

This is largely covered now by FSStore, no?

cc: @martindurant

@martindurant
Copy link
Member

Yes, zarr can essentially do what dask was starting to do when this conversation was still live. Dispatch happens via fsspec if the URI looks fsspec-lke ("protocol://path"), we don't dispatch to any of the other storage types.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants