Presentation is loading. Please wait.

Presentation is loading. Please wait.

7-2.1 Additional Features of WSRF/GT4 Services A brief outline © 2011 B. Wilkinson/Clayton Ferner. Fall 2011 Grid computing course. Modification date:

Similar presentations


Presentation on theme: "7-2.1 Additional Features of WSRF/GT4 Services A brief outline © 2011 B. Wilkinson/Clayton Ferner. Fall 2011 Grid computing course. Modification date:"— Presentation transcript:

1 7-2.1 Additional Features of WSRF/GT4 Services A brief outline © 2011 B. Wilkinson/Clayton Ferner. Fall 2011 Grid computing course. Modification date: July 20, 2011 Note: Globus version 5 does not include any GT4 web service components and this section may be less important in the future.

2 7-2.2 Stateful GT 4 Grid Services Review “Pure” Web services are stateless. Stateful web services required for Grid computing. WSRF provides stateful web services by having a Web service as a front-end to a stateful “resource.”

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

4 7-2.4 Web Service Resource Resource properties Client Web Service Resource Framework (WSRF)‏ Holds information retained between accesses.

5 Resource properties Name given to data items in the resource Can consist of: –Data values about current state of service (results of calculations etc.)‏ –Metadata: Information about data –Information about whole resource: Termination time, etc. 7-2.5

6 7-2.6 Combining Service Code and Resource Simplest arrangement is to have both the service code and resource code were held in a single file. Ideally, we would like to have multiple resources for a Web service Having one file not the preferred way except for simple service examples.

7 7-2.7 Separate Resource More generally, resource is a (stateful) class. End Point Reference (EPR) is an XML document that has URL of service and possibly a resource identification (key)‏ Classes provided for different arrangements: ReflectionResourceProperty class can be used when service code and resource in one file.

8 7-2.8 Resource Home Resources are managed by Resource Home's Provides resource management functions –for adding resources –for removing resources

9 7-2.9 Resource Home Client Web Service Resource home Resource Manages Methods operate on resources properties create/ find resource Client only interacts with stateless web service

10 7-2.10 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

11 7-2.11 Resource Home Client Web Service Resource home Resource If service and resource in one file, resource limited to one resource using a Globus supplied resource home called ServiceResourceHome

12 7-2.12 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

13 7-2.13 Separate Service, Resource & Resource Home files Singleton Resources (Single resource)‏ Client Web Service Resource home Resource Three files: the service, the resource home, and the resource. void add(int a)‏ void subtract (int a)‏ int value String lastOP

14 7-2.14 Multiple Resources Suppose there are multiple resources that a service might interact with: Client Web Service Resources

15 7-2.15 Creating Resources WS-Resource Factory Pattern Traditional object-oriented approach to creating resources is to use a “factory” service: Factory service responsible for creating instances of resources. Each resource assigned a unique “key”, which together with service URI identifies WS-resource pair. (Endpoint Reference)‏

16 7-2.16 Client “Instance” Service Resources WS-Resource Factory Pattern Factory service Request resource creation Request operation on resource Create Perform operation Return WS- Resource EPR

17 7-2.17 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

18 7-2.18 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.

19 7-2.19 Question Q: Why would one want to have multiple resources for a Web service?

20 7-2.20 Lifecycle Management Lifecycle mechanisms available in WSRF. GT4 provides mechanisms to specify when a resource is automatically destroyed. Immediately by invoking destroy operation through a Web service Scheduled some time in the future Leased-based lifecycle management

21 7-2.21 Immediate Destruction Command line: globus-wsrf-destroy -e EPR1234.epr Destruction can be requested through a Web service by a client: math.destroy(new Destroy()); Notice - factory responsible for creating resource, but service instance destroys it. File containing EPR of resource

22 7-2.22 Scheduled Termination Time Termination time exposed as a resource property. Can be set with GT4 command: wsrf-set-termination-time Example wsrf-set-termination-time -e EPR1234.epr 100 File containing EPR of resource Termination time in seconds

23 7-2.23 Question Q: Why would one want to have a termination time set for a resource?

24 7-2.24 Lease-based Lifetime In lease-based model, resources must be kept alive by interested parties, otherwise resource dies. A lifetime for a service is set after which the service is destroyed. Interested parties (clients) must renew the lease (reset the termination time) or it will be destroyed. Clean up without having to use a destroy operation explicitly.

