Building Services in WSRF Ben Clifford GGF Summer School July 2004.

Slides:



Advertisements
Similar presentations
General introduction to Web services and an implementation example
Advertisements

State and Events for Web Services: A comparison of Five WS-Resource Framework and WS-Notification Implementations Marty Humphrey, Glenn Wasson, JarekGawor,
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.
1 CENTER FOR PARALLEL COMPUTERS An Introduction to Globus Toolkit® 3 -Developing Interoperable Grid services.
WS-Resource Framework Adam Belloum Computer Architecture & Parallel Systems group University of Amsterdam
7-2.1 Additional Features of WSRF/GT4 Services A brief outline © 2011 B. Wilkinson/Clayton Ferner. Fall 2011 Grid computing course. Modification date:
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.
Grid Computing, B. Wilkinson, 20043a.1 WEB SERVICES Introduction.
Building services in WSRF Ben Clifford Draft For GGF summer school, July 2004.
4c1 GT 4 grid services and their implementation Advanced features: An overview Topics: Resource home Singleton resource Multiple resources Notifications.
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.
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,
Grid Computing Grid computing is all about achieving greater performance and throughput by pooling resources on a local, national, or international level.
WEB SERVICES ADDRESSING, RESOURCES, NOTIFICATION, EVENTING Chirita Stefan, Michaël Waumans INFO-H-511.
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.
Introducing Axis2 Eran Chinthaka. Agenda  Introduction and Motivation  The “big picture”  Key Features of Axis2 High Performance XML Processing Model.
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
Presentation: SOAP in a distributed object framework, Application Servers & AXIS SOAP.
COP 4991 Component Based Software Development Lecture #4 Java Web Services Onyeka Ezenwoye.
USC Viterbi School of Engineering Web and Grid Services Slides taken from a variety of sources: GT4 tutorial, by Borja Sotomayor
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.
Information breakout. Things what we did What is the difference between a registry and a catalog? What do we mean by naming? What does OGSA define? Using.
Grid Services Grid Enablement of Scientific Applications Present by Mark Joselli Professor S. Masoud Sadjadi.
COMP3019 Coursework: Introduction to GridSAM Steve Crouch School of Electronics and Computer Science.
Presentation: SOAP/WS in a distributed object framework, Application Servers & AXIS SOAP.
Application code Registry 1 Alignment of R-GMA with developments in the Open Grid Services Architecture (OGSA) is advancing. The existing Servlets and.
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.
Presentation: SOAP/WS in a distributed object framework, Application Servers & AXIS SOAP.
The Globus Toolkit 4 (GT4) A brief introduction. Web Services, WSRF, OGSA and GT4.
OGSA Hauptseminar: Data Grid Thema 2: Open Grid Service Architecture
Wrapping Scientific Applications As Web Services Using The Opal Toolkit Wrapping Scientific Applications As Web Services Using The Opal Toolkit Sriram.
Grid Services I - Concepts
Grid Security: Authentication Most Grids rely on a Public Key Infrastructure system for issuing credentials. Users are issued long term public and private.
Mike Jackson EPCC OGSA-DAI Architecture + Extensibility OGSA-DAI Tutorial GGF17, Tokyo.
Reliable File Transfer: Lessons Learned Bill Allcock, ANL Ravi Madduri, ANL.
Web Service Resource Framework WSMO Presentation Jos de Bruijn Digital Enterprise Research Institute http ://
This product includes material developed by the Globus Project ( Excercise 3 Inspection: Add Service Data.
Transaction Processing CS409 Application Services Even Semester 2007.
On Using BPEL Extensibility to Implement OGSI and WSRF Grid Workflows Aleksander Slomiski Presented by Onyeka Ezenwoye CIS Advanced Topics in Software.
1 G52IWS: Example Web-services Chris Greenhalgh. 2 Contents Software requirements AXIS web service run-time components Getting started with Jetty & AXIS.
Intro to Web Services Dr. John P. Abraham UTPA. What are Web Services? Applications execute across multiple computers on a network.  The machine on which.
Data Manipulation with Globus Toolkit Ivan Ivanovski TU München,
Steve Graham WS-ResourceFramework Modeling Stateful Resources With Web services OASIS WSRF TC F2F Wednesday, April 28th, 2004.
INFSO-RI Enabling Grids for E-sciencE Web Services Mike Mineter National e-Science Centre, Edinburgh.
Manchester Computing Supercomputing, Visualization & e-Science Mark Mc Keown WSRF::Lite developer Formerly UK Grid Support Center
© 2004 IBM Corporation WS-ResourceFramework Service Groups Tom Maguire.
Lecture VI: SOAP-based Web Service CS 4593 Cloud-Oriented Big Data and Software Engineering.
Web Service Definition Language. Web Services: WSDL2 Web Service Definition Language ( WSDL ) What is a web service? [ F. Leymann 2003 ] A piece of code.
WP3 Implementing R-GMA grid services in GT3 Abdeslem Djaoui & WP3 Grid Services Task Force 7 th EU Datagrid meeting 26/09/2003
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 1 Deployment: Stand Up a FileShare Service.
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.
WS-Resource Framework University of Amsterdam
OGSA Profiles Interoperability Testing
z/Ware 2.0 Technical Overview
T Network Application Frameworks and XML Web Services and WSDL Sasu Tarkoma Based on slides by Pekka Nikander.
Writing simple Java Web Services using Eclipse
Additional Features of WSRF/GT4 Services
Presentation transcript:

Building Services in WSRF Ben Clifford GGF Summer School July 2004

TODOs l This should be a hidden slide l Modify RP exercise to use Query not GMRP l Interop slide l 2 hours exercise = 60 slides = 15 slides per module

Module 1 l Overview l WSRF l Globus Alliance WSRF implementation

Overview l 4 modules l Each module has: u Slides & talk u Hands on l Covers: u WSRF specification u Globus Alliance implementation of WSRF

History and Motivation (1) l Often we think we want standard APIs u Eg. MPI l But on the grid, we actually want standard wire protocols u the API can be different on each system

History and Motivation (2) l Open Grid Services Infrastructure (OGSI) l GGF standard l Identified a number of common ‘building blocks’ used in grid protocols u Inspecting state, creating and removing state, detecting changes in state, naming state l Defined standard ways to do these things, based on web services (defined a thing called a Grid Service)

History and Motivation (3) l But then… l Realised that this was useful for web services in general, not just for the grid. l Moved out of GGF, into OASIS l Split the single OGSI specification into a number of other specifications called WSRF.

WSRF WSRF is a framework consisting of a number of specifications. l WS-Resource Properties * l WS-Resource Lifetime * l WS-Service Groups l WS-Notification l WS-BaseFaults l WS-Renewable References (unpublished) Other WS specifications such as: l WS-Addressing * * will be talked about in this tutorial

How WS-RF fits in with other standards, specifications and protocols. Internet protocols Web services WSRF Grid stuff Globus (GRAM, MDS) WSDL, SOAP HTTP, TCP/IP

WS-Resources l Web services often provide access to state u Job submissions, databases l A WS-Resource is standard way of representing that state. l In this tutorial, we will be using ‘counter’ resources which are simple accumulators.

WS-Resources l WSRF specifications provide: u XML-based Resource Properties u Lifetime management (creation/destruction) of resources u Servicegroups, which group together WS- Resources u Notification l (for example of changes in resource properties) u Faults u Renewable References

Examples of WS-Resources l Files on a file server l Rows in a database l Jobs in a job submission system l Accounts in a bank

Web service

Web service with WS-Resource

Web Service with WS-Resources

WS-Resources

GT WSRF core l Container u Hosts services u Built on top of Apache Axis l Clients u Interact with services l Build tools u For writing new services u Based around Apache Ant

Files used in the exercise l WSDL and XML Schema: u counter_port_type.wsdl l Java u Several Java source files l Deployment information u deploy-server.wsdd u deploy-jndi-config.xml l Build.xml u Tells Ant how to build and deploy the code

Notes on the exercises l Read notes.txt for information on each exercise. l Only do one exercise at a time, then wait for next module. l Each exercise consists of uncommenting code fragments. However, you should READ AND UNDERSTAND what you are uncommenting. l If you are brave, you can make your own extra changes too – but be careful not to break anything!

Exercise 1 l Exercise: stand up supplied installation and check it works. l Install software l Start the container  this will have a counter service and one counter resource. l Interact with the counter resource l Do the exercise now.

C Exercise 1 overview One host (your own machine) One web service running on own machine One counter resource, which will already exist Client running on own machine Counter service One counter resource Container Client

C Exercise 1 overview Counter service One counter resource Container globus-start-container Starts up container, with counter service and a single counter resource.

C Exercise 1 overview Counter service One counter resource Container Client show-counter and increment-counter clients interact with the resource through the web service.

C Exercise 1 overview Client increment-counter invokes the add operation in counter_port_type.wsdl add(1)

Module 2 – Resource Addressing l Endpoint References

Why? l Need some way to refer to web services and WS-Resources from anywhere on the network.

Endpoint References l WS-Addressing specification l An Endpoint Reference (EPR) points to a web service by including a URL.

Endpoint References l WS-Addressing specification l An Endpoint Reference (EPR) points to a web service by including a URL. <EPR xsi:type="ns2:EndpointReferenceType" xmlns:xsi=" xmlns:ns2="

Endpoint References l WS-Addressing specification l An Endpoint Reference (EPR) points to a web service by including a URL. l EPRs can also contain extra information l For WSRF, can include ReferenceProperties that identify a resource – will see this later on.

Endpoint References l WS-Addressing specification l An Endpoint Reference (EPR) points to a web service by including a URL. l EPRs can also contain extra information l For WSRF, can include ReferenceProperties that identify a resource – will see this later on. l Can also contain other information u Security u Renewable Refence information

Client code fragment CounterServiceAddressingLocator locator = new CounterServiceAddressingLocator(); EndpointReferenceType endpoint; endpoint = EPRUtils.loadEPR(args); CounterPortType counterPort = locator.getCounterPortTypePort(endpoint); counterPort.add(1);

Automatically Generated types CounterServiceAddressingLocator locator = new CounterServiceAddressingLocator(); EndpointReferenceType endpoint; endpoint = EPRUtils.loadEPR(args); CounterPortType counterPort = locator.getCounterPortTypePort(endpoint); counterPort.add(1); Highlighted types are generated by the build system automatically, based on XSD and WSDL.

*AddressingLocator l Every WSDL service has a corresponding AddressingLocator Java class automatically generated. l For the CounterService, we get: u CounterServiceAddressingLocator l An AddressingLocator knows how to take an EPR and return a java stub for the remote service: u CounterPortType counterPort = locator.getCounterPortTypePort(endpoint);

*PortType l Every port type has a PortType Java interface automatically generated. l For the counter port type, we have u CounterPortType l The interface has a method for each operation on the port type: u counterPort.add(1);

Exercise 2 l Talk to someone else’s service on a different laptop l Modify clients to read an EPR file l Should be able to run the clients against any machine in the room. l Do the exercise now.

Exercise 2 scenario Two hosts (your own machine and your friend’s machine) One web service running on friend’s machine One counter resource on friend’s machine Client running on your own machine

Exercise 2 scenario Client can talk to everyone’s servers – so the situation in this room looks more like this.

Module 3 – Resource Properties l Resources have Resource Properties l Defined in XML l Resource Properties document in portType l Querying Resource Properties

Why? l Resources represent state l Often we want to inspect that state l In this tutorial, we want to know the value stored in each counter u show-counter client

XML based l Each resource has a Resource Properties document. l Defined in XML schema l Each element in the Resource Properties document is a Resource Property (RP).

Ways to access RPs l Pull u Client can query the RP document l GetResourceProperty l GetMultipleResourceProperties l QueryResourceProperties l Push u Allows services to send changes in their resources’ RPs to interested parties. l WS-Notification l Not covered in this tutorial

Pull operations l GetResourceProperty u Requests a single resource property by name l GetMultipleResourceProperties u Requests several resource properties (from the same resource) by name l QueryResourceProperties u More advanced queries against RP document. u eg. XPath

Counter example The counter service’s Resource Property Document is defined in schema/core/samples/counter/counter_port_type.wsdl l <xsd:element ref="tns:Value" minOccurs="1" maxOccurs="1"/>

Operation Providers l WSRF Core allows operations to be implemented by Operation Providers. l Service writers can include these in WSDD, rather than writing Java code. l Exercise will involve adding operation provider to support QueryResourceProperties operation

Exercise 3 l Exercise: add a resource property to the service to give ‘last incremented time’. New client to query this RP. l Query own counters and query other peoples’ counters. l Do the exercise now.

Module 4 – Resource Lifetime l Creating new resources l Destroying old resources l Soft-state lifetime management

Why? l Resources come and go l For example: u jobs in a batch submission system could be represented as resources u submitting a new job causes a new resource to be created u when the job is completed, the resource goes away

Creating new resources l Factory pattern l A web service operation causes a new resource to come into existence. l For example, in job submission: u submit(JobDescription)

Destroying resources l Two ways: u Immediate Destruction u Scheduled Destruction

Immediate destruction l Destroy the resource now! Destroy operation

Scheduled Destruction l Scheduled destruction allows soft management of state. TerminationTime RP Keep state alive for as long as we need it, by calling SetTerminationTime operation periodically.

Scheduled Destruction l Remote service is ‘self-cleaning’ u old unwanted state gets cleaned up automatically if no-one keeps it alive l Problem: if interested party is disconnected from network for a long time, then it cannot extend lifetime and state may be cleaned up prematurely.

EPRs with ReferenceProperties l If there are several counters accessible through a service, we need some way to tell them apart when making calls. l Add ReferenceProperties to EPR with a key that identifies counter.

EPRs with ReferenceProperties <EPR xsi:type="ns2:EndpointReferenceType" xmlns:xsi=" xmlns:ns2=" l Note that the CounterKey field is meaningless to everyone apart from the service.

EPRs with ReferenceProperties <EPR xsi:type="ns2:EndpointReferenceType" xmlns:xsi=" xmlns:ns2=" l Note that the CounterKey field is meaningless to everyone apart from the service.

EPRs with ReferenceProperties <EPR xsi:type="ns2:EndpointReferenceType" xmlns:xsi=" xmlns:ns2=" l Note that the CounterKey field is meaningless to everyone apart from the service.

Resource Homes l Resource Homes map from key in EPR to a resource object l So far, CounterService has used SingletonResorceHome. u Always returns the same single resource u So CounterService only provides access to one resource u No key needed in EPR l Will now use ResourceHomeImpl u Allows creation of new resource objects u Maps from key in EPR to resource objects u Counter service will provide access to many resource objects

Exercise 4 l Exercise: create new counters. Destroy old counters. l Two new clients: u create-counter u destroy-counter

Exercise 4 scenario Created new counters Destroyed existing counters

The rest of WSRF l WS-Resource Properties l WS-Resource Lifetime l WS-Servicegroups l WS-BaseFaults l WS-Renewable References l WS-Notification

WS-ServiceGroups l Form groups of services and/or resources l Represent those groups as Resources. l Registries etc

WS-BaseFaults l Standard datatype for transmitting webservice faults u Originator u Timestamp u Etc…

WS-Renewable References l EPRs can become stale u Service might move to a different host l Renewable References provide a way to take a stale reference and try to a fresh one.

WS-Notification l A group of 3 standards l Deliver notifications of events l For example, change in value of a resource property l Started as one WSRF standard, but split off into three separate standards.

Fin