SRB Programming - PowerPoint PPT Presentation

1 / 20
About This Presentation
Title:

SRB Programming

Description:

NPACI: National Partnership for Advanced Computational Infrastructure. SRB Space. DR ... srbObjRead(conn, od, buffer, length) srbObjWrite(conn, od, buffer, length) ... – PowerPoint PPT presentation

Number of Views:23
Avg rating:3.0/5.0
Slides: 21
Provided by: npa5
Category:

less

Transcript and Presenter's Notes

Title: SRB Programming


1
SRB Programming
  • Arcot Rajasekar

2
SRB Space
SRB
SRB
SRB
SRB
SRB
SRB
SRB
DL
DR - Data Repository DL - Dig Library MC - Meta
Catalog CP - Comp Process/ SRB Client
SRB
SRB
SRB
3
SRB API
  • Programmatic API
  • High-level API
  • SRB Manager API
  • SRBIO
  • Command Level Interface - Scommands
  • Graphical User Interface - srbBrowser
  • Web Utilities

4
SRB API Interface
Application
MCAT
SRB Master
5
High-level API
  • srbObjOpen(conn, objChar, mode, collectionName)
  • srbObjCreate(conn, objName, objType,
    resourceName, collectionName,
    pathName, size)
  • srbObjClose(conn, od)
  • srbObjUnlink(conn, objChar, collectionName)
  • srbObjRead(conn, od, buffer, length)
  • srbObjWrite(conn, od, buffer, length)
  • srbObjSeek(conn, od, offset, whence)
  • srbObjMove(conn, objChar, collectionName,
    newResourceName, newPathName)
  • srbObjReplicate(conn, objChar, collectionName,
    newResourceName, newPathName)
  • srbObjProxyOpr(conn, Operation, sourceDesc,
    targetDesc)

6
High-Level API (contd )
  • srbGetDatasetInfo(conn, objChar, collectionName,
    resultStruct, requiredNumber)
  • srbGetMoreInfo(resDesc, resultStruct,
    requiredNumber)
  • srbGetDataDirInfo(conn, conditionList,
    selectList, resultStruct)
  • srbModifyDataset(conn, objId, collectionName,
    newValue1, newValue2, modifyType, resourceName,
    pathName)
  • srbCreateCollect(conn, parentCollectionName,
    childCollectionName)
  • srbListCollect(conn, CollectionName, flag,
    resultStruct)
  • srbModifyCollect(conn, CollectionName, newValue1,
    newValue2, newValue2, modifyType)
  • srbModifyUser(conn, newValue1, newValue2,
    modifyType)
  • srbSetAuditTrail(conn, setValue)

7
High-Level API (contd )
  • srbObjOpenWithTicket(conn, objChar,
    collectionName)
  • srbIssueTicket(conn,resDesc, objChar,
    collectionName, , ticket)
  • srbRemoveTicket(conn, ticket)
  • srbContainerCreate(conn, containerName,
    containerType, resourceName, size)
  • srbRemoveContainer(conn, containerName)
  • srbGetContainerInfo(conn, containerName,
    resultStruct, rowsWanted)
  • srbSyncContainer(conn, containerName, purgeFlag)

8
System Manager API
  • srbChkMdasAuth(conn, userName, userAuth, domain)
  • srbChkMdasSysAuth(conn, userName, userAuth,
    domain)
  • srbRegisterUser(conn, userName, domain, password,
    userType, userAddress, userPhone, userEmail)
  • srbRegisterUserGrp(conn, userGrpName,
    userGrpPassword, userGrpType,
    userGrpAddress, userGrpPhone, userGrpEmail)

9
SRBIO
  • Open
  • creat
  • read
  • write
  • close
  • lseek
  • fopen
  • fread
  • fwrite
  • fclose
  • fseek
  • fflush
  • fgetc
  • fgets
  • fputc
  • fputs
  • getc
  • putc
  • ungetc
  • rewind
  • vfprintf
  • fprintf
  • fscanf