25 7-2.25 Notifications Notifying clients when something interesting happens. Example might be when a resource property reaches a certain value Could use polling but this is very inefficient. WS-notification defines mechanisms.

26 7-2.26 Resource property changes Examples: –Changes to resource property values. –Methods added –Methods removed –Resources destroyed

27 7-2.27 Subscribe for notifications Need client to “subscribe” to receive notifications. Subscriptions are for a particular topic. Resource implemented with GT 4 classes that provide for automatic notifications whenever property changes.

28 7-2.28 Automatic notifications Fig 7.8

29 7-2.29 GT 4 Information Services Monitoring and Discovery Services (MDS) Principal components: Index service Trigger service WebMDS

30 7-2.30 Index service WebMDS Trigger service Information services

31 Globus core does not include information services such as index services. When installed, would see it in list of services, e.g.: 7-2.31 Index service Trigger service Fig 7.9

32 7-2.32 Container Index service (resources with resource properties)‏ Index Service GT 4 provided with an index service that can maintain a list of available resources.

33 Index service Fig 7.10 7-2.33 Note -- index service does not act as a local service registry listing the services — it act as a registry for the resources.

34 7-2.34 “add” method of ResourceHome used to create resource. Override method to include registering resource with index service.

35 7-2.35 Querying Index Service wsrf-query Browse index service with the GT4 command: wsrf-query which will list resource properties in an XML format.

36 Example wsrf-query –s http://localhost:8080/wsrf/services/ DefaultIndexService '/*' which will list resource properties in an XML format. Result might be: 234

37 An index service can be browsed with the GT4 command such as: wsrf-query –s \ http://localhost:8080/wsrf/services/DefaultIndexService '/*' which will list all the resource properties and their values in an XML format, where index service located at http://localhost:8080/wsrf/services/DefaultIndexService. XPath expressions can be used to select specific resource properties.

38 7-2.38 “ Community” Index Service A remote index service that holds all the index services of the “virtual organization.” For example a community index service might be at: https://torvalds.cis.uncw.edu/wsrf/ services/DefaultIndexService

39 7-2.39 Fig 7.12

40 7-2.40 Local Index service Resources Service Client Local Index service Resources ServiceClient 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

41 7-2.41 Querying Community Index Service Have Community Index Service running. Use wsrf-query command: $GLOBUS_LOCATION/bin/wsrf-query -s https://torvalds.cis.uncw.edu/wsrf/serv ices/DefaultIndexService '/*' Should see contents of all local index services.

42 7-2.42 Resource Discovery The local and community index services can be searched for a particular resource property. Since Resources properties are XML, can use “XPath” queries for searching and retrieval.

43 7-2.43 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: http://www.w3.org/TR/xpath

44 MDS4 Trigger Service Subscribes to a set of resource properties Evaluate that data against a set of pre- configured conditions (triggers) When a condition matches, action occurs –Email is sent to pre-defined address –Website updated 7-2.44 From: Monitoring and Discovery in a Web Services Framework: Functionality and Performance of Globus Toolkit MDS4 Jennifer M. Schopf, Sept 11, 2006

45 WebMDS Web-based interface to display resource property information. Front-end to index services. Sample: http://mds.globus.org:8080/webmds/ webmds?info=indexinfo&xsl=servicegroupxsl 7-2.45

46 7-2.46 More Information Book Globus Toolkit 4 Programming Java Services Borja Sotomayor and Lisa Childer Morgan Kaufmann, 2006. On-line GT4 services: http://gdp.globus.org/gt4-tutorial/

47 What is a (WS) notification in Grid services? (a) A mechanism of the GGF committee to inform the community of changes to the (WS) standard (b) A mechanism for client to inform a Grid service of its existence (c) A mechanism to inform a client of changes in the service or resource (d) A final demand to pay your taxes 7-2.47 SAQ 7-4

48 7-2.48 What is the purpose of the Globus index service? (a) To hold index variables for arrays (b) To operate on an array of functions (c) To maintain a list of available services (d) To maintain a list of available resources FAQ 7-11

49 Questions 7-2.49


Download ppt "7-2.1 Additional Features of WSRF/GT4 Services A brief outline © 2011 B. Wilkinson/Clayton Ferner. Fall 2011 Grid computing course. Modification date:"

Similar presentations


Ads by Google