23
Basics Globus Toolkit™ Developer Tutorial The Globus Project™ 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.

Basics Globus Toolkit™ Developer Tutorial The Globus Project™ Argonne National Laboratory USC Information Sciences Institute Copyright

  • View
    220

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Basics Globus Toolkit™ Developer Tutorial The Globus Project™ Argonne National Laboratory USC Information Sciences Institute  Copyright

Basics

Globus Toolkit™ Developer Tutorial

The Globus Project™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.

Page 2: Basics Globus Toolkit™ Developer Tutorial The Globus Project™ Argonne National Laboratory USC Information Sciences Institute  Copyright

April 18, 2023 2Globus Toolkit™ Developer Tutorial: Basics

Setting the Foundation

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

Naming conventions– Functions, variables, structures, etc.

Installation tree structure– Where things get installed

Source tree structure– Where things come from

Page 3: Basics Globus Toolkit™ Developer Tutorial The Globus Project™ Argonne National Laboratory USC Information Sciences Institute  Copyright

April 18, 2023 3Globus Toolkit™ Developer Tutorial: Basics

Globus Approach 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.)

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

Page 4: Basics Globus Toolkit™ Developer Tutorial The Globus Project™ Argonne National Laboratory USC Information Sciences Institute  Copyright

April 18, 2023 4Globus Toolkit™ Developer Tutorial: Basics

Globus Approach

Focus on architecture issues– Provide implementations of

grid protocols and APIs as basic infrastructure

– Use to construct high-level, domain-specific solutions

Design principles– Keep participation cost low– Enable local control– Support for adaptation

Diverse global services

Core Globusservices

Local OS

A p p l i c a t i o n s

Page 5: Basics Globus Toolkit™ Developer Tutorial The Globus Project™ Argonne National Laboratory USC Information Sciences Institute  Copyright

April 18, 2023 5Globus Toolkit™ Developer Tutorial: Basics

Layered Architecture

Applications

Core ServicesMetacomputing

Directory Service

GRAMGlobus

Security Interface

Replica Catalog

GASS

GridFTP

Local Services

LSF

Condor MPI

NQEPBS

TCP

AIXLinux

UDP

High-level Services and Tools

Cactus Condor-GMPI Nimrod/Gglobusrun PUNCH

Grid Status

I/O

Solaris

DRM

Page 6: Basics Globus Toolkit™ Developer Tutorial The Globus Project™ Argonne National Laboratory USC Information Sciences Institute  Copyright

April 18, 2023 6Globus Toolkit™ Developer Tutorial: Basics

Why C(Why Not C++)

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

Linkage– Linking with Fortran can be difficult

Religion– C++ gives too much rope to hang yourself

– Good C coding practices are usually adequate

Page 7: Basics Globus Toolkit™ Developer Tutorial The Globus Project™ Argonne National Laboratory USC Information Sciences Institute  Copyright

April 18, 2023 7Globus Toolkit™ Developer Tutorial: Basics

Naming Conventions

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

Page 8: Basics Globus Toolkit™ Developer Tutorial The Globus Project™ Argonne National Laboratory USC Information Sciences Institute  Copyright

April 18, 2023 8Globus Toolkit™ Developer Tutorial: Basics

Function Naming Conventions

All function names and other exported symbols follow the form:

globus_<package>_<module>_<action> The <package> 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(…)

Page 9: Basics Globus Toolkit™ Developer Tutorial The Globus Project™ Argonne National Laboratory USC Information Sciences Institute  Copyright

April 18, 2023 9Globus Toolkit™ Developer Tutorial: Basics

Function Return Values

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

Page 10: Basics Globus Toolkit™ Developer Tutorial The Globus Project™ Argonne National Laboratory USC Information Sciences Institute  Copyright

April 18, 2023 10Globus Toolkit™ Developer Tutorial: Basics

Function Return Values

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

Page 11: Basics Globus Toolkit™ Developer Tutorial The Globus Project™ Argonne National Laboratory USC Information Sciences Institute  Copyright

April 18, 2023 11Globus Toolkit™ Developer Tutorial: Basics

Library Naming Conventions

Library names follow the same naming convention as the functions in that library:

libglobus_<package>_<module>.a Currently shared libraries are not

supported Examples:

– libglobus_gram_client.a

– libglobus_nexus.a

Page 12: Basics Globus Toolkit™ Developer Tutorial The Globus Project™ Argonne National Laboratory USC Information Sciences Institute  Copyright

April 18, 2023 12Globus Toolkit™ Developer Tutorial: Basics

