Tools for Developing Grid Applications - PowerPoint PPT Presentation

1 / 29
About This Presentation
Title:

Tools for Developing Grid Applications

Description:

Spawning: SC01 App invokes Spawner Analysis tasks ... (Petroleum Engineering, CS) Deploy sensor networks across Gulf Data collected to provide ... – PowerPoint PPT presentation

Number of Views:110
Avg rating:3.0/5.0
Slides: 30
Provided by: Krzysztof75
Category:

less

Transcript and Presenter's Notes

Title: Tools for Developing Grid Applications


1
Tools for Developing Grid Applications
  • Ed Seidel, Gabrielle Allen, and GridLab Team
  • Center for Computation Technology, LSU
  • Albert-Einstein-Institute, Germany

2
Center for Computation Technology (CCT), LSU
  • Ed Seidel, Director
  • Core funding from state of 9M
  • Drive new efforts in research, education and
    economic development
  • Facilities supermike, NLR, LONI
  • Research groups in CS and computational sciences,
    e.g.
  • Grid computing, Computational frameworks,
    Scientific visualization, Collaborative
    environments
  • Astro, Climate, Bio, Petro,

3
GridLab Project Vision
  • Goals
  • Enable all Apps to take full advantage of Grids
  • Develop tools for non-Grid programmers to create
    Apps, services to enable them
  • Unlock innovative power of Grids with new
    paradigms
  • Automatic resource discovery, distribution of
    tasks, spawning, migration, reconfiguration,
    DDDAS, collaboration
  • Address growing frustration Apps dont receive
    enough attention, cant do anything new on Grids
  • Grid Application Toolkit (GAT)
  • Abstracts services at application level, for
    application developers simple
  • Makes apps ind. of any infrastructure, endowed
    with grid capabilities
  • Tool to enable all our wild SC demos and more for
    all users, w/o reference to particular
    infrastructure or services
  • Lead way for standard
  • Many such projects now CoG, DRMAA, GridRPC,
    dozen talks last week
  • Parallel computing ---gt MPI Grid Computing
    ---gt GAT, SAGA

4
Grid Application Toolkit (GAT)
  • Application oriented access to Grid capabilities
    through standard API
  • GATFile_Move(from, to, details)
  • GATResource_FindResource(details)
  • GAT_LogicalFile(file, name, details)
  • Independent of Grid infrastructure and available
    services.
  • C, C, Java, Python, Perl, Fortran
  • API driver for GGF SAGA-RG

5
GAT Motivation
  • Grids and Grid middleware are everywhere
  • Grid applications are lagging behind, big jump
    from prototypes and demonstrations to real
    production use of Grids.
  • Problems
  • Missing or immature grid services
  • Changing environment
  • Different and evolving interfaces to the grid
  • Interfaces are not simple for scientific
    application developers
  • Application developers accept Grid computing
    paradigm only slowly

6
Copy a File GASS
int RemoteFileGetFile (char const source,
if (source_url.scheme_type
GLOBUS_URL_SCHEME_GSIFTP
char const target)
source_url.scheme_type
GLOBUS_URL_SCHEME_FTP ) globus_url_t
source_url
globus_ftp_client_operationattr_init
(source_ftp_attr) globus_io_handle_t
dest_io_handle
globus_gass_copy_attr_set_ftp (source_gass_copy_
attr, globus_ftp_client_operationattr_t
source_ftp_attr
source_ftp_attr)
globus_result_t result


globus_gass_transfer_requestattr_t
source_gass_attr else

globus_gass_copy_attr_t
source_gass_copy_attr
globus_gass_transfer_requestattr_init
(source_gass_attr, globus_gass_copy_handle_
t gass_copy_handle

source_url.scheme) globus_gass_copy_handleatt
r_t gass_copy_handleattr
globus_gass_copy_attr_set_gass(source_gass_copy_a
ttr, globus_ftp_client_handleattr_t
ftp_handleattr
source_gass_attr)
globus_io_attr_t io_attr

int
output_file -1