10
SRBIO
11
Scommands
  • Sinit - initialize S-environment
  • Sexit - clean up
  • Sman - get manpage for Scommand
  • Scat - display srbObject on screen
  • Sput - copy local file into srbSpace
  • Sget - copy srbObject to local space
  • Sappend - append to srbObject
  • Srename - change srbObject name
  • Srm - remove srbObject
  • Schmod - change/grant access to srbObject
  • Scd - change collection
  • Spwd - display current collection
  • Sls - list collection
  • Smkdir - make new collection
  • Srmdir - remove old collection
  • SgetD - get srbObject information
  • SgetR - get resource information
  • SgetU - get user information
  • SmodD - modify srbObject info
  • SmodU - modify user info
  • Stoken - get native type information
  • Scp - copy srbObject in another collection
    and under another name
  • Sreplicate - clone object in new resource -
    same internal id
  • Smv - move srbObject to new collection or
    resource
  • srbBrowser performs many of these functions

12
Scommands
  • Smkcont - create a container
  • Slscont - list srbObjects in container
  • Ssyncont - synchronize copies of
    container replicas
  • Srmcont - remove a container
  • Sticket - issue a ticket on srbObjects or
    collections
  • Stcat - display a srbObject identified by a
    ticket
  • Stls - list srbObjects identified by a
    ticket
  • Srmticket - delete a ticket

13
Scommands (contd )
  • ingestUser - adding a new user or group
  • ingestResource - adding a new resource
  • ingestLogicalResource - making a new resource
    grouping
  • addLogicalResource - adding to a resource
    grouping
  • ingetLocation - adding new location
    information
  • ingestToken - adding new native types
    (eg. resourceType, objectType, userType,
    domainName, ActionType, . . .)
  • srbAdmin Java GUI also performs these functions

14
Scommands
  • Sls
  • Sls -h -L number -Y number -r-f
    collection ...
  • Sls -L number -Y number srbObj
  • Sput
  • Sput -p -D dataType -R resourceName
    -P pathName localFileName ...
    TargetName
  • Sput -p -D dataType -R resourceName
    -P pathName -i TargetName
  • Sget
  • Sget -C_n -p srbObj ... localFile
  • Sreplicate
  • Sreplicate -Cn -p -R resourceName
    -P pathName srbObj ...

15
(No Transcript)
16
Web Utilities
  • Sgetw - copies a SRBobject into server site
  • Sputw - copies local file in SRBspace
  • Scatw - displays SRBobject on browser
    (handles types)
  • Slsw - displays information of SRBobjects

17
srbBrowser - A SRB Graphical Interface
  • A java GUI
  • Interface with SRB servers using the client
    API library.
  • Performs most SRB operations - cp, replicate,
    import, export, metadata query, etc.

USER
Java GUI
Obtain users metadata information via SRB.
Invoke SRB operations
SRB Agent
MCAT
Proxy operation
18
Client Registration
  • Get software at http//www.npaci.edu/DICE/SRB/tarf
    iles /???
  • Fill form at http//www.npaci.edu/DICE/SRB/install
    /SRBUserRegister.html
  • SRB Admin will respond with your
  • authorization password (should be changed
    immediately using Spasswd command)
  • domain
  • home collection

19
Setting the Client Environs
  • Set paths and environment variables
    set path(path SRBDIR/utilities/bin)
    set path(path SRBDIR/java/bin) setenv
    CLASSPATH
    /sdsc/local/generic/lib/java/swing/swing.jar
    setenv THREADS_FLAG native

20
Setting the Client Environs
  • Two environment files
  • .srb/.MdasEnv
    mdasCollectionHome '/home/u26072.test
    mdasDomainHome 'test srbUser
    'u26072 srbHost
    'ghidorah.sdsc.edu defaultResource 'unix-sdsc
    SEA_OPT '0
  • .srb/.MdasAuth
    SRBTEST
Write a Comment
User Comments (0)
About PowerShow.com