Simple API for Grid Applications


The Simple API for Grid Applications is a family of related standards specified by the Open Grid Forum to define an application programming interface for common distributed computing functionality.

Overview

The SAGA specification for distributed computing originally consisted of a single document, GFD.90, which was released in 2009.
The SAGA API does not strive to replace Globus or similar grid computing middleware systems, and does not target middleware developers, but application developers with no background on grid computing. Such developers typically wish to devote their time to their own goals and minimize the time spent coding infrastructure functionality. The API insulates application developers from middleware.
The specification of services, and the protocols to interact with them, is out of the scope of SAGA. Rather, the API seeks to hide the detail of any service infrastructures that may or may not be used to implement the functionality that the application developer needs. The API aligns, however, with all middleware standards within Open Grid Forum.
The SAGA API defined a mechanism to specify additional API packages which expand its scope. The SAGA Core API itself defines a number of packages: job management, file management, replica management, remote procedure calls, and streams. SAGA covers the most important and frequently used distributed functionality and is supported and available on every major grid systems - Extreme Science and Engineering Discovery Environment, EGI and FutureGrid. SAGA not only supports a wide range of distributed programming and coordination models but is also easily extensible to support new and emerging middleware.

Standardization

The SAGA API is standardised in the SAGA Working Group the Open Grid Forum. Based on a set of use cases
,
the SAGA Core API specification defines a set of general API principles The SAGA Core specification also defines how additional API packages are to be defined, and how they relate to the Core API, and to its 'Look and Feel'. Based on that, a number of API extensions have been defined, and are in various states of the standardisation process.
All SAGA specifications are defined in IDL, and thus object oriented, but language neutral. Different language bindings exist, but are, at this point, not standardised. Nevertheless, different implementations of these language bindings have a relatively coherent API definition.
The 'Look and Feel' part of the SAGA Core API specification covers the following areas:
SAGA is designed as an object oriented interface. It encapsulates related functionality in a set of objects, that are grouped in functional namespaces, which are called packages in SAGA. The SAGA core implementation defines the following packages:
The overall architecture of SAGA follows the adaptor pattern, a software design pattern which is used for translating one interface into another. In SAGA it translates the calls from the API packages to the interfaces of the underlying middleware. The SAGA run-time system uses late binding to decide at run-time which plug-in to load and bind.

Supported middleware

The following table lists the distributed middleware systems that are currently supported by SAGA. The column labeled Adaptor Suite names the collection of the middleware adaptors that provides support for the middleware system.
Middleware SystemSAGA Adaptor SuiteSAGA API Namespace
Amazon EC2saga-adaptors-awssaga::job
Condorsaga-adaptors-condorsaga::job
Eucalyptussaga-adaptors-awssaga::job
Globus GRAM saga-adaptors-globussaga::job
Globus GridFTPsaga-adaptors-globussaga::filesystem
Globus RLSsaga-adaptors-globussaga::replica
HDFSsaga-adaptors-hdfssaga::file
Local file systempart of saga-coresaga::file
Local forkpart of saga-coresaga::job
Nimbussaga-adaptors-awssaga::job
PBS saga-adaptors-pbssaga::job
Platform LSFsaga-adaptors-lsfsaga::job
SQL Advert Servicepart of saga-coresaga::advert
SQL Replica Servicepart of saga-coresaga::replica
SSHFSsaga-adaptors-sshsaga::file
SSHsaga-adaptors-sshsaga::job
TORQUEsaga-adaptors-torquesaga::job

Implementations

Since the SAGA interface definitions are not bound to any specific programming language, several implementations of the SAGA standards exist in different programming languages. Apart from the implementation language, they differ from each other in their completeness in terms of standard coverage, as well as in their support for distributed middleware.

SAGA C++

was the first complete implementation of the SAGA Core specification, written in C++. Currently the C++ implementation is not under active development.

RADICAL-SAGA(Python)

is a light-weight Python package that implements parts of the interface specification and provides plug-ins for different distributed middleware systems and services. RADICAL-SAGA implements the most commonly used features of GFD.90 based upon extensive use-case analysis, and focuses on usability and simple deployment in real-world heterogeneous distributed computing environments and application scenarios. RADICAL-SAGA currently implements the job and the file management core APIs as well as the resource management API extension. RADICAL-SAGA provides plug-ins for different distributed middleware systems and services, including support for the PBS, Sun Grid Engine, SSH, SFTP and others. RADICAL-SAGA can be used to develop distributed applications and frameworks that run on distributed cyber-infrastructure including , LONI and , other clouds and local clusters.

JavaSAGA

JavaSAGA is a Java implementation of SAGA. This status of JavaSAGA remains uncertain.

import java.util.io.*
int main

jSAGA

is another Java implementation of the SAGA Core specification. jSAGA is currently under active development.

DESHL

The , provides functionality for submission and management of computational jobs within DEISA. DESHL is implemented as a set of command-line tools on-top of a SAGA-inspired API implemented in Java. On the back-end, it interfaces with HiLA, a generic grid access client library, which is part of the UNICORE system.

Examples

Job submission

A typical task in a distributed application is to submit a job to a local or remote distributed resource manager. SAGA provides a high-level API called the job package for this. The following two simple examples show how the SAGA job package API can be used to submit a Message Passing Interface job to a remote Globus GRAM resource manager.

C++


  1. include
int main

Python


  1. !/usr/bin/env python
import sys
import time
import bliss.saga as saga
def main -> None:
bfast_base_dir = saga.Url
try:
workdir = "%s/tmp/run/%s" % )))
basedir = saga.filesystem.Directory
basedir.make_dir
jd = saga.job.Description
jd.wall_time_limit = 5 # wall-time in minutes
jd.total_cpu_count = 1
jd.environment =
jd.working_directory = workdir
jd.executable = '$BFAST_DIR/bin/bfast'
jd.arguments =
myjob = js.create_job
myjob.run
print
myjob.wait
print. Output available in: '%s'"
% )
basedir.close
except saga.Exception, ex:
print
sys.exit
if __name__ "__main__":
execution_host = saga.Url
ctx = saga.Context
ctx.type = saga.Context.SSH
ctx.userid = 'oweidner' # like 'ssh username@host...'
ctx.userkey = '/Users/oweidner/.ssh/rsa_work' # like ssh -i...'
session = saga.Session
session.contexts.append
js = saga.job.Service
for i in range:
main

Grants

The work related to the SAGA Project is funded by the following grants:, , . Previous grants include: NSF-OCI 0710874, NIH grant number P20RR016456 and UK EPSRC grant number GR/D0766171/1 via