Session Management

Ophidia allows users to share work sessions.

Session concept

Basically, a session corresponds to an experiment and consists of a work space, data, history of commands (JSON Requests), results (JSON Responses), web space, exported objects, etc. A session is identified by a number (session code) that is assigned automatically by Ophidia Server when the user requests the creation of the session. An alternate way to refer a session is the related session identifier, i.e. an URL like the following one

http://hostname/ophidia/sessions/8912794871982734981234/experiment

where hostname is the reference Ophidia Server and the number 8912794871982734981234 is the unique session code.

Session creation

Any user can create a new session by exploiting the operator OPH_MANAGE_SESSION, thus becoming its owner.

Sharing a session

The owner of a session can finely grant access privileges to other users, thus sharing the experiment. There are four kinds of privileges:

  1. read: the user can access data and metadata associated with the session, browse the virtual file system, retrieve data published on the web space, etc;
  2. write: the user can create new data cubes, create containers and folders, publish data on the web space, etc;
  3. execute: the user is enabled to submit special operators like OPH_SCRIPT in order to execute (external) applications;
  4. admin: the user is enabled to execute any operation within the session (read, write and execute) and can grant and revoke user privileges.

The owner is always an administrator and its role cannot be changed. Moreover, the owner is able to disable or close a session.

Operators

Session management relies mainly on the operator OPH_MANAGE_SESSION. Use the command OPH_RESUME to resume an existing session as well as previous commands and related outputs. See also the commands resume and view of Ophidia Terminal.

Web space

Any session is associated with a web space where operator results may be published. Examples of web resources put in this space are the JSON Requests previously submitted, the related JSON Responses, NetCDF files exported from the platform, data cubes published through OPH_PUBLISH, etc.

Some session web resources are:

  1. the experiment, i.e. the list of the commands submitted within the session, which includes links to JSON Requests, JSON Responses and other results; the URL is simply the session identifier

    http://hostname/ophidia/sessions/8912794871982734981234/experiment

  2. NetCDF files exported by OPH_EXPORTNC or similar operators; the URL is like

    http://hostname/ophidia/sessions/8912794871982734981234/export/nc/1/1/measure.nc

  3. web pages containing data and metadata associated with a data cube; the URL is like

    http://hostname/ophidia/sessions/8912794871982734981234/export/html/1/1/page0.html

  4. the list of the sessions (and the links to related web spaces) where the user is authorized to access

    http://hostname/ophidia/sessions

Depending on server configuration (see option --enable-webaccess in Administration Guides) the access to session web space could be grant only to session users: to get a web resource the user has to log in using the same credentials to access Ophidia Server by Ophidia Terminal.

When a user requests for a restricted session resource, the following login form has to be filled to access the resource. The user can browse other resources without sending credentials again.


Login form to access session web resources

Once the user is logged into the system, she will be able to navigate in her sessions through the following web application, getting access to: the list of sessions, history of commands, requests/responses, output produced by the user.


Login form to access session web resources

Commands at glance

How to create a new session?

oph_manage_session action=new;

or simply

new

How to list existing sessions?

oph_manage_session action=list;

How to switch to an existing session http://hostname/ophidia/sessions/8912794871982734981234/experiment ?

oph_resume session=http://hostname/ophidia/sessions/8912794871982734981234/experiment;

or simply

resume http://hostname/ophidia/sessions/8912794871982734981234/experiment

How to list the last 3 commands submitted in current session?

resume 3

How to list users of a session?

oph_manage_session action=listusers;

How to grant access roles write and execute to user foo ?

oph_manage_session action=grant;key=user;value=foo:write|execute;

How to revoke privileges of user foo ?

oph_manage_session action=revoke;key=user;value=foo;

How to remove a session?

oph_manage_session action=remove;