output_file
globus_libc_open ((char) target,
if ( globus_url_parse (source_URL,
source_url) ! GLOBUS_SUCCESS )
O_WRONLY O_TRUNC O_CREAT,
printf ("can not parse source_URL \"s\"\n",
source_URL) S_IRUSR
S_IWUSR S_IRGRP return
(-1)
S_IWGRP)


if ( output_file -1 )

printf
("could not open the file \"s\"\n", target)
if ( source_url.scheme_type !
GLOBUS_URL_SCHEME_GSIFTP
return (-1)
source_url.scheme_type !
GLOBUS_URL_SCHEME_FTP

source_url.scheme_type !
GLOBUS_URL_SCHEME_HTTP /
convert stdout to be a globus_io_handle /
source_url.scheme_type ! GLOBUS_URL_SCHEME_HTTPS
) if ( globus_io_file_posix_conver
t (output_file, 0, printf ("can not copy from
s - wrong prot\n", source_URL)
dest_io_handle)
return (-1)
! GLOBUS_SUCCESS)


printf ("Error converting the file
handle\n") globus_gass_copy_hand
leattr_init (gass_copy_handleattr)
return (-1)
globus_gass_copy_attr_init
(source_gass_copy_attr)




globus_ftp_client_handleattr_init
(ftp_handleattr) result
globus_gass_copy_register_url_to_handle (
globus_io_fileattr_init
(io_attr)
gass_copy_handle, (char)source_URL,


source_gass_copy_attr, dest_io_handle,
globus_gass_copy_attr_set_io
(source_gass_copy_attr, io_attr)
my_callback, NULL)

io_attr) if ( result
! GLOBUS_SUCCESS )
globus_gass_copy_handleattr_set_ftp_attr
printf ("error
s\n", globus_object_printable_to_string
(gass_copy_handleattr,
(globus_error_get
(result)))
ftp_handleattr)
return (-1)
globus_gass_copy_handle
_init (gass_copy_handle,


gass_copy_handleattr)
globus_url_destroy (source_url)

return
(0)


7
Copy a File CoG/RFT
package org.globus.ogsa.gui
TransferRequestType
transferRequest new TransferRequestType ()

transferRequest.setT
ransferArray (transfers1)
import java.io.BufferedReader


import java.io.File
int concurrency
Integer.valueOf
import java.io.FileReader

((String)requestData.elementAt(6)).intValue()
import java.net.URL


import java.util.Date
if (concurrency
gt transfers1.length)
import java.util.Vector


import javax.xml.rpc.Stub

System.out.println ("Concurrency should be less
than the number" import org.apache.axis.mess
age.MessageElement
"of transfers in the
request") import
org.apache.axis.utils.XMLUtils
System.exit (0)
import
org.globus.

import
org.gridforum.ogsi.
transferRequest.setConcurrency
(concurrency) import
org.gridforum.ogsi.holders.TerminationTimeTypeHold
er
import
org.w3c.dom.Document
TransferRequestElement
requestElement new TransferRequestElement ()
import org.w3c.dom.Element
requestElement.setTran
sferRequest (transferRequest)



public class RFTClient
ExtensibilityType
extension new ExtensibilityType ()
public static void copy (String source_url,
String target_url) extension
AnyHelper.getExtensibility (requestElement)
try


File requestFile new File
(source_url)
OGSIServiceGridLocator factoryService new
OGSIServiceGridLocator () BufferedReader
reader null
Factory factory factoryService.getFacto
ryPort (new URL (source_url)) try

GridServiceFactory gridFactory new
GridServiceFactory (factory) reader
new BufferedReader (new FileReader
(requestFile))

catch (java.io.FileNotFoundException fnfe)
LocatorType locator
gridFactory.createService (extension)
Vector requestData new Vector ()
System.out.println
("Created an instance of Multi-RFT")
requestData.add (target_url)


TransferType transfers1 new
TransferTypetransferCount
MultiFileRFTDefinitionServiceGridLocator loc
RFTOptionsType
multirftOptions new RFTOptionsType ()
new
MultiFileRFTDefinitionServiceGridLocator()

RFTPortType rftPort
loc.getMultiFileRFTDefinitionPort (locator)
multirftOptions.setBinary
(Boolean.valueOf (
((Stub)rftPort)._setProperty (Constants.AUTHORIZAT
ION, (String)requestData.
elementAt (0)).booleanValue ())
NoAuthorization.getI
nstance()) multirftOptions.setBlockSi
ze (Integer.valueOf (
((Stub)rftPort)._setProperty (GSIConstants.GSI_MOD
E, (String)requestData.
elementAt (1)).intValue ())
GSIConstants.GSI_MOD
E_FULL_DELEG) multirftOptions.setTcpBuff
erSize (Integer.valueOf (
((Stub)rftPort)._setProperty (Constants.GSI_SEC_CO
NV, (String)requestData.
elementAt (2)).intValue ())
Constants.SIGNATURE)
multirftOptions.setNotpt
(Boolean.valueOf (
((Stub)rftPort)._setProperty (Constants.GRIM_POLIC
Y_HANDLER, (String)requestData.
elementAt (3)).booleanValue ())
new
IgnoreProxyPolicyHandler ())
multirftOptions.setParallelStreams
(Integer.valueOf (

(String)requestData.elementAt
(4)).intValue ()) int
requestid rftPort.start ()
multirftOptions.setDcau(Boolea
n.valueOf(
System.out.println ("Request id " requestid)
(String)requestData
.elementAt (5)).booleanValue ())




int i 7

catch (Exception e)
for (int j 0 j lt
transfers1.length j)



System.err.println (MessageUtils.toString
(e)) transfers1j
new TransferType ()





transfers1j.setTransferId (j)


transfers1j.setSourceUrl
((String)requestData.elementAt (i))
transfers1j.setDestinationUrl
((String)requestData.elementAt (i))
transfers1j.setRftOptions
(multirftOptions)
8
Copy a File GAT/C
include ltGAT.hppgt GATResult
RemoteFileGetFile (GATContext context,
stdstring
source_url,
stdstring target_url) try
GATFile file (context, source_url)
file.Copy (target_url) catch
(GATException const e) stdcerr ltlt
"Some error " ltlt e.what() ltlt stdendl
return e.Result() return GAT_SUCCESS
9
GAT Solution
  • GAT API layer between applications and the grid
    infrastructure
  • Higher level application oriented APIs, hide
    complexity, abstract grid functionality
  • Insulate against
  • Rapid evolution of grid infrastructure
  • State of Grid deployment
  • Choose between different grid infrastructures
  • Application developers use and develop for the
    grid independent of the state of deployment of
    the grid infrastructure
  • Service developers can make their software
    available to many different applications.

10
Example Remote File Copying
Application
Copy my file from there to there ..
SOAP
WSDL
Corba
OGSA
Other
Monitoring
Profiling
Information
Logging
Security
Resource Management
Notification
Application Manager
Migration
Data Management
GLOBUS
Other Grid Infrastructure?
11
Example Remote File Copy
GATFile.Copy
scp
cp
gsiscp
sftp
gridftp
wget
RFT
GridLab
Project Specific
GridJIT
newest
12
Example Remote File Copy
GATFile.Copy
include ltGAT.hppgt GATResult
RemoteFileGetFile (GATContext context,
stdstring
source_url,
stdstring target_url) try
GATFile file (context, source_url)
file.Copy (target_url) catch
(GATException const e) stdcerr ltlt
"Some error " ltlt e.what() ltlt stdendl
return e.Result() return GAT_SUCCESS
scp
cp
gsiscp
sftp
gridftp
wget
RFT
GridLab
Project Specific
GridJIT
newest
13
Grid Application Toolkit
  • Standard API and Toolkit for developing portable
    Grid applications independently of the underlying
    Grid infrastructure and available services
  • Implements the GAT-API
  • Used by applications (different languages)
  • GAT Adaptors
  • Connect to capabilities/services
  • Interchangeable adaptors can be loaded/switched
    at runtime
  • GAT Engine
  • Provides the function bindings for the GAT-API

14
GridLab Architecture
15
GAT API Scope
  • Files (GATLogicalFile, )
  • Resource Management (GATResourceDescription...)
  • Monitoring, Events (GATRequestNotifier)
  • Information exchange (GATAdvertisable)
  • Utility classes (error handling, security,
    preferences) (GATStatus)
  • Few Dozen APIs. Not more! Keep it simple!
  • Provide simple functionality which allow us to
    focus on applications and science.

16
Example Spawn a Subtask
  • GATTable sdt sdt.add ("location",
    "/bin/date")
  • GATTable hdt hdt.add ("machine.type",
    "i686")
  • GATSoftwareDescription sd (sdt)
  • GATHardwareResourceDescription hrd (hdt)
  • GATJobDescription jd (context, sd, hrd)
  • GATResourceBroker rb (context, prefs)
  • GATJob j rb.submit (jd)

17
Implementation
  • C, C version fully implemented
  • Java version 80 complete
  • Python, Perl, Fortran to follow
  • Focus portability, lightness, flexibility,
    adaptivity
  • Adaptors
  • This is where the hard part is! But can be done
    in week
  • Multiple adaptors can be loaded at runtime
  • Local adaptors done (cp, mv, fork, rm, sockets,
    etc)
  • Many remote service adaptors finished (GRAM,
    gridftp, scp, GRMS, mercury, Unicore, etc)
  • Other Unicore, Globus, Condor, DRMAA, Sun Grid
    Engine started or about to be

18
Dynamic Grid Computing
  • Migration Cactus Worm demonstrated SC00
  • Launch Black Hole Collision Job
  • Run awhile, write checkpoint
  • Migrate itself to next site
  • User tracks/steers
  • Proof of concept, but dirty hack
  • No external services! Used ssh!
  • Created our community!
  • Spawning SC01
  • App invokes Spawner
  • Analysis tasks outsourced
  • Globus enabled login, data transfer
  • It worked!

Pioneering application, grid hacked
19
(No Transcript)
20
Many Projects Using GAT now
  • UCoMS (Petroleum Engineering, CS)
  • Deploy sensor networks across Gulf
  • Data collected to provide input to simulations,
    tasks farmed out
  • Results collected (transmitted back)
  • http//www.ucoms.org
  • SCOOP
  • Data coming in from sensors all over Gulf
    Realtime Operational Grid
  • Feeds in to models on Grid sites

21
GGF SAGA-RG
  • We want an Application standard, available
    everywhere
  • So does everyone else Grid Application Tools
    Workshop, dozen talks all saying same thing
  • Current Grid Service APIs too low level, keep
    changing, not App oriented
  • Numerous attempts to address GAT most
    ambitious, but also CoG, DRMAA, GridRPC, many
    others
  • SAGA Simple API for Grid Applications
  • Bringing all these efforts together
  • Chicago, Berlin, Brussels,
  • Led by Keith Jackson (LBL), Hrabi Rajic (Intel)
    (probably), Tom Goodale (LSU), Stephen Pickles,
    (Manchester)

22
SAGA Brussels Meeting
  • Very Inspiring!
  • Wide agreement that this should be done if
    possible
  • Strong hope that it can be done
  • Vendors agreed to implement if it is done
  • Workshops and panel discussions unanimous
  • Vendors Intel, HP, Platform, United Devices,
    Sun, others
  • Many large projects interested, some committed
    EGEE, GEMMS, GridLab, NAREGI, NextGrid, Simdat,
    D-Grid, OMII, etc
  • Design Team
  • Meet in December for 5 days
  • 1 group at LSU, 1 group in Europe, perhaps Asia?
  • Tag team effort via access grid
  • Try to come up with a spec in advance of GGF13
  • GAT should evolve quickly to this

23
Finally
  • GridLab http//www.gridlab.org
  • Grid Application Toolkit
  • http//www.gridlab.org/GAT
  • Documentation, publications, software download
  • GridSphere http//www.gridsphere.org
  • GGF Simple API for Grid Applications (SAGA)
    Research Group
  • http//forge.gridforum.org/projects/saga-rg
  • CCT hiring in all areas Deputy director,
    Researchers Grid computing, computational
    frameworks, portals, scientific visualization,
    Cluster and Grid administrators, Application
    scientists, Graduate students

24
Examples Read Remote File
  • try
  • char data25
  • GATFile file (context, source_url)
  • file.open (RD_ONLY)
  • file.seek (100, SEEK_SET)
  • file.read (data, sizeof(data))
  • file.close ()
  • catch (GATException const e)
  • stdcerr ltlt "Some error " ltlt e.what() ltlt
    stdendl
  • return e.Result()

25
Examples Read Logical File
  • try
  • char data25
  • GATLogicalFile logical_file (context,
    name)
  • listltGATFilegt files logical_file.get_files
    ()
  • files0.open (RD_ONLY)
  • files0.seek (100, SEEK_SET)
  • files0.read (data, sizeof(data))
  • files0.close ()
  • catch (GATException const e)
  • stdcerr ltlt "Some error " ltlt e.what() ltlt
    stdendl
  • return e.Result()

26
GridSphere Portal
  • Portlet based JSR 168
  • Collaboration focal point
  • Interact, share data
  • Start, monitor remote jobs
  • Move/browse files
  • Track and monitor announced jobs
  • Application specific portlets
  • e.g. http//portal.cct.lsu.edu
  • Cactus, UCoMS, SCOOP

27
Copy a File GAT/C
include ltGAT.hgt GATResult RemoteFile_GetFile
(GATContext context, char const
source_url, char const target_url)
GATStatus status 0 GATLocation source
GATLocation_Create (source_url) GATLocation
target GATLocation_Create (target_url)
GATFile file GATFile_Create (context,
source, 0) if (source 0 target 0
file 0) return GAT_MEMORYFAILURE
if ( GATFile_Copy (file, target,
GATFileMode_Overwrite) ! GAT_SUCCESS )
GATContext_GetCurrentStatus (context,
status) return GATStatus_GetStatusCode
(status) GATFile_Destroy (file)
GATLocation_Destroy (target)
GATLocation_Destroy (source) return
GATStatus_GetStatusCode (status)
28
Task Farming on the Grid
TFM implemented in Cactus
TFM
GAT used for starting remote TFMs
TFM
TFM
Designed for the Grid
TFM
TFM
Tasks can be anything
29
GridLab Project
  • EU Funded by 5th Framework (January 2002)
  • 7M project across many countries
  • PSNC, AEI, ZIB, MASARYK, VU, SZTAKI, ISUFI,
    Cardiff, NTUA, Chicago, ISI, Wisconsin, Sun,
    Compaq
  • Review last Friday in Brussels
  • 12 Work Packages covering
  • Grid Portals
  • Mobile Users
  • Different Grid Services
  • Applications
  • Numerical Relativity (Cactus)
  • Gravitational Waves (Triana)
  • All others
  • Europe-wide Test Bed
  • Grid Application Toolkit (GAT)

30
Black Holes on the Grid
  • Task farm small Cactus black hole simulations
    across testbed
  • Parameter survey black hole corotation parameter
  • Results steer a large production black hole
    simulation

31
Demonstration
32
SCOOP Hurricanes on Grid
  • SURA (NOAA) Project
  • Data coming in from sensors all over Gulf
    Realtime Operational Grid
  • Feeds in to models on SuperMike and other Grid
    sites
  • Indication of strengthening storm changing
    direction Must Act!
  • Multiple simulations, expertise, and data
    connected together FL, LA, notification,
    steering sensors
  • Early warning, preparation
  • Insurance industry, petroleum industry, local
    economy all save millions, lives saved

LSU, GoMOOS, Texas AM, UaH, UNC, U. Florida,
U. Miami, VIMS
33
GAT API Subsystems
Write a Comment
User Comments (0)
About PowerShow.com