Several of the APIs for the Request Manager architecture (see the enclosed PowerPoint slide) were already defined in IDL. (The people involved in defining these APIs are: Luis Bernardo, Andy Hanishevsky, Alex Sim, and Arie Shoshani.)
The PowerPoint slides show 13 APIs. The APIs below correspond to the numbered interfaces (please refer to the PowerPoint figure).
In defining these interface, we wanted to capture the following functionality:
From the Application point of view:
1. The application can issue a "logical request" referring to event features only, and the names of the desired components.
2. The application can also issue a request to execute an event_list.
3. The application can provide priority for the job, as well as a hint if the job should be processed in "batch".
4. The application can ask for an estimate before launching an "execute" request, as well as ask for a status on progress.
5. The application can abort, pause, resume, and notify the request interpreter when it is done.
From the Cache Manager point of view:
1. The cache manager accepts a request to cache one file at a time.
2. The cache manager makes local cache requests directly to the "local resource manager".
3. The cache manager can request storage reservations from the Globus "storage reservation" service. This includes space reservation before a file transfer, as well as "locking" a file in cache.
4. The cache manager can make file transfer request from the Globus "storage access" service. This includes file transfers for tape-to-disk or disk-to-disk.
5. The cache manager notifies the request planner asynchronously when a file transfer or file locking was accomplished . Thus, the request from the request planner to the cache manager is non-blocking.
6. The local resource manager notifies the machmaking service of any changes of file moved into or removed from local cache.
The above functions were captured by the following APIs. We mention the numbers in the PowerPoint figure for reference.
ppdgDefs.idl: combined IDL definition file for reusable definitions by various APIs
ri.idl: API for 1+4 combined
(from Application to Request Interpreter)
lis.idl: API for 2+5 combined
(from Request Interpreter to Logical Index Service)
cm.idl: API for 9
(from Request Planner to Cache Manager)
rp.idl: API for 9'
(from Cache Manager to Request Planner)
srs.idl: API for 10
(from cache manager to storage reservation service)
sas.idel: API for 11
(from cache manager to storage access service)
ms.idl: API for 12
(from local resource manager to matchmaking service)
The actual APIs are spelled out next.
// ppdgDefs.idl
// Authors:
// Alex Sim <ASim@lbl.gov>
// Luis Bernardo <LMBernardo@lbl.gov>
//
// Lawrence Berkeley National Laboratory
// Copyright 1999 the Regents of the University of California
//
// Limitations:
// Subject to change
//
// Created: Thu Oct 28 09:25:40 PDT 1999
// Last Modified: Thu Oct 28 09:25:40 PDT 1999
//
#ifndef PPDGDEFS_IDL
#define PPDGDEFS_IDL
typedef string<16> USERID_T;
typedef string<16> QUERYTOKEN_T;
typedef string<16> FILETOKEN_T;
typedef string<16> CACHERESERVATIONTOKEN_T;
typedef string<16> FILETRANSFERTOKEN_T;
enum FileStatus {
FILE_AVAILABLE,
FILE_REQUESTED,
FILE_UNAVAILABLE,
NO_SUCH_FILE };
typedef FileStatus FILESTATUS_T;
typedef unsigned short FILE_T;
typedef string EVENT_T;
typedef sequence<FILE_T> FILESET_T;
typedef sequence<EVENT_T> EVENTSET_T;
struct FILES_EVENTS_T {
FILESET_T files;
EVENTSET_T events;
};
typedef sequence<FILES_EVENTS_T> FILES_EVENTS_SET_T;
struct FileInfo {
string fileID;
string sourceURL;
string targetURL;
long long fileSize;
};
typedef FileInfo FILEINFO_T;
exception queryException {
string why;
};
exception transferException {
string why;
};
#endif
//
// ri.idl
// IDL for Request Interpreter
//
// Authors:
// Alex Sim <ASim@lbl.gov>
//
// Lawrence Berkeley National Laboratory
// Copyright 1999 the Regents of the University of California
//
// Limitations:
// Subject to change
//
// Created: Thu Oct 28 09:25:40 PDT 1999
// Last Modified: Thu Oct 28 09:25:40 PDT 1999
//
#ifndef RI_IDL
#define RI_IDL
#include <ppdgDefs.idl>
module RequestInterpreter {
struct QUERYSTATUS_T {
long num_events;
long num_files;
long num_bytes;
long num_seconds;
long num_files_in_cache;
long num_files_completed;
long percent_completed;
};
interface riDataRequest {
QUERYTOKEN_T newQuery(in USERID_T uid,
in short priority_level,
in boolean batch);
void setPredicateClause(in QUERYTOKEN_T token,
in string clause)
raises (queryException);
void setEventSet(in QUERYTOKEN_T token,
in EVENTSET_T events)
raises (queryException);
void setComponents(in QUERYTOKEN_T token,
in string components)
raises (queryException);
QUERYSTATUS_T estimate(in QUERYTOKEN_T token)
raises (queryException);
boolean execute(in QUERYTOKEN_T token)
raises (queryException);
boolean abort(in QUERYTOKEN_T token) raises (queryException);
boolean done(in QUERYTOKEN_T token) raises (queryException);
boolean pause(in QUERYTOKEN_T token) raises (queryException);
boolean resume(in QUERYTOKEN_T token) raises (queryException);
QUERYSTATUS_T getCurrentStatus(in QUERYTOKEN_T token)
raises (queryException);
EVENTSET_T getEventSet(in QUERYTOKEN_T token)
raises (queryException);
};
interface riRequestPlanner {
boolean done(in QUERYTOKEN_T token) raises (queryException);
};
};
#endif
//
// lsi.idl
// IDL for Logical Index Service
//
// Authors:
// Alex Sim <ASim@lbl.gov>
//
// Lawrence Berkeley National Laboratory
// Copyright 1999 the Regents of the University of California
//
// Limitations:
// Subject to change
//
// Created: Thu Oct 28 09:25:40 PDT 1999
// Last Modified: Thu Oct 28 09:25:40 PDT 1999
//
#ifndef LSI_IDL
#define LSI_IDL
#include <ppdgDefs.idl>
module LogicalIndexService {
interface lisRequestInterpreter {
FILES_EVENTS_SET_T getFilesForEventSet( in EVENTSET_T events,
in string components);
FILES_EVENTS_SET_T getFilesForPredicate( in string clause,
in string components);
};
};
#endif
// cm.idl
// IDL for Cache Manager
//
// Authors: Luis Bernardo <LMBernardo@lbl.gov>
//
// Lawrence Berkeley National Laboratory
// Copyright 1999 the Regents of the University of California
//
// Comments:
//
#ifndef CM_IDL
#define CM_IDL
#include <ppdgDefs.idl>
module CacheManager {
interface cmRequestManager {
FILETOKEN_T transferFile(in FILEINFO_T file_info,
in long time_to_get_file_secs,
in long time_to_hold_file_secs)
raises(transferException);
boolean cancelFileTransfer(in FILETOKEN_T token);
long getRemainingTimeEstimate(in FILETOKEN_T token);
long getCompletionTimeEstimate(in FILEINFO_T file_info);
boolean releaseFile(in FILETOKEN_T token);
};
interface cmStorageAccessService {
void setFileStatus(in FILETRANSFERTOKEN_T token,
in FILESTATUS_T status);
};
};
#endif
//
// rp.idl
// IDL for Request Planner
//
// Authors: Alex Sim <ASim@lbl.g0ov>
// Luis Bernardo <LMBernardo@lbl.gov>
//
// Lawrence Berkeley National Laboratory
// Copyright 1999 the Regents of the University of California
//
// Comments:
//
#ifndef RP_IDL
#define RP_IDL
#include <ppdgDefs.idl>
module RequestPlanner {
interface rpRequestInterpreter {
boolean stage(in USERID_T uid,
in QUERYTOKEN_T token,
in FILES_EVENTS_SET_T feset)
};
interface rpClient {
void retrieve(in QUERYTOKEN_T token, out FILES_EVENTS_T feset);
};
interface rpCacheManager {
void setFileStatus(in FILETOKEN_T token,
in FILESTATUS_T status);
};
};
#endif
// srs.idl
// IDL for Storage Reservation Service
//
// Authors: Luis Bernardo <LMBernardo@lbl.gov>
//
// Lawrence Berkeley National Laboratory
// Copyright 1999 the Regents of the University of California
//
// Comments:
//
#ifndef SRS_IDL
#define SRS_IDL
#include <ppdgDefs.idl>
module StorageReservationService {
interface srsCacheManager {
CACHERESERVATIONTOKEN_T reserveCache(in FILEINFO_T file,
in long time_to_get_file_secs,
in long time_to_hold_file_secs);
};
};
#endif
// sas.idl
// IDL for Storage Access Service
//
// Authors: Luis Bernardo <LMBernardo@lbl.gov>
//
// Lawrence Berkeley National Laboratory
// Copyright 1999 the Regents of the University of California
//
// Comments:
//
#ifndef SAS_IDL
#define SAS_IDL
#include <ppdgDefs.idl>
module StorageAccessService {
interface sasCacheManager {
FILETRANSFERTOKEN_T transferFile(in CACHERESERVATIONTOKEN_T token,
in FILEINFO_T file)
raises(transferException);
boolean cancelFileTransfer(in FILETRANSFERTOKEN_T token);
long estimateRemainingTime(in FILETRANSFERTOKEN_T token);
long estimateCompletionTime(in FILEINFO_T file);
};
};
#endif
// ms.idl
// IDL for Matchmaking Service
//
// Authors: Luis Bernardo <LMBernardo@lbl.gov>
//
// Lawrence Berkeley National Laboratory
// Copyright 1999 the Regents of the University of California
//
// Comments:
//
#ifndef MS_IDL
#define MS_IDL
#include <ppdgDefs.idl>
module MatchmakingService {
interface msCacheManager {
boolean updateUsedCache(in string cache_url,
in long long cache_change);
};
interface msStorageReservationService {
boolean updateUsedCache(in string cache_url,
in long long cache_change);
};
};
#endif