Resources, urps ,urns, users and rooms (v0.9)

From Native Big Data Documentation
Revision as of 22:30, 10 January 2019 by Ignacio (talk | contribs) (Created page with " Category:NBD = Resources = In NBD we call resources : * Files * “JSON objects”. * Nodes of the NBD network (computers with NBD instaled) * Scripts in OP language...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


Resources

In NBD we call resources :

  • Files
  • “JSON objects”.
  • Nodes of the NBD network (computers with NBD instaled)
  • Scripts in OP language
  • Native functions implemented in C
  • Streams
  • Tables in SQL Data bases
  • Hadoop HDFS files
  • ...

All Native Big Data resources:

  • Will be located in one or more NBD node(s).
  • Will be available in all the NBD net.
  • Will be persistent.
  • Will be mapped by a pointer called 'urp'.

URP's

Resource pointers will be names used to access resources. A resource pointer will be named “urp” (Universal Resource Pointer) and will have the following structure:

urp: [ type of resource ] :/ [ name of resource]

Example:

  • urp:file:/documents/doc_1
  • urp:obj:/objects/hash_23
  • urp:op:/scripts/op_1
  • urp:js:/test32
  • urp:server:/pc_1
  • urp:stream:/project_1/str
  • urp:hdfs:/ff/tc1
  • urp:ddbb:/ff/tc1

The syntax of a urp is the same as urns and is described in rfc 2141 [[1]] with only these diferences:

  • urps begins with “urp:” rather than “urn:”
  • NID field of urps describes the type of resource pointed.
  • “#” character will be used to specify "fragments".

ROOMS

urp's are stored in rooms. A room is a repository of urp's. Two rooms can have urps with the same name but will represent different resources. Rooms are like namespaces in other languages like C++ or Java. It is recommended to create one room for every project.

USERS

Every user that will use NBD should have a user account. Every user account have its user name and password like other platforms. The security tasks are implemented in the resolver (authentication, privileges,...) Every time a user logs in the system a JWT token is created. This token will be used as a user credential in all the NBD network. Users can have access privileges to rooms. When a user have read privileges in a room, he can read all the resources of the room. A user can be:

  • Owner of the room: Can read an write resources and can change the access privileges to the room of other users.
  • Scientist: Can read an write resources in the room.
  • Analyst: Can read resources of the room.
  • Applicant: User have not any privilege but want enter in the room. Owner will be noticed about this situation and can change the privileges.

A administrator user named "ADMIN" (with starting password "ADMIN") is always available in the system. This user can create new users.

URN's

Urps can be pointed by urn’s. Urn's (Universal Resource Names) are intended to serve as persistent, location-independent identifiers. A urn can point to a urp in a room, a url or other urn.

The resolver

In order to get a resource mapped by a urn or a urp NBD has a component named “resolver” which can translate names or pointers to physical resources. The resolver can be accessed from C code, from Javascript code, from op code or from http with these commands:

  • I2C: uri to description:
    • Parameters: urp and room or urn
    • Result: A hash object with the metadata of the resource.
  • I2R uri to resource:
    • Parameters: urp and room or urn
    • Result: A copy of the resource as a JSON object.
  • I2RR uri to resource in Ram:
    • Parameters: urp and room or urn
    • Result: The server will load a copy of the resource as a JSON object in a RAM cache.
  • I2O uri to object:
    • Parameters: urp and room or urn
    • Result: A proxy object that allow access to the distributed data without loading it.