perl | grid nik kolev csc-9020 – grid computing villanova university

17
Perl | Grid Nik Kolev CSC-9020 – Grid Computing Villanova University

Upload: alvin-may

Post on 15-Jan-2016

216 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Perl | Grid Nik Kolev CSC-9020 – Grid Computing Villanova University

Perl | Grid

Nik KolevCSC-9020 – Grid Computing

Villanova University

Page 2: Perl | Grid Nik Kolev CSC-9020 – Grid Computing Villanova University

Outline

Organizations & Standards Perl|Grid -- WSRF::Lite WSRF::Lite Workshop (not today)

Page 3: Perl | Grid Nik Kolev CSC-9020 – Grid Computing Villanova University

Organizations (OGF)

Open Grid Forum Mission: The Open Grid Forum accelerates grid

adoption to enable business value and scientific discovery by providing an open forum for grid innovation and developing open standards for grid software interoperability.

Formed in 2006 when the Global Grid Forum (GGF) and the Enterprise Grid Aliance (EGA) merged

http://www.ogf.org

Page 4: Perl | Grid Nik Kolev CSC-9020 – Grid Computing Villanova University

Standards (OGSA)

Open Grid Services Architecture A distributed interaction and computing

architecture based around services, assuring interoperability on heterogeneous systems so that different types of resources can communicate and share information

A refinement of the Web Services architecture specifically designed to support Grid requirements

http://forge.gridforum.org/sf/projects/ogsa-wg

Page 5: Perl | Grid Nik Kolev CSC-9020 – Grid Computing Villanova University

Standards (OGSA)

Page 6: Perl | Grid Nik Kolev CSC-9020 – Grid Computing Villanova University

Standards (OGSA)

Page 7: Perl | Grid Nik Kolev CSC-9020 – Grid Computing Villanova University

Standards (OGSA)

Page 8: Perl | Grid Nik Kolev CSC-9020 – Grid Computing Villanova University

Organizations (OASIS)

OASIS (Organization for the Advancement of Structured Information Standards) Mission:

Formed in 2006 when the Global Grid Forum (GGF) and the Enterprise Grid Aliance (EGA) merged

http://www.oasis-open.org

Page 9: Perl | Grid Nik Kolev CSC-9020 – Grid Computing Villanova University

Standards (OGSI)

Open Grid Services Infrastructure Published as a recommendation by the GGF in

2003) Added statefullness to Web Services to support

Grid computations Globus Toolkit v3 is a reference implementation Good first step, now obsolete

needed “componentizaion” evolution parallel to that of Web Services too grid specific for WS adoption

Page 10: Perl | Grid Nik Kolev CSC-9020 – Grid Computing Villanova University

Standards (WSRF)

WS-Resource Framework Allows stateless Web (Grid) services to interact

with stateful resources (regardless of the resources' nature)

Key concept: The WS-Resource – an entity which maintains state between calls to it abd can be accesses through a Web Service

Currently a highly unstable set of OASIS specifications

Intro|Motivation: http://www.ibm.com/developerworks/grid/library/gr-wsrf.html

Page 11: Perl | Grid Nik Kolev CSC-9020 – Grid Computing Villanova University

WSRF::Lite

Perl implementation of the WSRF spec(s): WS-Addressing WS-ResourceProperties WS-ResourceLifetimes WS-BaseFaults WS-ServiceGroups WS-Security

Source and info: http://www.rcs.manchester.ac.uk/research/wsrflite

Page 12: Perl | Grid Nik Kolev CSC-9020 – Grid Computing Villanova University

WSRF::Lite Prerequisites

*NIX (.NET also supported in the latest version) Perl (5.6 and later) SOAP::Lite IO::Socket::SSL XML::DOM … WSRF::Lite

Recommended installation Install the CPAN perl module `perl -MCPAN -e 'install <MODULE>`

Old-fashioned installation Download and explode the source tarball from CPAN `perl Makefile.PL` `make` `make test install

http://www.cpan.org

Page 13: Perl | Grid Nik Kolev CSC-9020 – Grid Computing Villanova University

WSRF::Lite

WSRF::Lite state management In-memory

Process managing a single resource Process managing multiple resources

On-disk Flat file Database

Page 14: Perl | Grid Nik Kolev CSC-9020 – Grid Computing Villanova University

WSRF::Lite

WSRF::Lite Mechanics WS-Resource WS-Resource Factory Web Service Start the Container (perl script that basically is

an http daemon) Create /tmp/wsrf and /tmp/wsrf/data directories Define WSRF_MODULES as the path to the WS-

Resource perl modules directory Access the Resource

Example scripts are provided with the WSRF::Lite distribution

Page 15: Perl | Grid Nik Kolev CSC-9020 – Grid Computing Villanova University

WSRF::Lite – Resource Factory

<code snippet>my $newService = WSRF::Resource->new( module=> 'Counter', path => '/WSRF/Counter',

namespace => 'http://foo/bar' );

my $resourceID = $newService->ID();

$newService->handle(@params); my $wsa = WSRF::GSutil::createWSAddress( module=> 'Counter', path => '/WSRF/Counter/', ID => $resourceID ); return WSRF::Header::header( $envelope ), SOAP::Data->value($wsa)->type('xml'); </code snippet>

Page 16: Perl | Grid Nik Kolev CSC-9020 – Grid Computing Villanova University

WSRF::Lite – Resource Module

<code snippet>$WSRF::WSRP::ResourceProperties{count} = 0;

sub add { my $envelope = pop @_; my ($class, $val) = @_; $WSRF::WSRP::ResourceProperties{count} =

$WSRF::WSRP::ResourceProperties{count} + $val; return WSRF::Header::header($envelope), $WSRF::WSRP::ResourceProperties{count};

}</code snippet>

Page 17: Perl | Grid Nik Kolev CSC-9020 – Grid Computing Villanova University

WSRF::Lite Building WS-Resources with WSRF::Lite: http://www.ibm.com/developerworks/edu/gr-dw-gr-wsrflite-i.html

Add security to your WSRF::Lite services: http://www.ibm.com/developerworks/edu/gr-dw-gr-buildsecure.html

Using AJAX with WSRF::Lite: http://www.ibm.com/developerworks/edu/gr-dw-gr-ajaxwsrflite.html