Simple API for Grid Applications

Last updated
Simple API for Grid Applications
Developer(s) Center for Computation and Technology at LSU, RADICAL Group at Rutgers University, IN2P3 (France), and Vrije Universiteit (Amsterdam, the Netherlands)
Written in C++, Python, Java
Platform Cross-platform
Type Grid computing, distributed computing library
License Boost Software License, GPL
Website saga-project.org

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.

Contents

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 (OGF). [1]

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 (XSEDE), 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. [2] [3]

Standardization

The SAGA API is standardised in the SAGA Working Group the Open Grid Forum. [4] Based on a set of use cases [5] , [6] the SAGA Core API specification [1] defines a set of general API principles (the 'SAGA Look and Feel', and a set of API packages which render commonly used Grid programming patterns (job management, file management and access, replica management etc.) 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. [7] [8] [9] [10]

All SAGA specifications are defined in (a flavor of) IDL, and thus object oriented, but language neutral. Different language bindings exist (Java, C++, Python), but are, at this point, not standardised. Nevertheless, different implementations of these language bindings have a relatively coherent API definition (in particular, the different Java implementations share the same abstract API classes).

The 'Look and Feel' part of the SAGA Core API specification covers the following areas:

Architecture

The SAGA C++/Python architecture: a light-weight runtime system dispatches API calls from the application to the middleware through a set of plug-ins or adaptors. SAGA Architecture.png
The SAGA C++/Python architecture: a light-weight runtime system dispatches API calls from the application to the middleware through a set of plug-ins or adaptors.

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: [11]

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 (middleware adaptor) to load and bind. [12]

Supported middleware

The following table lists the distributed middleware systems that are currently supported by SAGA. The column labeled Adaptor Suite names the collection (release package) of the (set of) middleware adaptors that provides support for the middleware system.

Middleware SystemSAGA Adaptor SuiteSAGA API Namespace
Amazon EC2 saga-adaptors-awssaga::job
Condor saga-adaptors-condorsaga::job
Eucalyptus saga-adaptors-awssaga::job
Globus GRAM (2 and 5)saga-adaptors-globussaga::job
Globus GridFTP saga-adaptors-globussaga::filesystem
Globus RLSsaga-adaptors-globussaga::replica
HDFS saga-adaptors-hdfssaga::file
Local file system part of saga-coresaga::file
Local fork part of saga-coresaga::job
Nimbus saga-adaptors-awssaga::job
PBS (Pro) saga-adaptors-pbssaga::job
Platform LSF saga-adaptors-lsfsaga::job
SQL Advert Service part of saga-coresaga::advert
SQL Replica Service part of saga-coresaga::replica
SSHFS saga-adaptors-sshsaga::file
SSH saga-adaptors-sshsaga::job
TORQUE saga-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++

SAGA C++ [13] 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)

RADICAL-SAGA [14] is a light-weight Python package that implements parts of the OGF GFD.90 [1] 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 XSEDE [15] , LONI and FutureGrid [16] , other clouds and local clusters.

JavaSAGA

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

importjava.util.io.*intmain(intargc,char**argv){namespacesa=saga::attributes;namespacesja=saga::job::attributes;try{saga::job::descriptionjd;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 jobjd.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::servicejs("gram://my.globus.host/jobmanager-pbs");saga::job::jobj=js.create_job(jd);j.run()}catch(saga::exceptionconst&e){std::cerr<<"SAGA exception caught: "<<e.what()<<std::endl;}}

jSAGA

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

DESHL