Program Naming Conventions 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

Page 13: Basics Globus Toolkit™ Developer Tutorial The Globus Project™ Argonne National Laboratory USC Information Sciences Institute  Copyright

April 18, 2023 13Globus Toolkit™ Developer Tutorial: Basics

Install Tree Structure

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

Page 14: Basics Globus Toolkit™ Developer Tutorial The Globus Project™ Argonne National Laboratory USC Information Sciences Institute  Copyright

April 18, 2023 14Globus Toolkit™ Developer Tutorial: Basics

Globus Toolkit Modules

common (used by everything)module activation, threads, libc wrappers, callbacks, errors, etc.

io

gss

gss_assist

ldap

Uses

gram_client

duroc_control duroc_runtime

gram_myjob

gass_transfer

nexus

gass_cache

gass

dc

hbm_client

hbm_datacollector

rsl

utp mp

Page 15: Basics Globus Toolkit™ Developer Tutorial The Globus Project™ Argonne National Laboratory USC Information Sciences Institute  Copyright

April 18, 2023 15Globus Toolkit™ Developer Tutorial: Basics

New Globus ToolkitData Grid Modules

Library

Program

Legend

globus-url-copy

ReplicaPrograms

CustomServers

globus_gass_copy

globus_ftp_client

globus_ftp_control

globus_common GSI (security)

globus_io OpenLDAP client

globus_replica_catalog

globus_replica_manager

Custom Clients

globus_gass_transfer

globus_gass

Already exist

Page 16: Basics Globus Toolkit™ Developer Tutorial The Globus Project™ Argonne National Laboratory USC Information Sciences Institute  Copyright

April 18, 2023 16Globus Toolkit™ Developer Tutorial: Basics

Security Modules

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

gss_assist– Simplified interface to GSS-API

Page 17: Basics Globus Toolkit™ Developer Tutorial The Globus Project™ Argonne National Laboratory USC Information Sciences Institute  Copyright

April 18, 2023 17Globus Toolkit™ Developer Tutorial: Basics

Resource Management Modules

RSL parser GRAM

– client API: simple client

– myjob API: parallel job bootstrapping

– jobmanager API: server infrastructure

– gatekeeper: root security & dispatch svc DUROC

– control API: client

– runtime API: job startup barriers, etc

– bootstrap API: parallel job bootstrapping

Page 18: Basics Globus Toolkit™ Developer Tutorial The Globus Project™ Argonne National Laboratory USC Information Sciences Institute  Copyright

April 18, 2023 18Globus Toolkit™ Developer Tutorial: Basics

GridFTP Modules

GridFTP control– Low level handling of control and data

channels GridFTP client

– High level client> Get, put, 3rd party transfer, cd, mkdir, rmdir, etc…

– Rich plug-in support for reliability and monitoring

Page 19: Basics Globus Toolkit™ Developer Tutorial The Globus Project™ Argonne National Laboratory USC Information Sciences Institute  Copyright

April 18, 2023 19Globus Toolkit™ Developer Tutorial: Basics

GASS (File Access) Modules GASS url copy

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

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

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

GASS server_ez– Simple, embeddable server

GASS cache– Cache for remote files (prefetch etc.)

Page 20: Basics Globus Toolkit™ Developer Tutorial The Globus Project™ Argonne National Laboratory USC Information Sciences Institute  Copyright

April 18, 2023 20Globus Toolkit™ Developer Tutorial: Basics

Information Services Modules

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

Page 21: Basics Globus Toolkit™ Developer Tutorial The Globus Project™ Argonne National Laboratory USC Information Sciences Institute  Copyright

April 18, 2023 21Globus Toolkit™ Developer Tutorial: Basics

Miscellaneous Modules

Common– Fundamental system and portability API

IO– Fundamental I/O API

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

Page 22: Basics Globus Toolkit™ Developer Tutorial The Globus Project™ Argonne National Laboratory USC Information Sciences Institute  Copyright

April 18, 2023 22Globus Toolkit™ Developer Tutorial: Basics

Communication Modules

MP– Simple wrapper around message passing

libraries Duct

– Used by GRAM and DUROC for startup and bootstrapping

Nexus (deprecated)– Multi-method communication library

– Being deprecated

Page 23: Basics Globus Toolkit™ Developer Tutorial The Globus Project™ Argonne National Laboratory USC Information Sciences Institute  Copyright

April 18, 2023 23Globus Toolkit™ Developer Tutorial: Basics

Summary

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