How to Build a Grid Service Using GT3 Globus Alliance Staff Charles Bacon, Lisa Childers, Jarek Gawor, Joe Insley, Ravi Madduri, Argonne National Laboratory.

Slides:



Advertisements
Similar presentations
Web Service Architecture
Advertisements

Web Service Ahmed Gamal Ahmed Nile University Bioinformatics Group
General introduction to Web services and an implementation example
Web Services Darshan R. Kapadia Gregor von Laszewski 1http://grid.rit.edu.
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.
1 Introduction to XML. XML eXtensible implies that users define tag content Markup implies it is a coded document Language implies it is a metalanguage.
Presentation 7 part 2: SOAP & WSDL. Ingeniørhøjskolen i Århus Slide 2 Outline Building blocks in Web Services SOA SOAP WSDL (UDDI)
6/11/2015Page 1 Web Services-based Distributed System B. Ramamurthy.
4d.1 Grid Computing, B. Wilkinson, 2005 Web Service Resource Framework Notes on “sticky note” assignment.
Grid Computing, B. Wilkinson, 20043a.1 WEB SERVICES Introduction.
Building services in WSRF Ben Clifford Draft For GGF summer school, July 2004.
Globus OGSI Grid Service. Grid Computing Definition The Grid: Blueprint for a New Computing Infrastructure –A computational grid is a hardware and software.
OGSA : Open Grid Services Architecture Ramya Rajagopalan
Web Services Michael Smith Alex Feldman. What is a Web Service? A Web service is a message-oriented software system designed to support inter-operable.
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.
James Holladay, Mario Sweeney, Vu Tran. Web Services Presentation Web Services Theory James Holladay Tools – Visual Studio Vu Tran Tools – Net Beans Mario.
GT Components. Globus Toolkit A “toolkit” of services and packages for creating the basic grid computing infrastructure Higher level tools added to this.
Web Server Administration Web Services XML SOAP. Overview What are web services and what do they do? What is XML? What is SOAP? How are they all connected?
1 Schema Registries Steven Hughes, Lou Reich, Dan Crichton NASA 21 October 2015.
This product includes material developed by the Globus Project ( Exercise 6 Discovery: Find a File.
Web Services Based on SOA: Concepts, Technology, Design by Thomas Erl MIS 181.9: Service Oriented Architecture 2 nd Semester,
Web Services Standards. Introduction A web service is a type of component that is available on the web and can be incorporated in applications or used.
XML Web Services Architecture Siddharth Ruchandani CS 6362 – SW Architecture & Design Summer /11/05.
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
Distribution and components. 2 What is the problem? Enterprise computing is Large scale & complex: It supports large scale and complex organisations Spanning.
Performance Measurement Points Sockets, plain text and grid services Paul Mealor.
XML and Web Services (II/2546)
Transition and Evolution Moving to Grid Services.
Prof S.Ramachandram Dept of CSE,UCE Osmania University
Kemal Baykal Rasim Ismayilov
1 Service Creation, Advertisement and Discovery Including caCORE SDK and ISO21090 William Stephens Operations Manager caGrid Knowledge Center February.
1 Registry Services Overview J. Steven Hughes (Deputy Chair) Principal Computer Scientist NASA/JPL 17 December 2015.
This product includes material developed by the Globus Project ( Excercise 3 Inspection: Add Service Data.
Slide 1 Service-centric Software Engineering. Slide 2 Objectives To explain the notion of a reusable service, based on web service standards, that provides.
On Using BPEL Extensibility to Implement OGSI and WSRF Grid Workflows Aleksander Slomiski Presented by Onyeka Ezenwoye CIS Advanced Topics in Software.
Web Services An Introduction Copyright © Curt Hill.
GT3 Tutorial Chapter 3 and Chapter 4 Lecture for Cluster and Grid Computing, CSCE 490/590 Fall 2004, University of Arkansas, Dr. Amy Apon
1 Service oriented computing Gergely Sipos, Péter Kacsuk
GT3 Architecture and Functionality. Core OGSI Implementation Security Services System-Level Services Container Hosting Environment Base Services Resource.
OGSA. Introduction Built next generation of service Based on web service technology 3 main areas: – Manage creation, destruction & lifecycle management.
© 2004 IBM Corporation WS-ResourceFramework Service Groups Tom Maguire.
Lecture VI: SOAP-based Web Service CS 4593 Cloud-Oriented Big Data and Software Engineering.
1 G52IWS: Web Services Description Language (WSDL) Chris Greenhalgh
GT3 Index Services Lecture for Cluster and Grid Computing, CSCE 490/590 Fall 2004, University of Arkansas, Dr. Amy Apon.
This product includes material developed by the Globus Project ( Exercise 5 Lifetime Management: Maintain service.
Copyright © 2004, Keith D Swenson, All Rights Reserved. OASIS Asynchronous Service Access Protocol (ASAP) Tutorial Overview, OASIS ASAP TC May 4, 2004.
WP3 Implementing R-GMA grid services in GT3 Abdeslem Djaoui & WP3 Grid Services Task Force 7 th EU Datagrid meeting 26/09/2003
Copyright 2007, Information Builders. Slide 1 iWay Web Services and WebFOCUS Consumption Michael Florkowski Information Builders.
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.
SE 548 Process Modelling WEB SERVICE ORCHESTRATION AND COMPOSITION ÖZLEM BİLGİÇ.
A service Oriented Architecture & Web Service Technology.
This product includes material developed by the Globus Project ( WSDL Extensions Grid Service Description Language.
Sabri Kızanlık Ural Emekçi
T Network Application Frameworks and XML Web Services and WSDL Sasu Tarkoma Based on slides by Pekka Nikander.
Service-centric Software Engineering
Introduction to Web Services
The Anatomy and The Physiology of the Grid
The Anatomy and The Physiology of the Grid
Presentation transcript:

How to Build a Grid Service Using GT3 Globus Alliance Staff Charles Bacon, Lisa Childers, Jarek Gawor, Joe Insley, Ravi Madduri, Argonne National Laboratory Ben Clifford, USC/Information Sciences Institute Copyright (C) 2003 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 for the full text of this license.

January 2004Build a Grid Service Using GT32 How to Build a Grid Service Using GT3 l Overview of Grid Services and GT3 l Build a Grid Service –Overview –1. Deployment: Stand Up a FileShare Service –2. Naming: Share Files using Identifiers –3. Inspection: Add Service Data –4. Virtual Organization: Register with a Community Index –5. Lifetime Management: Maintain service registration –6. Discovery: Find a File –7. GT3 Security: Share Files Securely Time permitting: –8. Transience: Create and Destroy FileShares l Publish your Grid Service: The GTR

January 2004Build a Grid Service Using GT33 Web Services l What are Web Services? –Another distributed computing technology (like CORBA, RMI, EJBs) –Another client/server middleware –Not really much to do with hypertext documents, despite the “Web” name ServerClient request: add(5,5) response: 10

January 2004Build a Grid Service Using GT34 Web Services (II) l More importantly, Web Services provide a separation of the interface from the implementation l Interface definition is language and platform neutral Interface Implementation Runtime Engine

January 2004Build a Grid Service Using GT35 Web Services (III) l Permits Service-Oriented Architecture (SOA) –Architect your application as a composition of loosely-coupled independent services –“Loosely coupled”: A change in implementation of one service will not affect the other services –Using a common interface description language simplifies indexing and discovery problems

January 2004Build a Grid Service Using GT36 Web Services Architecture l Discovery –UDDI, other registries/indices l Description –Web Services Description Language (WSDL) l Invocation –Simple Object Access Protocol (SOAP) l Transport –HTTP, other transports

January 2004Build a Grid Service Using GT37 Basic Invocation l Discover a service that meets your criteria –Client queries registry l Get service’s WSDL, generate client stubs –Client queries server, receives response l Invoke desired operations via SOAP/HTTP –Invocation l Convert result back to native types from SOAP response

January 2004Build a Grid Service Using GT38 Basic Invocation (II) ImplementationServer Stub WSDL op1(args1) op2(args2) ImplementationClient Stub

January 2004Build a Grid Service Using GT39 Grid Service l A Grid Service is a standard Web Service, plus extensions l The extensions are defined in a community standard called the Open Grid Services Infrastructure (OGSI) l This tutorial is designed to highlight these extensions

January 2004Build a Grid Service Using GT310 Implementation Basics The Five Steps 1.Create the interface 2.Write the implementation 3.Write the deployment descriptor 4.Build the service, creating a GAR 5.Deploy into the runtime environment

January 2004Build a Grid Service Using GT311 The Five Steps 1. Create the Interface The capabilities and behaviors of services are described using WSDL In your design, be mindful of service composability –The capabilities that you expose in the interface will be discoverable by other services

January 2004Build a Grid Service Using GT312 l Web Service Description Language l XML-based language for: –Abstractly describing message exchanges between clients and services >Types defined using XML Schema >Message comprising one or more parts of XML Schema types/elements >Operation = input/output or input only messages >Interface = named group of operations –Binding the interfaces to concrete protocols >E.g. SOAP/http 1. Create the Interface WSDL

January 2004Build a Grid Service Using GT313 l Grid Service interfaces are specified in GWSDL files l GT3 includes tooling to convert GWSDL into WSDL 1.1 l Standard Grid Service operations are obtained by extending the GridService portType 1. Create the Interface GWSDL

January 2004Build a Grid Service Using GT314 The Five Steps 2. Write the Implementation Server –Your service should inherit from the GT3 class GridServiceImpl –Your service must provide an implementation for all of the operations defined in the GWSDL –Methods and data that you wish to keep private should not appear in the GWSDL Client –When you build the service, GT3 will automatically generate a class that clients can use to connect to the service at runtime

January 2004Build a Grid Service Using GT Write the Implementation Operation Providers l GT3 includes support for a delegation-based programming model, in the form of Operation Providers l An operation provider is created by implementing the org.globus.ogsa.OperationProvider interface l Operation providers enable developers to encapsulate functionality so that it can be reused in different services l Can ease the task of bringing legacy code into OGSI-compliance

January 2004Build a Grid Service Using GT316 The Five Steps 3. Write the Deployment Descriptor Grid service runtime configuration is described in a WSDD file The file includes parameters such as –Security configuration for the service –Path to the service’s WSDL file –Base class of the service implementation –Operation providers

January 2004Build a Grid Service Using GT317 The Five Steps 4. Build the Service, Creating a GAR GT3 provides standard build targets that can be used for compiling Grid Services –The build targets take the GWSDL, Java and WSDD files as input –The output of the build process is a portable grid service binary, called a GAR file The GAR file contains information needed to install a service in the runtime environment –Similar to a WAR (used for distributing webservices)

January 2004Build a Grid Service Using GT318 The Five Steps 5. Deploy into the Runtime Environment ant deploy –Dgar.name=myService.gar

January 2004Build a Grid Service Using GT319 How to Build a Grid Service Using GT3 l Overview of Grid Services and GT3 l Build a Grid Service –Overview –1. Deployment: Stand Up a FileShare Service –2. Naming: Share Files using Identifiers –3. Inspection: Add Service Data –4. Virtual Organization: Register with a Community Index –5. Lifetime Management: Maintain service registration –6. Discovery: Find a File –7. GT3 Security: Share Files Securely Time permitting: –8. Transience: Create and Destroy FileShares l Publish your Grid Service: The GTR

January 2004Build a Grid Service Using GT320 Hands-On Tutorial Structure l The hands-on portion of the tutorial is organized as a series of exercises in which students add increasing functionality to a skeletal service implementation l The exercises demonstrate fundamental interactions using Open Grid Services Infrastructure l Each exercise includes: –A discussion of the concepts behind the exercise –Implementation details –Step-by-step instructions –A view of the finished exercise

January 2004Build a Grid Service Using GT321 Supporting Tutorial Materials l Each attendee will use –This slideset –A code bundle, including >A FileShare service implementation with annotations for each exercise –A set of exercise notes –X.509 certificates –Files for sharing l The instructors will use –An index service containing attendee service entries –A visualizer for the index service’s data

January 2004Build a Grid Service Using GT322 How to Build a Grid Service Using GT3 l Overview of Grid Services and GT3 l Build a Grid Service –Overview –1. Deployment: Stand Up a FileShare Service –2. Naming: Share Files using Identifiers –3. Inspection: Add Service Data –4. Virtual Organization: Register with a Community Index –5. Lifetime Management: Maintain service registration –6. Discovery: Find a File –7. GT3 Security: Share Files Securely Time permitting: –8. Transience: Create and Destroy FileShares l Publish your Grid Service: The GTR

January 2004Build a Grid Service Using GT Deployment: Stand up a FileShare service on your laptop Exercise 1: Deployment FileShare

January 2004Build a Grid Service Using GT324 GT3 Container The FileShare Service FileShare getFile File to share Copy of file Client

January 2004Build a Grid Service Using GT325 Fileshare Service Overview l Interface Description –.gwsdl files l Service and Client Implementation –.java files l Build Instructions for Ant –build.xml (like a Makefile) l Deployment Description –.wsdd files

January 2004Build a Grid Service Using GT326 Pieces to Install l GT3 core –Includes the container >globus-start-container – starts container l Fileshare service –Includes the service and client –Automated build/deploy using ant >cleanAll – similar to “make clean” >deployGar – compiles.java, installs into container >undeployGar – uninstalls from container

January 2004Build a Grid Service Using GT327 What Attendees Should Do l Install GT3 core, fileshare service l Start the GT3 container –Will start FileShare service automatically l Run the GetFile client –Get a file (for example, LICENSE)

January 2004Build a Grid Service Using GT328 What Attendees Should See l When GT3 container is started, a list of deployed services l bin/globus-start-container org.globus.ogsa.server.ServiceContainer [run:569] INFO: Starting SOAP server at: With the following persistent services: ore/admin/AdminService [and many more]

January 2004Build a Grid Service Using GT329 What Attendees Should See l After client is run, the file you requested is copied into your current directory java org.globus.ogsa.impl.samples.fileshare.client.getFile LICENSE –Receive file ‘LICENSE’ of size 6615

January 2004Build a Grid Service Using GT330 Exercise 1 Review l $GLOBUS_LOCATION –Place to run globus-start-container l $TUTORIAL_LOCATION –Contains the WSDD file and ant build.xml –src/org/globus/ogsa/impl/samples/fileshare –schema/samples/fileshare/ –src/org/globus/ogsa/impl/samples/fileshare/client l $CLIENT_LOCATION –Location for receiving files

January 2004Build a Grid Service Using GT331 How to Build a Grid Service Using GT3 l Overview of Grid Services and GT3 l Build a Grid Service –Overview –1. Deployment: Stand Up a FileShare Service –2. Naming: Share Files using Identifiers –3. Inspection: Add Service Data –4. Virtual Organization: Register with a Community Index –5. Lifetime Management: Maintain service registration –6. Discovery: Find a File –7. GT3 Security: Share Files Securely Time permitting: –8. Transience: Create and Destroy FileShares l Publish your Grid Service: The GTR

January 2004Build a Grid Service Using GT332 Exercise 2: Service Naming Client FileShare 1. Deployment: Stand up a FileShare service on your laptop 2. Service Naming: Share files using identifiers

January 2004Build a Grid Service Using GT333 Grid Service Naming l Grid Services can be stateful. One implication of this is that one instance is potentially quite different from another –Grid Services must be uniquely identifiable l Grid Service handles are the way in which services (and their associated state) are uniquely identified l In one sense, a grid service handle can be thought of as representing a particular combination of behavior + state

January 2004Build a Grid Service Using GT334 Naming: Grid Service Handles Grid Service Handle FileShare A GSH is a network-wide name for a service A GSH refers to one specific service

January 2004Build a Grid Service Using GT335 Naming: Grid Service Handles Grid Service Handle FileShare Grid Service Handle A GSH is a network-wide name for a service A GSH refers to one specific service More than one GSH can refer to the same service

January 2004Build a Grid Service Using GT336 What Attendees Should Do l Modify the GetFile client to use a GSH l Look at the container output for the GSH of the FileShareService l Use the local service’s GSH explicitly with the client l Exchange GSHs with a neighbor and retrieve from their service

January 2004Build a Grid Service Using GT337 What Attendees Should See l java org.globus.ogsa.impl.samples.fileshare.client.GetFile uniq1 GSH1 –Received uniq1 from yourself l java org.globus.ogsa.impl.samples.fileshare.client.GetFile uniq2 GSH2 –Received uniq2 from your neighbor

January 2004Build a Grid Service Using GT338 Exercise 2 Review FileShareServiceGridLocator locator = new FileShareServiceGridLocator(); FileSharePortType portType = locator.getFileSharePort(new HandleType(this.handle)); FileType file = portType.getFile(this.filename);

January 2004Build a Grid Service Using GT339 How to Build a Grid Service Using GT3 l Overview of Grid Services and GT3 l Build a Grid Service –Overview –1. Deployment: Stand Up a FileShare Service –2. Naming: Share Files using Identifiers –3. Inspection: Add Service Data –4. Virtual Organization: Register with a Community Index –5. Lifetime Management: Maintain service registration –6. Discovery: Find a File –7. GT3 Security: Share Files Securely Time permitting: –8. Transience: Create and Destroy FileShares l Publish your Grid Service: The GTR

January 2004Build a Grid Service Using GT Inspection: Add service data to your service Exercise 3: Inspection Client 1. Deployment: Stand up a FileShare service on your laptop 2. Service Naming: Share files using identifiers FileShare

January 2004Build a Grid Service Using GT341 Service Data l Any Grid Service can expose internal state as Service Data Elements –An XML element of arbitrary complexity l Each service has a set of Service Data Elements

January 2004Build a Grid Service Using GT342 GT3 Container Service Interfaces FileShare Client getFile

January 2004Build a Grid Service Using GT343 Types of Interfaces GridService GridService portType GT3 Container User- Defined portTypes Other standard portTypes

January 2004Build a Grid Service Using GT344 Service data element Service data element GT3 Container Grid Service portType GridService The GridService portType is mandated in OGSI

January 2004Build a Grid Service Using GT345 Service data element Service data element Client GT3 Container Inspection: What port types? What state? Inspection GridService portType findServiceData The Grid Service portType provides standard inspection mechanisms for grid service operations and data; the mechanisms are independent of a specific service implementation GridService

January 2004Build a Grid Service Using GT346 FileList Number Of FileGets FileShare GT3 Container FileShare Service Data

January 2004Build a Grid Service Using GT347 WSDL l Web Service Description Language l XML-based language for: –Abstractly describing message exchanges between clients and services >Types defined using XML Schema >Message comprising one or more parts of XML Schema types/elements >Operation = input/output or input only messages >Interface = named group of operations –Binding the interfaces to concrete protocols >E.g. Soap/http l It says nothing about what messages are sent

January 2004Build a Grid Service Using GT348 GWSDL l OGSI requires interface extension/composition l We worked within W3C WSDL working group to define standard interface extension in WSDL 1.2 that meets OGSI requirements l But could not wait for WSDL 1.2 l So defined gwsdl:portType that extends WSDL 1.1 portType with: –WSDL 1.2 portType extension –WSDL 1.2 open content model l Define GWSDL  WSDL 1.1 & 1.2 mappings

January 2004Build a Grid Service Using GT349 GWSDL (Cont.) l All operations on our service are defined in our GWSDL l We provide a definition of our custom portTypes l We obtain standard Grid Service operations by extending the GridService portType –

January 2004Build a Grid Service Using GT350 SDEs in GWSDL l In addition to operations, SDEs are defined in GWSDL <gwsdl:serviceData name=“SDEName" type="xsd:int" maxOccurs="m" minOccurs="n" mutability=“mutable">

January 2004Build a Grid Service Using GT351 Namespaces l All our operations are defined inside of XML namespaces l l Our SDEs are also defined inside of namespaces. We will need to know those namespaces when we query l For example:

January 2004Build a Grid Service Using GT352 XML Types l Several types are predefined –xsd:int l Also can specify more complex datatypes – l Creating new types is out of scope for this tutorial. The types you need for your SDEs have been defined in the GWSDL

January 2004Build a Grid Service Using GT353 What Attendees should Do l Uncomment serviceData from fileshare_port_type.gwsdl l Uncoment SDE update code in FileShareImpl.java l Verify your work by using handy client: ogsi-find-servicedata-by-name –Use the pre-built client to inspect service data by name –Observe how service data changes over time

January 2004Build a Grid Service Using GT354 What Attendees Should See l Output of ogsi-find-service-data-by-name […] <ns3:NumberOfFileGets […] xsi:type="xsd:int"> 0 […]

January 2004Build a Grid Service Using GT355 Exercise 3 Review l SDEs are defined in GWSDL l You can extend GWSDL to get pre-defined operations, like findServiceData l SDEs use XML types l SDEs are namespace qualified l The GridService portType is mandated by OGSI

January 2004Build a Grid Service Using GT356 File List Number Of FileGets What We’ve Covered So Far FileShare Client GridService portType findServiceData GT3 Container User-Defined portTypes Grid Service Handle Additional standard portTypes Inspection: What port types? What state?

January 2004Build a Grid Service Using GT357 How to Build a Grid Service Using GT3 l Overview of Grid Services and GT3 l Build a Grid Service –Overview –1. Deployment: Stand Up a FileShare Service –2. Naming: Share Files using Identifiers –3. Inspection: Add Service Data –4. Virtual Organization: Register with a Community Index –5. Lifetime Management: Maintain service registration –6. Discovery: Find a File –7. GT3 Security: Share Files Securely Time permitting: –8. Transience: Create and Destroy FileShares l Publish your Grid Service: The GTR

January 2004Build a Grid Service Using GT358 Exercise 4: Virtual Organization Client 1. Deployment: Stand up a FileShare service on your laptop 2. Service Naming: Share files using identifiers 3. Inspection: Add service data to your service 4. Virtual Organization: Register your service with a community index service Tutorial Index FileShare

January 2004Build a Grid Service Using GT359 R R R R R R R R R R R R Virtual Organizations Distributed resources and people

January 2004Build a Grid Service Using GT360 R R R R R R R R R R R R Virtual Organizations Distributed resources and people Linked by networks, crossing administrative domains

January 2004Build a Grid Service Using GT361 R R R R R R R R R R Virtual Organizations R R Distributed resources and people Linked by networks, crossing administrative domains Sharing resources, common goals VO-B VO-A

January 2004Build a Grid Service Using GT362 R R R R R R R R R R Virtual Organizations Distributed resources and people Linked by networks, crossing administrative domains Sharing resources, common goals Dynamic VO-B VO-A R R

January 2004Build a Grid Service Using GT363 R R R R R R R R R R R R VO-A VO-B Virtual Organizations Distributed resources and people Linked by networks, crossing administrative domains Sharing resources, common goals Dynamic Fault tolerant

January 2004Build a Grid Service Using GT364 Tutorial VO RR R R R R R R R I R File Shares Tutorial Index

January 2004Build a Grid Service Using GT365 Service Group l Service Groups represent a collection of services –The OGSI spec defines Service Groups as a generic “bag” of entries –Developers extend the semantics in ways that are meaningful in their problem space l The Tutorial Index is written on top of Service Groups

January 2004Build a Grid Service Using GT366 Service Group Structure ServiceGroup GT3 Container ServiceGroup Registration portType

January 2004Build a Grid Service Using GT367 Service Group Structure ServiceGroup GT3 Container add ServiceGroup Registration portType Service

January 2004Build a Grid Service Using GT368 Service Group Structure ServiceGroup GT3 Container ServiceGroup Entry portType add ServiceGroup Registration portType Service ServiceGroupEntry Member Locator

January 2004Build a Grid Service Using GT369 Service Group Structure ServiceGroup GT3 Container ServiceGroupEntry add ServiceGroup Registration portType ServiceGroupEntry

January 2004Build a Grid Service Using GT370 The Tutorial Index l The Index will be running on one of the instructor’s machines l The Index represents a collection of services –A way for each FileShare to advertise its existence to the VO –A copy of each FileShare’s service data to be cached in a single place

January 2004Build a Grid Service Using GT371 FileShare-Index Interaction FileShare GT3 Container File List Number Of FileGets Tutorial Index In order to add our FileShare as an entry in the index we will add an operation provider called RegistryPublishProvider to the definition of the FileShare service

January 2004Build a Grid Service Using GT372 FileShare-Index Interaction FileShare GT3 Container File List Number Of FileGets Tutorial Index RegistryPublishProvider

January 2004Build a Grid Service Using GT373 FileShare-Index Interaction FileShare GT3 Container File List Number Of FileGets Tutorial Index findServiceData GridService portType Once a FileShare service is a member of the Tutorial Index, the index will retrieve the FileShare’s service data in order to cache a local copy For our purposes, the Tutorial Index will need to keep the copies of FileShare service data current

January 2004Build a Grid Service Using GT374 Subscriptions l NotificationSource portType –an optional OGSI interface l Used by our index to subscribe to the service data of FileShare services l As part of the OGSI notification pattern, the Tutorial Index implements the NotificationSink portType

January 2004Build a Grid Service Using GT375 FileShare-Index Interaction FileShare GT3 Container File List Number Of FileGets Tutorial Index subscribe NotificationSource portType

January 2004Build a Grid Service Using GT376 FileShare-Index Interaction FileShare GT3 Container File List Number Of FileGets Tutorial Index When an SDE of the FileShare Changes, an update will be delivered as a notification deliverNotification

January 2004Build a Grid Service Using GT377 Concepts in Exercise l operationProviders is an entry in the WSDD file l Operation providers add functionality l If the additional functionality includes the addition of a public interface, you need to add an entry to the.gwsdl l If the additional functionality requires runtime parameters, you need to add them to the.wsdd

January 2004Build a Grid Service Using GT378 RegistryPublishProvider l RegistryPublishProvider requires parameters in wsdd file: –registry GSH of the Tutorial Index service group (mandatory) –registry-keepalive set to ‘true’ to keep registration alive (optional) –registry-lifetime time parameter to specify how long the entry should live (optional) –registry-remove ‘true’ if the entry should be removed at shutdown (optional) l Defines no operations, does not need anything to be changed in GWSDL

January 2004Build a Grid Service Using GT379 NotificationSourceProvider l NotificationSourceProvider makes our service data available for subscription –Defines an operation that will be used by the Index service we’re registering to –Therefore, needs to appear in our GWSDL l In the end, our GWSDL will extend both GridService and NotificationSource l Does not require any WSDD parameters

January 2004Build a Grid Service Using GT380 What Attendees Should Do l Uncomment operationProviders and parameters in WSDD l Add NotificationSource portType to GWSDL l Deploy, restart container l Don’t need to modify any service code!

January 2004Build a Grid Service Using GT381 What Attendees Should See A representation of your FileShare inside a representation of the tutorial index Your IP Number of files shared

January 2004Build a Grid Service Using GT382 Exercise 4 Review l operationProviders allow you to add functionality without writing code –We saw this with RegistryPublish and Notification Source l Service Groups contain ServiceGroupEntries representing members of the group l The Tutorial Index uses subscriptions to receive updates

January 2004Build a Grid Service Using GT383 How to Build a Grid Service Using GT3 l Overview of Grid Services and GT3 l Build a Grid Service –Overview –1. Deployment: Stand Up a FileShare Service –2. Naming: Share Files using Identifiers –3. Inspection: Add Service Data –4. Virtual Organization: Register with a Community Index –5. Lifetime Management: Maintain service registration –6. Discovery: Find a File –7. GT3 Security: Share Files Securely Time permitting: –8. Transience: Create and Destroy FileShares l Publish your Grid Service: The GTR

January 2004Build a Grid Service Using GT384 Overview of Tutorial Content Client 1. Deployment: Stand up a FileShare service on your laptop 2. Service Naming: Share files using identifiers 3. Inspection: Add service data to your service 4. Virtual Organization: Register your service with a community index service 5. Lifetime Mgmt: Maintain service registration Tutorial Index FileShare

January 2004Build a Grid Service Using GT385 Soft state l We need a mechanism to clean up old/unwanted state l A service group has an remove operation, but this is not enough. For example, what happens if a service dies without removing itself? l All of our state has a limited lifetime. If a service is still alive and wants to remain registered, it must keep indicating its interest in that state.

January 2004Build a Grid Service Using GT386 Lifetime Management ServiceGroup GT3 Container add ServiceGroup Registration portType (registration provider) FileShare

January 2004Build a Grid Service Using GT387 Lifetime Management ServiceGroupEntry ServiceGroup GT3 Container add ServiceGroup Registration portType Termination Time GridService portType (registration provider) FileShare

January 2004Build a Grid Service Using GT388 Lifetime Management ServiceGroupEntry ServiceGroup GT3 Container FileShare Termination Time GridService portType

January 2004Build a Grid Service Using GT389 Lifetime Management ServiceGroupEntry ServiceGroup GT3 Container requestTerminationAfter (registration provider) FileShare GridService portType Termination Time

January 2004Build a Grid Service Using GT390 Lifetime Management ServiceGroupEntry ServiceGroup GT3 Container requestTerminationAfter GridService portType Example of soft-state lifetime management: The ServiceGroupEntry goes away if the FileShare service disappears Termination Time (registration provider) FileShare

January 2004Build a Grid Service Using GT391 SDE Attributes l SDEs can contain OGSI-defined attributes describing quality/lifetime of the data they contain –goodFrom: start of validity –goodUntil: end of validity –availUntil: Will be purged after this time

January 2004Build a Grid Service Using GT392 How to Build a Grid Service Using GT3 l Overview of Grid Services and GT3 l Build a Grid Service –Overview –1. Deployment: Stand Up a FileShare Service –2. Naming: Share Files using Identifiers –3. Inspection: Add Service Data –4. Virtual Organization: Register with a Community Index –5. Lifetime Management: Maintain service registration –6. Discovery: Find a File –7. GT3 Security: Share Files Securely Time permitting: –8. Transience: Create and Destroy FileShares l Publish your Grid Service: The GTR

January 2004Build a Grid Service Using GT393 Exercise 6: Discovery Client 1. Deployment: Stand up a FileShare service on your laptop 2. Service Naming: Share files using identifiers 3. Inspection: Add service data to your service 4. Virtual Organization: Register your service with a community index service 6. Discovery: Find services that publish the file you wish to retrieve 5. Lifetime Mgmt: Maintain service registration Tutorial Index FileShare

January 2004Build a Grid Service Using GT394 What is Discovery? l We want to find a service that has some property l In our case, a person wants to find a service that is sharing a particular filename (‘haggis.txt’) l The Tutorial Index knows about of all the services and which files are available l We can search the Tutorial Index for the service that is publishing ‘haggis.txt’ l The identification of the service(s) meeting our criteria is called Discovery

January 2004Build a Grid Service Using GT395 Implementation Details l The Tutorial Index publishes all of the information it has as service data (an SDE called ogsi:entry) l We can use standard service data querying methods for accessing the Tutorial Index’s data l However, our ogsi:entry will contain a large amount of data; it will be necessary to search inside of the SDE to find the data we need

January 2004Build a Grid Service Using GT396 Searching Inside an SDE l To search the SDE data we can use a GT3- specific query mechanism that allows us to assemble an XPath query An XPath overview in two bullets: >XPath is a convenient query language for searching XML documents >XPath queries are formed by identifying a route to the desired data We shall provide you with an XPath query to search the SDE of the Tutorial Index…

January 2004Build a Grid Service Using GT397 Searching the SDE of the Tutorial Index l We can find the service that is sharing ‘haggis.txt’ by delivering the following XPath query to the Tutorial Index: /ogsi:entry[ogsi:content/ns1:serviceDataValues/ fs:FileList/item/fs:filename= ‘haggis.txt’]/ogsi:memberServiceLocator A human translation of this syntax: “Select all the services that have a filename of ‘haggis.txt’ in their FileList SDE, and then return the locators to those services”

January 2004Build a Grid Service Using GT398 What Attendees Should Do l Create a uniquely-named file in $GLOBUS_LOCATION l Use the GetFileIndex client to perform an XPath query against the tutorial Index to retrieve the newly created file l Use GetFileIndex to retrieve a file from your neighbor

January 2004Build a Grid Service Using GT399 Exercise 6 Review l The Indexing Service Group provides a way to discover services based on SDEs l The IndexingServiceGroup aggregates the SDEs of services registering to it l Because SDEs are XML, GT3 allows XPath queries for searching and retrieving SDEs

January 2004Build a Grid Service Using GT3100 How to Build a Grid Service Using GT3 l Overview of Grid Services and GT3 l Build a Grid Service –Overview –1. Deployment: Stand Up a FileShare Service –2. Naming: Share Files using Identifiers –3. Inspection: Add Service Data –4. Virtual Organization: Register with a Community Index –5. Lifetime Management: Maintain service registration –6. Discovery: Find a File –7. GT3 Security: Share Files Securely Time permitting: –8. Transience: Create and Destroy FileShares l Publish your Grid Service: The GTR

January 2004Build a Grid Service Using GT GT3 Security: Secure your service Exercise 7: Security Client 1. Deployment: Stand up a FileShare service on your laptop 2. Service Naming: Share files using identifiers 3. Inspection: Add service data to your service 4. Virtual Organization: Register your service with a community index service 6. Discovery: Find services that publish the file you wish to retrieve 5. Lifetime Mgmt: Maintain service registration Tutorial Index FileShare

January 2004Build a Grid Service Using GT3102 GT3 Security Details l Built on top of PKI –Each entity has two keys: public and private –Data encrypted with one key can only be decrypted with other –The private key is known only to the entity l The public key is given to the world encapsulated in a X.509 certificate

January 2004Build a Grid Service Using GT3103 Certificates l A X.509 certificate binds a public key to a name l It includes a name and a public key bundled together and signed by a trusted party (Certificate Authority) l An example of a Distinguished Name (DN): “/O=Tutorial/OU=User/CN=Charles Bacon”

January 2004Build a Grid Service Using GT3104 Certificate Authorities l A Certificate Authority (CA) signs certificate requests l To verify a certificate signature, you must have a copy of the CA certificate l By default, stored in /etc/grid- security/certificates l For our tutorial, stored in $TUTORIAL_LOCATION/certificates

January 2004Build a Grid Service Using GT3105 Proxy Certificates l Proxy certificates contain a new keypair, and are signed by the original certificate –Also has shorter lifetime –Stored in /tmp/x509up_u$UID –Protected by filesystem permissions l Create a proxy using org.globus.tools.ProxyInit –Full GT3 install includes C command line clients as well

January 2004Build a Grid Service Using GT3106 Service-side Authentication l XML configuration files designed to set security parameters for a service l Allows per-method authentication settings l auth-method –none: no authentication –pkey: GSI Secure Message –gsi: GSI Secure Conversation l run-as –caller: Execute method with caller’s credential –system: Execute method with container credential –service: Execute method with service credential l Need to mention the XML configuration file in the wsdd as securityConfig parameter

January 2004Build a Grid Service Using GT3107 Client-side Authentication l Can set authentication properties programmatically l For example, our GetFile client will set GSI Secure Conversation authentication –((Stub)portType)._setProperty(Constants.G SI_SEC_CONV, Constants.ENCRYPTION);

January 2004Build a Grid Service Using GT3108 Authorization l GT3 allows for different authorization methods –Client >None: no authorization will be performed >Self: service will be authorized if it has the same identity as the client >Host: service will be authorized if the host returns an identity containing the hostname –Server >None: no authorization will be performed >Self: client will be authorized if it has the same identity as the service >Gridmap: User will be authorized as identity listed in gridmap

January 2004Build a Grid Service Using GT3109 Gridmap Files l A mapping from certificate subject names to local resource identities –“/O=Tutorial/OU=User/CN=Charles Bacon” bacon l Used in the gridmap authorization methods l Each service may have its own gridmap, specified by the gridmap parameter l Allows per-site authorization –Decentralized control required for VOs

January 2004Build a Grid Service Using GT3110 What Attendees Should Do l Uncomment the securityConfig parameter in WSDD l Uncomment the security code in GetFile.java l Try to GetFile from your service l Try querying the SDEs of your service l Create a proxy, then try both again

January 2004Build a Grid Service Using GT3111 What Attendees Should See l Without a proxy, you cannot interact with your service l With a proxy, both operations are successful

January 2004Build a Grid Service Using GT3112 Exercise 7 Review l Service security is configured through parameters in the WSDD file, and in the securityConfig XML file l Client security is configured by setting properties in the Java code l Service-side authentication may be specified on a per-operation basis

January 2004Build a Grid Service Using GT3113 How to Build a Grid Service Using GT3 l Overview of Grid Services and GT3 l Build a Grid Service –Overview –1. Deployment: Stand Up a FileShare Service –2. Naming: Share Files using Identifiers –3. Inspection: Add Service Data –4. Virtual Organization: Register with a Community Index –5. Lifetime Management: Maintain service registration –6. Discovery: Find a File –7. GT3 Security: Share Files Securely Time permitting: –8. Transience: Create and Destroy FileShares l Publish your Grid Service: The GTR

January 2004Build a Grid Service Using GT3114 Exercise 8: Transience Client 1. Deployment: Stand up a FileShare service on your laptop 2. Service Naming: Share files using identifiers 3. Inspection: Add service data to your service 4. Virtual Organization: Register your service with a community index service 6. Discovery: Find services that publish the file you wish to retrieve 7. GT3 Security: Secure your service 8. Transience: Create and destroy services Factory 5. Lifetime Mgmt: Maintain service registration Tutorial Index FileShare

January 2004Build a Grid Service Using GT3115 Transience l FileShare is persistent, with one instance running whenever the container is running l However, OGSI services can be transient –Transience allows for the dynamic creation and destruction of services l OGSI includes a Factory pattern in order to support service transience

January 2004Build a Grid Service Using GT3116 Factory l The OGSI Factory portType supports a createService operation –As a result a new service is created l FactoryProvider is the GT3 implementation of the OGSI portType; it defines a createService method for service instance creation

January 2004Build a Grid Service Using GT3117 Factory portType FileShareFactory FileShareFactoryCallback:: createServiceObject Create a FileShareFactoryCallback class that includes an createServiceObject method which knows how to instantiate a FileShare Implementing the Factory Pattern FileShare

January 2004Build a Grid Service Using GT3118 GT3 Container Factory portType FileShareFactory The Factory Pattern Runtime FileShareFactoryCallback:: createServiceObject

January 2004Build a Grid Service Using GT3119 GT3 Container FileShareFactory The Factory Pattern Runtime Client createService Factory portType FileShareFactoryCallback:: createServiceObject

January 2004Build a Grid Service Using GT3120 FileShare GT3 Container FileShareFactory The Factory Pattern Runtime Client createService FileShareFactoryCallback:: createServiceObject Factory portType

January 2004Build a Grid Service Using GT3121 FileShare GT3 Container FileShareFactory Client The Factory Pattern Runtime FileShareFactoryCallback:: createServiceObject Factory portType

January 2004Build a Grid Service Using GT3122 FileShare GT3 Container FileShareFactory The Factory Pattern Runtime getFile Client FileShare portType FileShareFactoryCallback:: createServiceObject

January 2004Build a Grid Service Using GT3123 GT3 Container Factory portType FileShareFactory The Factory Pattern Runtime FileShare FileShareFactoryCallback:: createServiceObject createService

January 2004Build a Grid Service Using GT3124 Factory Operation Provider l The FactoryProvider operation provider accepts a single parameter: “factoryCallback” l factoryCallback should be a java class supporting a “createServiceObject” method –responsible for creating the service

January 2004Build a Grid Service Using GT3125 GT3 Notification Factory Implementation l We won't need to write the code for the factory –org.gridforum.ogsi.NotificationFactory l We also don't have to write the WSDL –schema/ogsi/ogsi_notification_factory_service.wsdl l The code we need to write is the class used by the factory callback

January 2004Build a Grid Service Using GT3126 Additional WSDD Parameters for Factories l Factories get two sets of parameters –One for them for the factory itself –One for the services it creates l Parameters for created service are prefixed with “instance-” –

January 2004Build a Grid Service Using GT3127 Creating Services From a Factory l Now we have an extra step before running our client –The "createService" method on the File Share Service Factory creates a new FileShare, returning the GSH of the FileShare service l With the GSH, we can invoke the rest of our operations as usual l Our service will have a termination time set by the factory –The default lifetime for the GT3 Factory implementation is infinity; this default may be overridden –If the service has an expiration time, the lifetime must be updated to avoid it being recycled

January 2004Build a Grid Service Using GT3128 What Attendees Should Do l Modify the WSDD to create a factory l Use the CreateFileShare client to construct a FileShare service for a particular directory l Retrieve a file from the newly-created service l Attempt to connect to a neighbor’s factory l Retrieve from a neighbor’s created service via the Index client

January 2004Build a Grid Service Using GT3129 What Attendees Should See l Services created by the factory behave like ordinary FileShare services l Can have separate security settings for factories and the services they create –Our factories have “self” authorization –The FileShare services they create have “none” authorization

January 2004Build a Grid Service Using GT3130 Other standard portTypes: factory, notification, groups, handle resolver Hosting environment/runtime (“C”, J2EE,.NET, …) Lifetime management Explicit destruction Soft-state lifetime Service data element Service data element The OGSI Grid Service Service Implementation Client User-defined portTypes Inspection: What port types? What state? GridService portType Grid Service Handle

January 2004Build a Grid Service Using GT3131 l A Grid Service advertises its capabilities via a well- defined remote interface l The implementation of a Grid Service is separated from its definition l A Grid Service is deployed in a runtime environment Interface Implementation Runtime env Implementation Basics Runtime Environment

January 2004Build a Grid Service Using GT3132 Implementation Basics The Five Steps 1.Create the interface 2.Write the implementation 3.Write the deployment descriptor 4.Build the service, creating a GAR 5.Deploy into the runtime environment

January 2004Build a Grid Service Using GT3133 The Grid Technology Repository l Designed to facilitate code reuse l Appropriate for publishing OperationProviders and GridServices l Low barrier to publish l Licensing term set by contributors

January 2004Build a Grid Service Using GT3134 Bibliography A Web-based GT3 “Build a Grid Service” tutorial GT3 documentation page Globus Alliance publications page A definition: What is the Grid? I.Foster, July