The DESHL [18] (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>intmain(intargc,char**argv){namespacesa=saga::attributes;namespacesja=saga::job::attributes;try{saga::job::descriptionjd;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 jobjd.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::servicejs("gram://my.globus.host/jobmanager-pbs");saga::job::jobj=js.create_job(jd);j.run()}catch(saga::exceptionconst&e){std::cerr<<"SAGA exception caught: "<<e.what()<<std::endl;}}

Python

#!/usr/bin/env python3importsysimporttimeimportbliss.sagaassagadefmain(jobno:int,session,jobservice)->None:bfast_base_dir=saga.Url("sftp://india.futuregrid.org/N/u/oweidner/software/bfast/")try:workdir="%s/tmp/run/%s"%(bfast_base_dir.path,str(int(time.time())))basedir=saga.filesystem.Directory(bfast_base_dir,session=session)basedir.make_dir(workdir)jd=saga.job.Description()jd.wall_time_limit=5# wall-time in minutesjd.total_cpu_count=1jd.environment={"BFAST_DIR":bfast_base_dir.path}jd.working_directory=workdirjd.executable="$BFAST_DIR/bin/bfast"jd.arguments=["match","-A 1","-r $BFAST_DIR/data/small/reads_5K/reads.10.fastq","-f $BFAST_DIR/data/small/reference/hg_2122.fa"]myjob=js.create_job(jd)myjob.run()print("Job #%s started with ID '%s' and working directory: '%s'"%(jobno,myjob.jobid,workdir))myjob.wait()print("Job #%s with ID '%s' finished (RC: %s). Output available in: '%s'"%(jobno,myjob.jobid,myjob.exitcode,workdir))basedir.close()exceptsaga.Exception,ex:print(f"An error occurred during job execution: {ex}")sys.exit(-1)if__name__=="__main__":execution_host=saga.Url("pbs+ssh://india.futuregrid.org")ctx=saga.Context()ctx.type=saga.Context.SSHctx.userid="oweidner"# like 'ssh username@host ...'ctx.userkey="/Users/oweidner/.ssh/rsa_work"# like ssh -i ...'session=saga.Session()session.contexts.append(ctx)js=saga.job.Service(execution_host,session)foriinrange(0,4):main(i,session,js)

Grants

The work related to the SAGA Project is funded by the following grants: NSF-CHE 1125332 (CDI) [19] , NSF-EPS 1003897 (LaSIGMA) [20] , NSF-OCI 1007115 (ExTENCI) [21] . Previous grants include: NSF-OCI 0710874 (HPCOPS), NIH grant number P20RR016456 and UK EPSRC grant number GR/D0766171/1 via OMII-UK [22]

Notes

  1. 1 2 3 T. Goodale; S. Jha; H. Kaiser; T. Kielmann; P. Kleijer; A. Merzky; J. Shalf; C. Smith. "A Simple API for Grid Applications (SAGA)" (PDF). OGF Document Series 90.
  2. SAGA: A Simple API for Grid applications, High-Level Application Programming on the Grid Tom Goodale, Shantenu Jha, Harmut Kaiser, Thilo Kielmann, Pascal K leijer, Gregor von Laszewski, Craig Lee, Andre Merzky, Hrabri Rajic, John Shalf Computational Methods in Science and Technology, vol. 12 # 1, 2006
  3. Grid Interoperability at the Application Level Using SAGA Shantenu Jha, Hartmut Kaiser, Andre Merzky, Ole Weidner E-SCIENCE ’07: Proceedings of the Third IEEE International Conference on e-Science and Grid Computing (e-Science 2007), 2007
  4. "Overview - SAGA WG - Open Grid Forum".
  5. Shantenu Jha, Andre Merzky: "A Collection of Use Cases for a Simple API for Grid Applications", OGF Informational Document, GFD.70 (pdf)
  6. Shantenu Jha, Andre Merzky: "A Requirements Analysis for a Simple API for Grid Applications", OGF Informational Document, GFD.71 (pdf)
  7. Steve Fisher, Anthony Wilson, Arumugam Paventhan: "SAGA API Extension: Service Discovery API", OGF Recommendation Document, GFD.144 (pdf)
  8. Andre Merzky: "SAGA API Extension: Advert API", OGF Recommendation Document, GFD.177 (pdf)
  9. Andre Merzky: "SAGA API Extension: Message API", OGF Recommendation Document, GFD.178 (pdf)
  10. Steve Fisher, Anthony Wilson: "SAGA API Extension: Information System Navigator API", OGF Recommendation Document, GFD.195 (pdf)
  11. "The SAGA C++ Reference API (Documentation)".
  12. "SAGA: How it works". www.vimeo.com.
  13. "SAGA C++".
  14. "RADICAL-SAGA".
  15. "Thank you for your interest in XSEDE".
  16. "FutureGrid". Archived from the original on 2010-11-25.
  17. "jSAGA".
  18. "DESHL". Archived from the original on 2012-06-08.
  19. NSF-CHE 1125332 (CDI)
  20. NSF-EPS 1003897 (LaSIGMA)
  21. NSF-OCI 1007115 (ExTENCI)
  22. OMII-UK

Related Research Articles

<span class="mw-page-title-main">OSGi</span> Open standards organisation

OSGi is an open specification and open source project under the Eclipse Foundation.

Jakarta Enterprise Beans is one of several Java APIs for modular construction of enterprise software. EJB is a server-side software component that encapsulates business logic of an application. An EJB web container provides a runtime environment for web related software components, including computer security, Java servlet lifecycle management, transaction processing, and other web services. The EJB specification is a subset of the Java EE specification.

Message Passing Interface (MPI) is a standardized and portable message-passing standard designed to function on parallel computing architectures. The MPI standard defines the syntax and semantics of library routines that are useful to a wide range of users writing portable message-passing programs in C, C++, and Fortran. There are several open-source MPI implementations, which fostered the development of a parallel software industry, and encouraged development of portable and scalable large-scale parallel applications.

Message-oriented middleware (MOM) is software or hardware infrastructure supporting sending and receiving messages between distributed systems. MOM allows application modules to be distributed over heterogeneous platforms and reduces the complexity of developing applications that span multiple operating systems and network protocols. The middleware creates a distributed communications layer that insulates the application developer from the details of the various operating systems and network interfaces. APIs that extend across diverse platforms and networks are typically provided by MOM.

The High Level Architecture (HLA) is a standard for distributed simulation, used when building a simulation for a larger purpose by combining (federating) several simulations. The standard was developed in the 1990s under the leadership of the US Department of Defense and was later transitioned to become an open international IEEE standard. It is a recommended standard within NATO through STANAG 4603. Today the HLA is used in a number of domains including defense and security and civilian applications.

The Web Services Invocation Framework (WSIF) supports a simple and flexible Java API for invoking any Web Services Description Language (WSDL)-described service.

Storage Resource Broker (SRB) is data grid management computer software used in computational science research projects. SRB is a logical distributed file system based on a client-server architecture which presents users with a single global logical namespace or file hierarchy. Essentially, the software enables a user to use a single mechanism to work with multiple data sources.

The Data Distribution Service (DDS) for real-time systems is an Object Management Group (OMG) machine-to-machine standard that aims to enable dependable, high-performance, interoperable, real-time, scalable data exchanges using a publish–subscribe pattern.

Globally Executable MHP (GEM) is a DVB specification of a Java based middleware for TV broadcast receivers, IPTV terminals and Blu-ray players. GEM is an ETSI standard and an ITU "Recommendation”. GEM defines a set of common functionalities which are independent from the signaling and protocols of a specific transmission network and enables to write interoperable Java applications for TV. GEM is not intended to be directly implemented, but rather forms the basis for broader specifications targeting a particular network infrastructure or class of device. GEM defines profiles for different device classes (targets) – these define the set of available features of GEM for this device class. Currently GEM defines targets for broadcast, packaged media (Blu-Ray) and IPTV. Combinations of these targets can be combined into a hybrid GEM platform, which enables to build devices with multiple network interfaces, such as a combined broadcast/IPTV set-top box.

A Java package organizes Java classes into namespaces, providing a unique namespace for each type it contains. Classes in the same package can access each other's package-private and protected members.

Distributed Resource Management Application API (DRMAA) is a high-level Open Grid Forum (OGF) API specification for the submission and control of jobs to a distributed resource management (DRM) system, such as a cluster or grid computing infrastructure. The scope of the API covers all the high level functionality required for applications to submit, control, and monitor jobs on execution resources in the DRM system.

The Parallel Virtual File System (PVFS) is an open-source parallel file system. A parallel file system is a type of distributed file system that distributes file data across multiple servers and provides for concurrent access by multiple tasks of a parallel application. PVFS was designed for use in large scale cluster computing. PVFS focuses on high performance access to large data sets. It consists of a server process and a client library, both of which are written entirely of user-level code. A Linux kernel module and pvfs-client process allow the file system to be mounted and used with standard utilities. The client library provides for high performance access via the message passing interface (MPI). PVFS is being jointly developed between The Parallel Architecture Research Laboratory at Clemson University and the Mathematics and Computer Science Division at Argonne National Laboratory, and the Ohio Supercomputer Center. PVFS development has been funded by NASA Goddard Space Flight Center, The DOE Office of Science Advanced Scientific Computing Research program, NSF PACI and HECURA programs, and other government and private agencies. PVFS is now known as OrangeFS in its newest development branch.

<span class="mw-page-title-main">Open Grid Forum</span> Computing standards organization

The Open Grid Forum (OGF) is a community of users, developers, and vendors for standardization of grid computing. It was formed in 2006 in a merger of the Global Grid Forum and the Enterprise Grid Alliance. The OGF models its process on the Internet Engineering Task Force (IETF), and produces documents with many acronyms such as OGSA, OGSI, and JSDL.

<span class="mw-page-title-main">Apache Axis2</span> Web service engine

Apache Axis2 is a web service engine. It is a redesign and re-write of the widely used Apache Axis SOAP stack. Implementations of Axis2 are available in Java and C.

Configurable Network Computing or CNC is JD Edwards's (JDE) client–server proprietary architecture and methodology. Now a division of the Oracle Corporation, Oracle continues to sponsor the ongoing development of the JD Edwards Enterprise Resource Planning (ERP) system, While highly flexible, the CNC architecture is proprietary and, as such, it cannot be exported to any other systems. While the CNC architecture's chief 'Claim to fame', insulation of applications from the underlying database and operating systems, were largely superseded by modern web-based technology, nevertheless CNC technology continues to be at the heart of both JD Edwards' One World and Enterprise One architecture and will play a significant role Oracle's developing fusion architecture initiative. While a proprietary architecture, CNC is neither an Oracle nor JDE product offering. The term CNC also refers to the systems analysts who install, maintain, manage and enhance this architecture. CNC's are also one of the three technical areas in the JD Edwards Enterprise Resource Planning ERP which include developer/report writer and functional/business analysts.

NetCDF is a set of software libraries and self-describing, machine-independent data formats that support the creation, access, and sharing of array-oriented scientific data. The project homepage is hosted by the Unidata program at the University Corporation for Atmospheric Research (UCAR). They are also the chief source of netCDF software, standards development, updates, etc. The format is an open standard. NetCDF Classic and 64-bit Offset Format are an international standard of the Open Geospatial Consortium.

gLite Grid computing software

gLite is a middleware computer software project for grid computing used by the CERN LHC experiments and other scientific domains. It was implemented by collaborative efforts of more than 80 people in 12 different academic and industrial research centers in Europe. gLite provides a framework for building applications tapping into distributed computing and storage resources across the Internet. The gLite services were adopted by more than 250 computing centres, and used by more than 15000 researchers in Europe and around the world.

GridRPC in distributed computing, is Remote Procedure Call over a grid. This paradigm has been proposed by the GridRPC working group of the Open Grid Forum (OGF), and an API has been defined in order for clients to access remote servers as simply as a function call. It is used among numerous Grid middleware for its simplicity of implementation, and has been standardized by the OGF in 2007. For interoperability reasons between the different existing middleware, the API has been followed by a document describing good use and behavior of the different GridRPC API implementations. Works have then been conducted on the GridRPC Data Management, which has been standardized in 2011.

GeoAPI is free software providing a set of Java interfaces for GIS applications. GeoAPI interfaces are derived from the abstract model and concrete specifications published collaboratively by the International Organization for Standardization (ISO) in its 19100 series of documents and the Open Geospatial Consortium (OGC) in its abstract and implementation specifications. GeoAPI provides an interpretation and adaptation of these standards to match the constraints and usages of the target programming language. The international standards translated to Java interfaces are: