Документ взят из кэша поисковой машины. Адрес оригинального документа : http://acat02.sinp.msu.ru/presentations/GGtut/Dev-02-Basics1.pdf
Дата изменения: Sat Jul 6 22:29:40 2002
Дата индексирования: Mon Oct 1 20:27:50 2012
Кодировка:
Basics
Globus ToolkitTM Developer Tutorial The Globus ProjectTM
Argonne National Laboratory USC Information Sciences Institute http://www.globus.org/
Copyright (c) 2002 University of Chicago and The University of Southern California. All Rights Reserved. This presentation is licensed for use under the terms of the Globus Toolkit Public License. See http://www.globus.org/toolkit/download/license.html for the full text of this license.


Setting the Foundation
l

Strategies for the Globus Toolkit
­ Layered architecture, protocols & APIs

l

Naming conventions
­ Functions, variables, structures, etc.

l

Installation tree structure
­ Where things get installed

l

Source tree structure
­ Where things come from

March 25, 2002

Globus ToolkitTM Developer Tutorial: Basics

2


Globus Approach
l

Software toolkit addressing key technical areas
­ Offer a modular "bag of technologies" ­ Enable incremental development of grid-enabled tools and applications ­ Define and standardize grid protocols and APIs (Our software development supports this goal.)

l

Focus is on inter-domain issues, not clustering
­ Supports collaborative resource use spanning multiple organizations ­ Integrates cleanly with intra-domain services ­ Creates a "collective" service layer

March 25, 2002

Globus ToolkitTM Developer Tutorial: Basics

3


Globus Approach
l

Focus on architecture issues

Applications

l

Design principles

­ Provide implementations of Diverse global services grid protocols and APIs as basic infrastructure ­ Use to construct high-level, domain-specific solutions Core Globus
services

­ Keep participation cost low ­ Enable local control ­ Support for adaptation
Local OS
March 25, 2002 Globus ToolkitTM Developer Tutorial: Basics 4


Layered Architecture
Applications
DRM Cactus

High-level Services and Tools
MPI globusrun PUNCH Nimrod/G

Grid Status Condor-G

GASS GridFTP

Core Services
Metacomputing Directory Service Globus Security Interface Replica Catalog

GRAM I/O

Condor LSF

MPI PBS NQE

Local Services

TCP Linux AIX

UDP Solaris

March 25, 2002

Globus ToolkitTM Developer Tutorial: Basics

5


Why C (Why Not C++)
l

Portability
­ Most C++ compilers do not support complete ANSI C++ standard ­ This is getting better, but currently C++ is still a headache for highly portable code

l

Linkage
­ Linking with Fortran can be difficult

l

Religion
­ C++ gives too much rope to hang yourself ­ Good C coding practices are usually adequate

March 25, 2002

Globus ToolkitTM Developer Tutorial: Basics

6


Naming Conventions
l

Globus Toolkit is comprised of a set of modules, each with a unique name A set of related modules may be part of a larger package In order to avoid name collisions, all names begin with globus or grid

l

l

March 25, 2002

Globus ToolkitTM Developer Tutorial: Basics

7


Function Naming Conventions
l

All function names and other exported symbols follow the form: globus___ The is omitted if the module is not part of a larger package of related APIs Examples:
­ globus_gram_client_job_submit(...) ­ globus_nexus_send_ rsr(...)

l

l

March 25, 2002

Globus ToolkitTM Developer Tutorial: Basics

8


Function Return Values
l

Most functions return either an int or globus_result_t value Older APIs return value: int
­ Like errno ­ GLOBUS_SUCCESS (0) indicates that the function was successful ­ Any other return value is an error code ­ Error codes defined in module headers ­ Many modules still use this approach

l

March 25, 2002

Globus ToolkitTM Developer Tutorial: Basics

9


Function Return Values
l

Newer APIs return value: globus_result_t
­ New approach - like exception objects ­ GLOBUS_SUCCESS still indicates success ­ Otherwise can be expanded to a globus_error_t "object"
> Error type hierarchy with single inheritance > Can easily match against types (similar to "catch") > Can be used to return extended information about the error

­ New 1.1 modules use this approach ­ Will gradually be pushed through other modules
March 25, 2002 Globus ToolkitTM Developer Tutorial: Basics 10


Library Naming Conventions
l

Library names follow the same naming convention as the functions in that library: libglobus__.a Currently shared libraries are not supported Examples:
­ libglobus_gram_client.a ­ libglobus_nexus.a

