GithubHelp home page GithubHelp logo

Comments (4)

jreadey avatar jreadey commented on July 21, 2024 1

Hi @JattMones - thanks for your questions. First, I should make it clear that (currently at least) you can't just point HSDS to a bucket of H5 files, you need to import them with the hsload utility. hsload by default will convert all the data to the HSDS schema. Alternatively you can use "hsload --link" that will convert just the metadata, but leave the dataset data in the file.

Secondly, HSDS doesn't use API keys, per se. Requests can include an auth header with username and password (OAuth is also supported). Once authenticated, the actions a given use can take is determined by the ACLs (Access Control List) of the domain (i.e. hsds file). There's a blog post that goes into some detail on how this works: https://www.hdfgroup.org/2015/12/serve-protect-web-security-hdf5/.

Finally this repo: https://github.com/HDFGroup/hdf-rest-api covers use of the REST API. For example to put/update an attribute, the curl would be:

$ curl -X PUT -u username:password --header "X-Hdf-domain: /shared/tall.h5" --header "Content-Type: application/json"
  -d "{\"shape\": 2, \"type\": {\"class\": \"H5T_COMPOUND\", \"fields\": [{\"type\": \"H5T_STD_I32LE\", \"name\": \"temp\"},
  {\"type\": \"H5T_IEEE_F32LE\", \"name\": \"pressure\"}]}, \"value\": [[55, 32.34], [59, 29.34]]}" hsdshdflab.hdfgroup.org/groups/g-45f464d8-883e-11e8-a9dc-0242ac12000e/attributes/attr_compound

There are a bunch of new features that haven't been added to the docs yet (we are in the process of updating them), but all the basic operations should be there.

Depending on your environment, it might be more convenient to use the hs tools for thins like hsrm /home/foo.h5 rather than constructing a curl request. Don't have a hstool for adding an attribute yet, but that wouldn't be hard to do.

Hope this helps! Let me know if you hae ore questions or anything seems unclear.

from hsds.

JattMones avatar JattMones commented on July 21, 2024

Thanks @jreadey, that does help. If you could explain a little more about how an h5 bucket is structured from top level down with Domains, Groups, and Datasets that would also be helpful.

For example what would each item below be considered in the following hierarchy?

  • filename.h5
    • tier1 folder
      • subtier1 folder
        • someDataSet
      • subtier2 folder
        • someDataSet

Would an ACL group be associated with the whole domain (ie. if the domain was something like filename.h5)? Would a datatype be associated with the domain (ie. if the domain was something like filename.h5) and return that someDataSet is a dataset, and subtier and tier1 are groups?

from hsds.

jreadey avatar jreadey commented on July 21, 2024

No, a bucket consists of folders (equivalent to directories) and domains (equivalent to HDF5 files) and folders may have other folders or domains under them.

The domain object itself (e.g. /home/myfolder/mydomain.h5/.domain.json) contains just a root group uuid, and any ACLs that belong to the domain. The actual hdf objects of a domain are stored under the "db" key. This is a bit indirect, but has the benefit that you can move or rename domains without having to move all the objects in the domain.

This is documented here: https://github.com/HDFGroup/hsds/blob/master/docs/design/obj_store_schema/obj_store_schema_v2.md, but in normal circumstances it shouldn't matter how the data is stored if you are accessing content using the HDF Rest API, or the hdf api's (REST VOL or h5pyd).

from hsds.

jreadey avatar jreadey commented on July 21, 2024

Closing this issue - please reopen if there are follow-on questions

from hsds.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.