Y. Morita,
K.B. Urquhart
<+>,
Y. Watase
Computing Center
KEK, National Laboratory for High Energy Physics
1-1 Oho, Tsukuba, Ibaraki 305, Japan
The Common Object Request Broker Architecture (CORBA) is an object-oriented communications framework that allows for the easy design and development of distributed, object-oriented applications. A CORBA-based implementation of a distributed client/server tape robot system (KIWI Tape Robot) is developed. This approach allows for a variety of data-modeling options in a distributed tape server environment. The use of C++ in the handling of HEP data that is stored in a Hierarchical Mass Storage System is demonstrated.
HITACHI (PA-RISC/Alpha) mixed UNIX server for 11 work group clusters
Shell-level commands:
chs_rdump
chs_restore
chs_archive
Shell-level commands:
chs_stagein
chs_stageout
char buf[BUFSIZ];
char *filen="filename";
char *vol="vol001";
int filed,fsn,length;
fsn = 5;
length = BUFSIZ;
mtopen(filed, filen, vol, fsn, cat);
:
:
mtread(filed, buf, length);
:
:
mtclose(filed);
HSM provides a clean and easy-to-use disk-cached file system for the user, while explicit control of the file pre-caching (stage-in) and selective cache cleaning up (stage-out) are still desirable and required features in the raw data reconstruction.
To achieve effective use of various types of storage services with mixed performance:
http://www.acl.lanl.gov/sunrise/DistComp/Objects/corba.htmlftp://claude.ifi.unizh.ch/pub/standards/corba/spec/
ftp://labrea.stanford.edu/pub/pomoco/
CORBA Interface Description Language (IDL):
*****
Eg. File Serving client and server skeletons
_______________________________________________________
IDL file: TapeManager.idl (define the client/server interaction)
_______________________________________________________
// Parameter description:
struct TapeFile {
string DataSet;
string FullPath;
}
// Transaction description:
interface TapeServer {
boolean Load(inout TapeRequest request);
}
_______________________________________________________
The CORBA IDL compiler generates the skeleton code:
---- <client>
TapeServer_client.hh
TapeServer_client.cc
---- <server>
TapeServer_server.hh
TapeServer_server.cc
*****
____________________________________________________________________
Client program (TapeServer_client.cc)
____________________________________________________________________
#include <iostream.h>
#include <TapeManager_client.hh>
#include <assert.h>
int main(void)
{
CORBA::Boolean rc; /* return code from CORBA client object. */
TapeFile theFile; /* CORBA object to specify dataset name. */
theFile.Name(argv[1]) /* the dataset name on the command line. */
TapeManager *manager = TapeManager::_bind();
/* Create object/attach to server. */
assert(manager != NULL); /* check that we properly attached to the server. */
rc = manager-> Locate(theFile);
assert( rc == CORBA::TRUE )
ifstream inputData(theFile.Where());
: /* Open an input stream to the data file. */
:
<read and process the data file>
:
return (0);
}
____________________________________________________________________
*****
____________________________________________________________________
Server Program (TapeServer_server.cc)
____________________________________________________________________
#include <TapeManager_server.hh>
#include <assert.h>
int main(void)
{
class KIWIServer *server; /* CORBA server object */
server = new KIWIServer;
assert(server != NULL);
CORBA::BOA::impl_is_ready(); /* Tell Basic Object Adapter we are ready */
return(1); /* Should never return from BOA */
}
____________________________________________________________________
*****
____________________________________________________________________
Server Subclass KIWIServer for Locate() method (staging)
____________________________________________________________________
class KIWIServer : public TapeManager_impl {
public:
KIWIServer(const char *serverName);
Locate(const TapeFile &theFile);
};
____________________________________________________________________
*****
____________________________________________________________________
Constructor of KIWIServer
____________________________________________________________________
KIWIServer::KIWIServer(const char *serverName)
: KIWIManager_impl(serverName){};
____________________________________________________________________
*****
____________________________________________________________________
Locate() method of KIWIServer
____________________________________________________________________
CORBA::Boolean KIWIServer::Locate(const KIWIFile &theFile)
{
char *fullPath = NULL; /* To hold the full path name to the disk file. */
:
<Determine which tape holds the dataset request by the user>
:
<Summon the tape robot to mount the tape on a tape drive>
:
<Read the dataset from the tape and put it onto a hard disk>
:
theFile.Where(fullPath); /* Return the path to the disk file. */
return(CORBA::TRUE);
}
____________________________________________________________________