l

l

March 25, 2002

Globus ToolkitTM Developer Tutorial: Basics

11


Program Naming Conventions
l l l

All program names start with globus or grid Dash (-) is used as a word delimiter Many Globus programs are not directly related to a single module
­ May use multiple modules to implement higher level functionality
> e.g. globusrun , globus-job-submit

­ May not be directly related to any module
> e.g. globus- sh-exec

­ But module name used where appropriate
> e.g. globus- gass-server
March 25, 2002 Globus ToolkitTM Developer Tutorial: Basics 12


Install Tree Structure
l

GLOBUS_LOCATION environment variable points to the install tree, containing:
­ bin: Programs for your path ­ sbin: System binaries ­ include, lib: Development headers & libraries ­ libexec: Programs/scripts used by libraries ­ etc: Configuration files ­ man: Man pages ­ var: Log files, etc. ­ share: Other shared data files
Globus ToolkitTM Developer Tutorial: Basics

March 25, 2002

13


Uses

Globus Toolkit Modules
gass gass_cache gass_transfer rsl duroc_control gram_client nexus io gss_assist utp gss dc mp duroc_runtime gram_myjob

hbm_datacollector hbm_client ldap

common (used by everything) module activation, threads, libc wrappers, callbacks, errors, etc.
March 25, 2002 Globus ToolkitTM Developer Tutorial: Basics 14


New Globus Toolkit Data Grid Modules
Custom Servers Custom Clients globus- url-copy globus_ gass

Replica Programs

globus_replica_manager

globus_ gass _copy

globus_ gass _transfer globus_ftp_client globus_ftp_control
Legend
Program Library Already exist March 25, 2002

globus_replica_catalog OpenLDAP client GSI (security)

globus_ io globus_common

Globus ToolkitTM Developer Tutorial: Basics

15


Security Modules
l

gssapi
­ Grid Security Infrastructure ­ GSS-API implementation ­ SSL authentication (public key)

l

gss_assist
­ Simplified interface to GSS-API

March 25, 2002

Globus ToolkitTM Developer Tutorial: Basics

16


Resource Management Modules
l l

RSL parser GRAM
­ client API: simple client ­ myjob API: parallel job bootstrapping ­ jobmanager API: server infrastructure ­ gatekeeper: root security & dispatch svc

l

DUROC
­ control API: client ­ runtime API: job startup barriers, etc ­ bootstrap API: parallel job bootstrapping

March 25, 2002

Globus ToolkitTM Developer Tutorial: Basics

17


GridFTP Modules
l

GridFTP control
­ Low level handling of control and data channels

l

GridFTP client
­ High level client
> Get, put, 3rd party transfer, cd, mkdir, rmdir, etc...

­ Rich plug-in support for reliability and monitoring

March 25, 2002

Globus ToolkitTM Developer Tutorial: Basics

18


GASS (File Access) Modules
l

GASS url copy
­ url-to-url file copy, for file:, http:, ftp: urls ­ Wrapped by globus -url-copy program

l

GASS file
­ open(), close(): works on files and URLs

l

GASS transfer
­ Client & server handling of get/put requests

l

GASS server_ez
­ Simple, embeddable server

l

GASS cache
­ Cache for remote files ( prefetch etc.)
Globus ToolkitTM Developer Tutorial: Basics 19

March 25, 2002


Information Services Modules
l

MDS tools
­ client programs ­ server tools ­ built on OpenLDAP

March 25, 2002

Globus ToolkitTM Developer Tutorial: Basics

20


Miscellaneous Modules
l

Common
­ Fundamental system and portability API

l

IO
­ Fundamental I/O API

l l l l

Data conversion UTP timing package Miscellaneous programs and scripts Programs that use multiple APIs

March 25, 2002

Globus ToolkitTM Developer Tutorial: Basics

21


Communication Modules
l

MP
­ Simple wrapper around message passing libraries

l

Duct
­ Used by GRAM and DUROC for startup and bootstrapping

l

Nexus (deprecated)
­ Multi-method communication library ­ Being deprecated

March 25, 2002

Globus ToolkitTM Developer Tutorial: Basics

22


Summary
l

Hopefully you should be starting to get your bearing within the Globus Toolkit Next each module will be explored, via:
­ Summary of functionality ­ Walk-through with sample tools ­ Walk-through with APIs ­ Discussion of interesting issues

l

March 25, 2002

Globus ToolkitTM Developer Tutorial: Basics

23