4c1 GT 4 grid services and their implementation Advanced features: An overview Topics: Resource home Singleton resource Multiple resources Notifications.

Slides:



Advertisements
Similar presentations
GT4 WS Core Tutorial Sam Meder Jarek Gawor 6/11/04.
Advertisements

Web Service Ahmed Gamal Ahmed Nile University Bioinformatics Group
Mark Holliday and Barry Wilkinson, 2004A2.1 Assignment 2 “Simple” Grid Services Assignment.
Web Service Resource Framework (WSRF) Alexander Wöhrer und Peter Brezany
BiodiversityWorld GRID Workshop NeSC, Edinburgh – 30 June and 1 July 2005 Resource wrappers, web services, grid services Jaspreet Singh School of Computer.
This product includes material developed by the Globus Project ( Introduction to Grid Services and GT3.
WS-Resource Framework Adam Belloum Computer Architecture & Parallel Systems group University of Amsterdam
George Blank University Lecturer. CS 602 Java and the Web Object Oriented Software Development Using Java Chapter 4.
7-2.1 Additional Features of WSRF/GT4 Services A brief outline © 2011 B. Wilkinson/Clayton Ferner. Fall 2011 Grid computing course. Modification date:
Assignment 2 Modifying, Compiling, and Deploying a Simple Service Presenter Information goes Here.
A2.1 ITCS 4010/5010 Grid Computing, 2005, UNC-Charlotte, B. Wilkinson Assignment 2 “Simple” Grid Services Assignment.
Reza Gorgan Mohammadi AmirKabir University of Technology, Department of Computer Engineering & Information Technology Advanced design.
4a.1 Grid Computing Infrastructure Software ITCS 4146/5146, UNC-Charlotte, B. Wilkinson, 2007 Feb 16, 2007,
Building Services in WSRF Ben Clifford GGF Summer School July 2004.
4d.1 Grid Computing, B. Wilkinson, 2005 Web Service Resource Framework Notes on “sticky note” assignment.
4a.1 Grid Computing Standards ITCS 4010 Grid Computing, 2005, UNC-Charlotte, B. Wilkinson, slides 4a.
Building services in WSRF Ben Clifford Draft For GGF summer school, July 2004.
4c1 GT 4 Services Advanced features: A very brief overview Topics: Resource home Singleton resource Multiple resources Notifications Lifecycles Copyright.
4b.1 Grid Computing Software Components of Globus 4.0 ITCS 4010 Grid Computing, 2005, UNC-Charlotte, B. Wilkinson, slides 4b.
Grid Computing, B. Wilkinson, 20046c.1 Globus III - Information Services.
OGSA : Open Grid Services Architecture Ramya Rajagopalan
Includes slides borrowed freely from The Globus team Building Grid Services and The Globus Toolkit ® CISE : Globus Tutorial Anda Iamnitchi.
1 Modeling Stateful Resources with Web Services ICE Ph.D lecture Byung-sang Kim.
Web Services (tying it all together) and Introduction to Grid Services Concepts These slides are adapted from course material developed by Barry Wilkinson,
GT3 Tutorial Chapter 5, 6, and 7 Lecture for Cluster and Grid Computing, CSCE 490/590 Fall 2004, University of Arkansas, Dr. Amy Apon
T Network Application Frameworks and XML Web Services and WSDL Sasu Tarkoma Based on slides by Pekka Nikander.
1 Notes adapted from Barry Wilkinson Grid Computing Course UNCC Web Service Resource Framework Creating Globus 4 services.
Grid Computing, B. Wilkinson, 20043b.1 Web Services Part II.
Data Management Kelly Clynes Caitlin Minteer. Agenda Globus Toolkit Basic Data Management Systems Overview of Data Management Data Movement Grid FTP Reliable.
4c.1 Grid Computing, B. Wilkinson, 2005 Web Service Resource Framework Creating Globus 4 services.
OPEN GRID SERVICES ARCHITECTURE AND GLOBUS TOOLKIT 4
9th Lecture COP 4991 Component-Based Software Development Instructor: Masoud Sadjadi Developing Grid Services.
1 Stateful Session Beans Stateless Session Beans Michael Brockway Sajjad Shami Northumbria University School of Computing, Engineering & Information Sciences.
WSRF & WSRF’s Application in VO-DAS Haijun Tian ChinaVO
GT Components. Globus Toolkit A “toolkit” of services and packages for creating the basic grid computing infrastructure Higher level tools added to this.
CS 390- Unix Programming Environment CS 390 Unix Programming Environment Topics to be covered: Distributed Computing Fundamentals.
Grid Services Grid Enablement of Scientific Applications Present by Mark Joselli Professor S. Masoud Sadjadi.
Application code Registry 1 Alignment of R-GMA with developments in the Open Grid Services Architecture (OGSA) is advancing. The existing Servlets and.
Introduction to Globus Toolkit 4 at LA Grid CIS 6612 – Autonomic Grid Computing Summer 2006 PresentersFernando FarfánMayelin Felipe AgnosticsDiego LópezRamakrishna.
This product includes material developed by the Globus Project ( Exercise 6 Discovery: Find a File.
Introduction to Grid programming with Globus Toolkit 4 By Valentin Kravtsov and David Carmeli Combined from material provided by: Jennifer M. Schopf, Borja.
The Anatomy of the Grid Introduction The Nature of Grid Architecture Grid Architecture Description Grid Architecture in Practice Relationships with Other.
Shannon Hastings Multiscale Computing Laboratory Department of Biomedical Informatics.
Introduce Grid Service Authoring Toolkit Shannon Hastings, Scott Oster, Stephen Langella, David Ervin Ohio State University Software Research Institute.
OGSA Hauptseminar: Data Grid Thema 2: Open Grid Service Architecture
Grid Services I - Concepts
Introduction to Globus Toolkit 4 at LA Grid CIS 6612 – Autonomic Grid Computing Summer 2006 PresentersFernando FarfánMayelin Felipe AgnosticsDiego LópezRamakrishna.
Web Service Resource Framework WSMO Presentation Jos de Bruijn Digital Enterprise Research Institute http ://
7-1.1 Grid Computing Infrastructure Software, © 2010 B. Wilkinson/Clayton Ferner. Spring 2010 Grid computing course. slides7-1.ppt Modification date: Feb.
Transaction Processing CS409 Application Services Even Semester 2007.
How to Write a Grid Service  The grid service will do basic mathematical operations. The math grid service is going to have the following methods:  add:
On Using BPEL Extensibility to Implement OGSI and WSRF Grid Workflows Aleksander Slomiski Presented by Onyeka Ezenwoye CIS Advanced Topics in Software.
GT3 Tutorial Chapter 3 and Chapter 4 Lecture for Cluster and Grid Computing, CSCE 490/590 Fall 2004, University of Arkansas, Dr. Amy Apon
Steve Graham WS-ResourceFramework Modeling Stateful Resources With Web services OASIS WSRF TC F2F Wednesday, April 28th, 2004.
Policy-Based Dynamic Negotiation for Grid Services Authorization Ionut Constandache, Daniel Olmedilla, Wolfgang Nejdl Semantic Web Policy Workshop, ISWC’05.
Office of Science U.S. Department of Energy Globus World Python WS Core Joshua R. Boverhof Lawrence Berkeley National Laboratory.
© 2004 IBM Corporation WS-ResourceFramework Service Groups Tom Maguire.
GT3 Index Services Lecture for Cluster and Grid Computing, CSCE 490/590 Fall 2004, University of Arkansas, Dr. Amy Apon.
Copyright © 2004, Keith D Swenson, All Rights Reserved. OASIS Asynchronous Service Access Protocol (ASAP) Tutorial Overview, OASIS ASAP TC May 4, 2004.
10 th Lecture COP 4991 Component-Based Software Development Instructor: Masoud Sadjadi
DataGrid is a project funded by the European Commission EDG Conference, Heidelberg, Sep 26 – Oct under contract IST OGSI and GT3 Initial.
This product includes material developed by the Globus Project ( Exercise 8 Transience: Create and Destroy FileShares.
DEVELOPING WEB SERVICES WITH JAVA DESIGN WEB SERVICE ENDPOINT.
Net-centric Computing Web Services. Lecture Outline  What is Web Service  Web Service Architecture  Creating and using Java Web Services  Apache Axis.
© 2005 Global Grid Forum The information contained herein is subject to change without notice Leading the pervasive adoption of grid computing for research.
November, 2006 Developing Service using GT4 Writing Your First Stateful Web Service in 5 Simple Steps Adam Belloum.
WS-Resource Framework University of Amsterdam
T Network Application Frameworks and XML Web Services and WSDL Sasu Tarkoma Based on slides by Pekka Nikander.
Web Service Resource Framework Creating Globus 4 services
Additional Features of WSRF/GT4 Services
Presentation transcript:

4c1 GT 4 grid services and their implementation Advanced features: An overview Topics: Resource home Singleton resource Multiple resources Notifications Lifecycles ITCS 4146/5146, UNC-Charlotte, B. Wilkinson, 2007 Feb. 22, 2007

4c2 Stateful GT 4 Grid Services Review “Pure” Web services are stateless. Stateful web services required for grid computing. Obtained in WSRF by having a web service front-end to a stateful “resource.”

4c3 Web Service Resource Resource properties Client Web Service Resource Framework (WSRF) Holds information retained between accesses.

4c4 GT 4 services Key aspect is the separation of the (web) service and a resource – conceptually if not actually. Provides the ability to have “state” without altering the statelessness of a web service.

4c5 Assignment 4 In Assignment 4, both service code and resource code held in a single file. End Point Reference (EPR) actually is only the URL of the service. Not necessary to have resource identification (key) Having one file not the preferred way except for simple service examples.

4c6 Resource Home Resources are managed by “Resource Homes” Provides resource management functions –for adding resources –for removing resources Although hidden in Assignment 4 where resource and service were in one file, a Resource Home did exist.

4c7 Resource Home Client Web Service Resource home Resource Manages Methods operate on resources properties create/ find resource Client only interacts with stateless web service

4c8 Service and resource code Client Web Service Resource home Resource Manages add() and subtract() methods operate on resource properties create/ find resource void add(int a) void subtract (int a) int value String lastOP

4c9 Resource Home Client Web Service Resource home Resource Previously, service and resource in one file and resource limited to one resource using a globus supplied resource home called ServiceResourceHome

4c10 Service and resource code Client Web Service Resource home “ServiceResourceHome” Resource add() and subtract() methods operate on resource properties create/ find resource void add(int a) void subtract (int a) int value String lastOP ServiceResourceHome returns service object

4c11 Separately service, resource and resource home files Singleton Resources (Single resource)

4c12 Resource Home Client Web Service Resource home Resource Three files: the service, the resource home, and the resource.

4c13 Acknowledgement The following applies to the code in the next five slides: /* * This file is licensed under the terms of the Globus Toolkit Public License v3, found at * * This notice must appear in redistributions of this file, with or without modification. */ You will be able to find the files in your assignment 4 software installation at: $EXAMPLES_DIR/org/globus/examples/servives/core/singleton /imp/

4c14 package org.globus.examples.services.core.singleton.impl; import org.globus.wsrf.Resource; import org.globus.wsrf.impl.SingletonResourceHome; public class MathResourceHome extends SingletonResourceHome { public Resource findSingleton() { try { // Create a resource and initialize it. MathResource mathResource = new MathResource(); mathResource.initialize(); return mathResource; } catch (Exception e) { return null; } Singleton Resource home code MathResourceHome.java Implemented by extending SingletonResourceHome class.

4c15 /* public class MathService { /* Private method that gets a reference to the resource specified in the * endpoint reference. */ private MathResource getResource() throws RemoteException { Object resource = null; try { resource = ResourceContext.getResourceContext().getResource(); } catch (NoSuchResourceException e) { throw new RemoteException("Specified resource does not exist", e); } catch (ResourceContextException e) { throw new RemoteException("Error during resource lookup", e); } catch (Exception e) { throw new RemoteException("", e); } MathResource mathResource = (MathResource) resource; return mathResource; } MathService code MathService.java

4c16 /* /* Implementation of add, subtract, and getValue operations */ public AddResponse add(int a) throws RemoteException { MathResource mathResource = getResource(); mathResource.setValue(mathResource.getValue() + a); mathResource.setLastOp("ADDITION"); return new AddResponse(); } public SubtractResponse subtract(int a) throws RemoteException { MathResource mathResource = getResource(); mathResource.setValue(mathResource.getValue() - a); mathResource.setLastOp("SUBTRACTION"); return new SubtractResponse(); } public int getValueRP(GetValueRP params) throws RemoteException { MathResource mathResource = getResource(); return mathResource.getValue(); }

4c17 public class MathResource implements Resource, ResourceProperties { /* Resource Property set */ private ResourcePropertySet propSet; /* Resource properties */ private int value; private String lastOp; /* Initializes RPs */ public void initialize() throws Exception { this.propSet = new SimpleResourcePropertySet( MathConstants.RESOURCE_PROPERTIES); ResourceProperty valueRP = new ReflectionResourceProperty( MathConstants.RP_VALUE, "Value", this); this.propSet.add(valueRP); setValue(0); ResourceProperty lastOpRP = new ReflectionResourceProperty( MathConstants.RP_LASTOP, "LastOp", this); this.propSet.add(lastOpRP); setLastOp("NONE"); } Resource code MathResource.java

4c18 /* Get/Setters for the RPs */ public int getValue() { return value; } public synchronized void setValue(int value) { this.value = value; } public String getLastOp() { return lastOp; } public synchronized void setLastOp(String lastOp) { this.lastOp = lastOp; } /* Required by interface ResourceProperties */ public ResourcePropertySet getResourcePropertySet() { return this.propSet; }

4c19 Multiple Resources Suppose there are multiple resources that a service might interact with: Client Web Service Resources

4c20 Creating Resources WS-Resource Factory Pattern A traditional object-oriented approach to creating resources is to use a “factory” service: The factory service is responsible for creating instances of objects. Each resource will be assigned a unique “key”, which together with the service URI identifies the WS-resource pair. (Endpoint Reference)

4c21 Client “Instance” Service Resources WS-Resource Factory Pattern Factory service Request resource creation Request operation on resource Create Perform operation Returns WS- Resource EPR

4c22 Relationship with Resource Home Client Service instance Resource Home Resource Manages Methods operate on resources properties Find resource Factory Service Request resource creation Use Resource Home to create resource Request operation

4c23 Factory service Create Resource operation endpointReference createResource() Returns an EPR to the newly created WS- Resource. “Fully qualified” EPR to include URI of service and key of resource Client needs to know location of factory service.

4c24 WS-Addressing Terms Endpoint – the destination where the web service can be accessed. Endpoint reference, EPR –describes the destination, and includes the destination location as URI, but can have other parameters

4c25 Endpoint reference, EPR Like all WS-* specs, defined in terms of XML. Defined as complex type. Can contain: Address (a URI) (required) Reference Properties Reference Parameters Port type Service name Policy elements Corresponds to portType and service of WSDL document

4c26 Minimum is simply service address, using tag:

4c27 Reference Properties Used to identify resource properties in EPR: 28

4c28 Another example file containing Endpoint Reference <StickyNoteEndpoint xsi:type="ns1:EndpointReferenceType" xmlns:xsi=" xmlns:ns1=" <ns1:Address xsi:type="ns1:AttributedURI"> services/ StickyNoteService Resource “key”

4c29 SOAP message WS-Addressing requires that contents of: and must appear in SOAP’s header:

4c30 Index Service GT 4 provided with an index service that can maintain a list of available services. Index service acts as local service registry.

4c31 Container Index service Multiple services/Resources (with resource properties)

4c32 Querying Index Service wsrf-query Browse index service with the GT4 wsrf-query command: $GLOBUS_LOCATION/bin/wsrf-query -s '/*' which will list the services in an XML format.

4c33 “Community” Index Service A remote index service is used, which holds all the services of the “virtual organization.” Last year we located a community index service at: services/DefaultIndexService

4c34 Local Index service Resources Community index service beowulf.bear.uncw.edu:8080 /wsrf/services/ DefaultIndexService Service client

4c35 Implementation Configure local index to register with community index service. All local information, including service resource properties, copied to community index service.

4c36 Querying Community Index Service Have Community Index Service running. Use wsrf-query command: $GLOBUS_LOCATION/bin/wsrf-query -s services/DefaultIndexService '/*' Should see contents of all local index services.

4c37 Local Index service Resources Service client Local Index service Resources Service client Student 1 Index entry Student 2 Index entry Student 1 container Only container and GT 4 core needed at each site to handle services. Student 2 container Community index service

4c38 Notifications Notifying clients when something interesting happens. Example might be when a resource property reaches a certain value Could be found out by polling resource but that would be very inefficient. WS-notification provides mechanisms.

4c39 Notifications Notifications, generally, are a means by which a client can be informed of changes that have occurred such as: –Changes to resource property values. –Methods added –Methods removed –Resources destroyed

4c40 Clients Service “watch” service Service resource property Notification that property changed

4c41 Need the client to “subscribe” to receive notifications. Subscriptions are for a particular topic.

4c42 Implementation Add subscribe operation to wsdl file. Add SubscribeProvider to wsdd file. Modify.java Modify post-deploy.xml file

4c43 Lifecycle Management GT4 provides mechanisms to specify when a resource is destroyed: Immediately by invoking destroy operation Scheduled some time in the future –leased-based lifecycle management Lease periodically renewed otherwise resource destroyed within a specified time. Lifecycle mechanisms available in WSRF.

4c44 Lease-based Lifetime In lease-based model, resources must be kept alive by interested parties, otherwise resource dies. Set a lifetime for a service after which the service is destroyed. Clean up without having to use a destroy operation explicitly.

4c45 Termination Time Termination time exposed as a resource property. Can be set with GT4 wsrf-set-termination-time command. Example $GLOBUS_LOCATION/bin/wsrf-set-termination- time -e note epr 100 File containing EPR of resource Termination time in seconds

4c46 Resource Discovery Local and community index services can be searched for information Since Resources properties are XML, can use “XPath” queries for searching and retrieval. Uses a “XPath” query (apparently embedded in a script called search-note in this exercise)

4c47 XML Path Language (XPath) W3C recommendation, 1999 A query language for search XML documents. Queries formed by identifying a route to the desired data. For details:

4c48 More Information GGF: GT4 services: GT4 tutorial by Foster:

4c49 Book Globus Toolkit 4 Programming Java Services Borja Sotomayor and Lisa Childer Morgan Kaufmann, 2006.