It has been suggested that SAGA C++ Reference Implementation be merged into this article. (Discuss) Proposed since October 2011. |
The topic of this article may not meet Wikipedia's notability guidelines for products and services. (September 2011) |
The Simple API for Grid Applications (SAGA) is a family of related standards specified by the Open Grid Forum to define an application programming interface (API) 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.
Scope
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 (OGF)[1].
The SAGA API is designed to be extensible: a well defined mechanism exists to specify additional API packages which expand the scope of the API as needed. The SAGA Core API itself defines a number of packages: job management, file management, replica management, remote procedure calls, and streams. A large part of the SAGA Core API specification
Standardization
SAGA was standardized by the Open Grid Forum.
- SAGA Use Cases: an experimental OGF document describing the target use cases for SAGA.
- SAGA Requirement Analysis: another experimental OGF document which extracts specific requirements from the use case document.
- The SAGA Core API Specification: the basis of the standard, defines the Look and Feel of the SAGA API.
- SAGA API Extensions: additional functional API extensions which use the Look and Feel of the SAGA API.
- SAGA API Language Bindings: mapping of the language neutral SAGA API to various programming languages.
The SAGA Core API specification covers the following non-functional areas:
- security and session management
- permission management
- asynchronous operations
- monitoring
- asynchronous notifications
- attribute management
- I/O buffer management
The SAGA Core API specification covers the following functional areas:
- job submission and management
- management of namespaces
- file I/O
- replica management
- streaming (modeled after BSD sockets)
- remote procedure calls
The following functional areas are supposed to be covered by SAGA API extensions:
- service discovery
- message exchange
- storage of application level information
- database access and integration
- checkpoint management and recovery
Specifications
GFD-90 Core API: Simple API for Grid Applications
GFD-R-P.91 API Extension: Service Discovery
GWD-R.96 API Extension: Checkpoint and Recovery
GFD-R-P.195 API Extension: Information System Navigator
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++
SAGA C++ was the first complete implementation of the SAGA Core specification, written in C++. Currently the C++ implementation is not under active development.
SAGA-Bliss (Python)
SAGA-Bliss (originally called just Bliss, an acronym that stands for BLiss IS Saga) is a light-weight Python package that implements parts of the OFD GFD.90 interface specification and provides plug-ins for different distributed middleware systems and services. SAGA-Bliss 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. SAGA-Bliss currently implements the job and the file management core APIs as well as the resource management API extension. SAGA-Bliss provides plug-ins for different distributed middleware systems and services, including support for the PBS, Sun Grid Engine, SSH, SFTP, SRM and Eucalyptus. SAGA-Bliss can be used to develop distributed applications and frameworks that run on distributed cyber-infrastructure including XSEDE, LONI and FutureGrid, other clouds and local clusters.
JavaSAGA
JavaSAGA is a Java implementation of SAGA. This status of JavaSAGA remains uncertain.
jSAGA
jSAGA is another Java implementation of the SAGA Core specification. jSAGA is currently under active development.
DESHL
The DESHL (DEISA Services for Heterogeneous management Layer), 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 (MPI) job to a remote Globus GRAM resource manager.
C++:
#include <saga/saga.hpp>
int main (int argc, char** argv)
{
namespace sa = saga::attributes;
namespace sja = saga::job::attributes;
try
{
saga::job::description jd;
jd.set_attribute (sja::description_executable, "/home/user/hello-mpi");
jd.set_attribute (sja::description_output, "/home/user/hello.out");
jd.set_attribute (sja::description_error, "/home/user/hello.err");
// Declare this as an MPI-style job
jd.set_attribute (sja::description_spmd_variation, "mpi");
// Name of the queue we want to use
jd.set_attribute (sja::description_queue, "checkpt");
jd.set_attribute (sja::description_spmd_variation, "mpi");
// Number of processors to request
jd.set_attribute (sja::description_number_of_processes, "32");
saga::job::service js("gram://my.globus.host/jobmanager-pbs");
saga::job::job j = js.create_job(jd);
j.run()
}
catch(saga::exception const & e)
{
std::cerr << "SAGA exception caught: " << e.what() << std::endl;
}
}
Python:
import saga
try:
jd = saga.job.description()
jd.executable = "/home/user/hello-mpi"
jd.error = "/home/user/hello.err"
jd.output = "/home/user/hello.out"
# Declar this as an MPI-style job
jd.spmd_variation = "mpi"
# Name of the queue we want to use
jd.queue = "checkpt"
# Number of processors to request
jd.number_of_processes = "32"
# URL of the resource manager. In this case Globus GRAM
js = saga.job.service("gram://my.globus.host/jobmanager-pbs")
job = js.create_job(jd)
job.run()
except saga.exception, e:
print e.get_all_messages()
See also
External links
Notes
- ^ T. Goodale, S. Jha, H. Kaiser, T. Kielmann, P. Kleijer, A. Merzky, J. Shalf, and C.Smith, A Simple API for Grid Applications (SAGA), OGF Document Series 90,http://www.ogf.org/documents/GFD.90.pdf