Download presentation
Presentation is loading. Please wait.
Published byCordelia Brooks Modified over 9 years ago
1
7-1.1 Grid Computing Infrastructure Software, © 2010 B. Wilkinson/Clayton Ferner. Spring 2010 Grid computing course. slides7-1.ppt Modification date: Feb 26, 2010
2
7-1.2 Gone through several development cycles. Started before grid computing standards became accepted. Clearly need standardized protocols and interfaces for wide adoption of grid computing. Grid computing software
3
7-1.3 Standards Bodies Key players for Internet and World Wide Web: IETF (Internet Engineering Task Force) –Formed in 1985 for Internet standards inc. previous TCP/IP W3C consortium (Worlds Wide Web Consortium) –founded by Tim Berners-Lee shortly after he conceived World Wide Web in early 1990’s –Standardization of Web-related technologies OASIS (Organization for the Advancement of Structured Information Standards) Began as SGML Open in 1993 to promote SGML Became OASIS in 1998 to focus on structured information standards including newly developed XML DMTF (Distributed Management Task Force) Created in 1992 for IT systems management infrastructure
4
7-1.4 Organizations for Grid computing Open Grid Forum (OGF) –Principal Grid computing body –Began as Grid forum in 1998 –Merged with eGrid (European Grid) forum and Asia- Pacific Grid community to form Global Grid Form (GGF) in 2001 GGF meets three times a year around world GGF1 (March 2001), GGF2, GGF3 … –GGF became OGF in 2006 and continued meetings. GGF 18 became OGF 18 –OGF 24 met in Sept. 2008 in Singapore. –Meetings grown to a very large endeavour today, with participants across world attending.
5
7-1.5 Standards in Web Services World XML introduced (ratified) in 1998 SOAP ratified in 2000 Web services introduced 2000 Subsequently, many standards developed: –WSDL –WS-* where * refers to names of one of many standards –Mostly by W3C organization
6
7-1.6 Using web services It would be natural to use web services for grid computing components. Provides a easily identifiable interface through WDSL documents. Has Internet addressing (URLs).
7
7-1.7 (Stateless) Web Services” “Pure” web services are stateless. They do not remember information from one invocation to the next. That can work fine for many web service applications. They do not need to know what happened with a previous invocation by another client.
8
7-1.8 Simple previous Web service example Web service MathService with a method inc to add 1 to the supplied argument and return the result: Fig 7.1
9
7-1.9 “Stateful” web service example With a method to add a value to an accumulating value and return its value: Fig 7.2
10
Fig 7.3 7-1.10 Stateful Web service as a front-end to a database
11
7-1.11 In this example, the client accesses a service to perform actions such as access a database. Key aspect here is that the state is contained in a resource that can be separate from the web service. Web service becomes a front end to the resource. Come back to this concept later.
12
7-1.12 Open Grid Services Architecture (OGSA) Originally proposed by Foster et al. in paper: “The Physiology of the Grid” (see reading list) Anounced as Grid computing standard at GGF4 in Feb 2002. Defines standard mechanisms for creating, naming, and discovering service instances. Addresses architectural issues relating to interoperable services for grid computing. Does not give details of implementation. Requires stateful services but does not say how that will be achieved.
13
7-1.13 Open Grid Service Infrastructure (OGSI) Introduced in 2002-3 (final draft June 2003). First attempt to standardize how stateful Web services will be implemented. Modifies WDSL to enable state to be specified, using a language called GWSDL (“Grid Web Definition Language”), Introduced term Grid service. OGSI included inheritance, addressing mechanism, notifications, and message passing mechanism. Implemented in Globus toolkit version 3 (GT3).
14
7-1.14 Open Grid Service Infrastructure (OGSI) Not found acceptable by community at large because: –It significantly modified pure Web service approach –Required new tools –Too object oriented in approach –Too much specified in one standard. It would be better broken down in a series of specifications
15
7-1.15 WS-Resource Framework (WSRF) Web service community also working on approaches to stateful Web services. Web and Grid communities merged on WS- Resource Framework approach. Specification developed by OASIS in 2004 –Replace OGSI and makes implementation of a stateful Web service acceptable. Specifies how to make Web service stateful and other feature, without drifting from the original Web services concept.
16
7-1.16 Grid computing standards Figure from “An ‘Ecosystem’ of Grid Components”, 2004, Grid Research Integration Deployment and Support Center, http://www-unix.grids- center.org/r6/ecosystem/ecology.php
17
7-1.17 From “The Globus Toolkit 4 Programmer’s Tutorial” by Borja Sotomayor.
18
7-1.18 Grid service Broad meaning -- any service that conforms to interface conventions of a Grid computing infrastructure Narrow (current) meaning -- a service that conforms to WSRF Term seems to have lost favor – maybe because better to think of services in a Grid environment simply as regular Web services
19
7-1.19 Stateful Web Services Obtained in WSRF by having a web service front- end to a stateful “resource.”
20
7-1.20 Web Service Resource Resource properties Client Web Service Resource Framework (WSRF) Holds information retained between accesses.
21
7-1.21 WSDL file with WSRF Serves same purpose as WSDL file in web services – to define the service interface. A significant addition in the WSDL file is to specify the resource.
22
7-1.22 Web Service Resource Resource properties Client Holds information retained between accesses. WSDL file includes specifying resource Container
23
7-1.23 “Stateful” web service example revisited With a method to add a value to an accumulating value: Fig 7.4
24
7-1.24 Service Interface If service implements operations on WSRF resource properties, WSDL will include definitions relating to resource property. Resource Properties structure described in WSDL file because this file describes how the properties must be exchanged in XML (between clients, services, etc.)
25
WSDL file Resource property part..
26
Resource Properties from Command Line wsrf-query -s http//localhost/wsrf/ services/examples/core/rp/MathService <ns1:MathResourceProperties xmlns:ns1=”http://www.globus.org/namespaces/ examples/mathService_instance_rp”> 100 ADDITION Can also use wsrf-query to display specific resource property, rather than whole list. 7-1.26
27
7-1.27 Other key issues Addressing WSRF service needs an addressing mechanism that includes access to the resource Pure web services typically use URIs (URLs) WSRF service addressing defined in WS- addressing standard –Uses an “endpoint reference”
28
7-1.28 Endpoint Reference EPR Includes both: –Service address (URI) and – Resource identification (called a “key”)
29
7-1.29 Endpoint Reference (EPR) Service URI + resource identifier (key) Fig 7.5
30
EPR - Web service without an associated resource http://www.cs.uncc.edu/myWebService.jws where tag is required. prefix wsa is WS-Addressing namepace (http://www.w3.org/2005/08/addressing/wsdl) 7-1.30
31
http://www.cs.uncc.edu/myWebService.jws 234 Resource ID specified within. Not specified within WSDL document itself. Separated out and obtained when EPR obtained 7-1.31 EPR - Web service with an associated resource
32
7-2.32 WS-Addressing Terms Endpoint – the destination where the web service can be accessed. Endpoint reference (EPR) – describes destination: includes destination location as URI, but can have other parameters like a key
33
7-2.33 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
34
7-2.34 SOAP message WS-Addressing standard requires that contents of: and must appear in SOAP’s header:. http://www.cs.uncc.edu/axis/abw/Myservice.jws 234..
35
7-1.35 WSRF Framework Actually collection of four specifications: –WS-ResourceProperties Specifies how resource properties are defined and accessed –WS-ResourceLifetime Specifies mechanisms to manage resource lifetimes –WS-ServiceGroup Specifies how to group services or WS- Resources together –WS-BaseFaults Specifies how to report faults
36
7-1.36 WS-* Standards continued Also: WS-Notification –Collection of specifications that specifies how configure services as notification producers or consumers WS-Addressing (where EPR is defined) –Specifies how to address web services. –Provides a way to address a web service/resource pair
37
7-1.37 Concrete example Assignment 5 Globus 4.0 Web Service Assignment This assignment is based upon a GT4 service described by Sotomayor and Childers (2006).
38
7-1.38 Assignment Goals Show how stateful WSRF Web services can be created and deployed in Globus 4.0. Assignment is to be done on your own computer (or a lab computer). Requires you to install Globus 4.0 core and associated software – all available for download.
39
Installing software Will need to have or install: JDK 1.4.2+ Ant 1.5.1+ Python 2.4+ Globus ws-core-4.0.+ and set environment variables (paths) accordingly as explained in assignment write-up. Enjoy! 7-1.39
40
Disclaimer BE VERY CAREFUL NOT TO ALTER EXISTING PATHS ON YOUR COMPUTER. WE WILL NOT RESONSIBLE IF YOU DO NOT DO THINGS PROPERLY AND CAUSE PROBLEMS TO YOUR COMPUTER OPERATION. 4a.40
41
Testing installation Start Container Command: globus-start-container -nosec -nosec specifies “no security”, which simplifies assignment (no need for user certificates) Will show list of deployed services. 7-1.41
42
Standard list of deployed services in core 7-1.42 Fig 7.7
43
7-1.43 Purpose of Service To store an integer called value, which can be acted upon by three methods to: Add argument a to value, and Subtract argument a from value Get value These methods given. Further methods will be implemented. Service is stateful (value retained between accesses).
44
Java Interface for service public interface Math { public void add(int a); public void subtract(int a); public int getValueRP(); } 7-1.44
45
7-1.45 Resource Properties In code provided, actually two resource properties: Value -- an integer acted upon by the operations: –add –sub –getValueRP “Last operation performed” -- a string holding name of last operation done, “ADDITION” or “SUBTRACTION”, which is not used in assignment.
46
7-1.46 Math Web Service Resource Resource properties “value” (integer) “ last operation performed” (string) Client Resource Properties
47
7-1.47 Steps in Assignment Preliminary set-up –Install GT4 and associated software Download provided files: –WSDL service interface file –Stateful Math web service code (in Java) –WSDD Deployment Descriptor file –Client code (java) to exercise service Build Math service –Package all files into an archive file (.gar) Deploy Math service into GT 4 container Write and compile the client Start container and execute client. Easy!
48
7-1.48 Final Step in Assignment Add functionality to service –Add multiple operation to Math service –Requires you to modify WSDL (by hand), service code, and client code. –For that you will need to understand the files –Assignment Appendix gives details
49
7-1.49 WSDL file Serves same purpose as WSDL file in Web services – to define the service interface. A significant addition in the WSDL file is to specify the resource.
50
7-1.50 Globus-specific features of WSDL Resource properties – specified in portType attribute wsrp:ResourceProperties WSDL preprocessor used to include WSRF definitions (portType attribute wsdlpp:extends). Bindings (how abstract interface maps to concrete protocol messages) – not needed because automatically inserted by GT4 when built.
51
7-1.51 <definitions name="MathService” targetNamespace=“http://www.globus.org/namespaces/ examples/core/MathService_instance” xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:tns=http://www.globus.org/namespaces/ examples/core/MathService_instance xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsrp="http://docs.oasis-open.org/wsrf/2004/06/ wsrf-WS-ResourceProperties-1.2-draft-01.xsd" xmlns:wsrpw="http://docs.oasis-open.org/wsrf/2004/06/ wsrf-WS-ResourceProperties-1.2-draft-01.wsdl" xmlns:wsdlpp="http://www.globus.org/namespaces/2004/10/ WSDLPreprocessor" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <wsdl:import namespace= "http://docs.oasis-open.org/wsrf/2004/06/ wsrf-WS-ResourceProperties-1.2-draft-01.wsdl" location="../../wsrf/properties/WS-ResourceProperties.wsdl" /> Namespaces Name of service being implemented WSDL file
52
7-1.52 <xsd:schema targetNamespace="http://www.globus.org/namespaces/ examples/core/MathService_instance" xmlns:tns="http://www.globus.org/namespaces/examples/core/ MathService_instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> add method, argument int, returns a complex type
53
7-1.53 <xsd:element ref="tns:Value“ minOccurs="1“ maxOccurs="1"/> <xsd:element ref="tns:LastOp“ minOccurs="1“ maxOccurs="1"/>
54
7-1.54 Input and output message for add method
55
7-1.55 <portType name="MathPortType" wsdlpp:extends="wsrpw:GetResourceProperty" wsrp:ResourceProperties="tns:MathResourceProperties">
56
7-1.56 Service Code The code has two major parts: Resource properties Service code (methods) which are combined into one file for this assignment.
57
7-1.57 Service – Resource Properties public class MathService implements Resource, ResourceProperties { private ResourcePropertySet propSet; /* Resource Property set */ private int value; private String lastOp; public MathService() throws RemoteException { /* RP Constructor */ this.propSet = new SimpleResourcePropertySet( MathQNames.RESOURCE_PROPERTIES); /* Create RP set */ try { /* Initialize the RP's */ ResourceProperty valueRP = new ReflectionResourceProperty( MathQNames.RP_VALUE, "Value", this); this.propSet.add(valueRP); setValue(0); ResourceProperty lastOpRP = new ReflectionResourceProperty( MathQNames.RP_LASTOP, "LastOp", this); this.propSet.add(lastOpRP); setLastOp("NONE"); } catch (Exception e) { throw new RuntimeException(e.getMessage()); } Resource Property code Resource properties
58
7-1.58 /* Get/Setters for the RPs */ public int getValue() { return value; } public void setValue(int value) { this.value = value; } public String getLastOp() { return lastOp; } public void setLastOp(String lastOp) { this.lastOp = lastOp; } Service – Resource Properties methods
59
7-1.59 Service code - methods. /* Remotely-accessible operations */ public AddResponse add(int a) throws RemoteException { value += a; lastOp = "ADDITION"; return new AddResponse(); } public SubtractResponse subtract(int a) throws RemoteException { value -= a; lastOp = "SUBTRACTION"; return new SubtractResponse(); } public int getValueRP(GetValueRP params) throws RemoteException { return value; }. add method
60
7-1.60 Deploying a GT 4 service GT 4 container uses Apache Axis Basic steps for deploying a service similar in concept to that described for Apache Axis.
61
7-1.61 Deployment files server-config.wsdd (Web Service Deployment Descriptor) - contains information about the web service. jndi-config.xml (JNDI configuration file) - contains information about the resource management.
62
7-1.62 <deployment name="defaultServerConfig" xmlns="http://xml.apache.org/axis/wsdd/" xmlns:java="http://xml.apache.org/axis/wsdd/providers/java" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <service name="examples/core/first/MathService" provider="Handler" use="literal" style="document"> <parameter name="className"value="org.globus.examples. services.core.first.impl.MathService"/> share/schema/examples/MathService_instance/ Math_service.wsdl <parameter name="handlerClass“ value="org.globus.axis.providers.RPCProvider"/> WSDD file specifies where service will be located.
63
7-1.63 ant (Another Neat Tool) A build tool used for building service – forming package of files for deployment –a gar file (grid archive file) ant similar to make program but dependencies specified using XML configuration files. Windows version of assignment uses Python.
64
7-1.64 Generating GAR file with Ant From http://gdp.globus.org/gt4- tutorial/multiplehtml/ch03s04.html
65
7-1.65 GT 4 build command globus-build-service.sh first where first is a file that contains required bash and ant files. Windows Python version globus-build-service.py first
66
7-1.66 Deploying Service Deployment done using GT4 command: globus-deploy-gar gar_file using the gar file created by globus-build- service.
67
7-1.67 Start Container Command: globus-start-container -nosec MathService will be listed as one of the services that are available once the container has started.
68
7-1.68 GT4 container Mathservice
69
7-1.69 public class Client { public static void main(String[] args) { MathServiceAddressingLocator locator = new MathServiceAddressingLocator(); try { String serviceURI = args[0]; EndpointReferenceType endpoint = new EndpointReferenceType(); endpoint.setAddress(new Address(serviceURI)); //service endpt ref. MathPortType math; math = locator.getMathPortTypePort(endpoint); // Get PortType math.add(10); // Perform an addition math.add(5); // Perform another addition System.out.println("Current value: " + math.getValueRP(new GetValueRP())); // Access value math.subtract(5); // Perform a subtraction System.out.println("Current value: " + math.getValueRP(new GetValueRP())); // Access value } catch (Exception e) { e.printStackTrace(); } Java client to invoke service
70
7-1.70 Set CLASSPATH environment variable To set CLASSPATH (Windows), use provided batch file: %GLOBUS_LOCATION%\etc\globus-devel-env.bat Then compile.
71
7-1.71 Compile the Client Compile client: javac -classpath build\classes\org\globus\examples\services\cor e\first\impl\:%CLASSPATH% org\globus\examples\clients\MathService_insta nce\Client.java
72
7-1.72 Execute Client Execute client: java -classpath build\classes\org\globus\examples\services\cor e\first\impl\:%CLASSPATH% org.globus.examples.clients.MathService_insta nce.Client http://localhost:8080/wsrf/services/examples/co re/first/MathService You will see the following result (hopefully): Current value: 15 Current value: 10
73
7-1.73 Undeploy sevice Deploy service in preparation to modifying it. Command: globus-undeploy-gar with named gar file.
74
7-1.74 Extend Functionality of Service Add a multiply method to your Math Service. Repeat all the steps to test it.
75
7-1.75 Acknowledgment This assignment is derived from the book: “Globus Toolkit 4 Programming Java Services” by Borja Sotomayor and Lisa Childers, Morgan Kaufmann, 2006 see: http://gdp.globus.org/gt4-tutorial/ for on-line version.
76
Multiple-choice questions 7-1.76
77
7-1.77 What is a stateless Web service? (a) A Web service that cannot remember prior events (b) A Web service without local variables (c) A Web service that is not associated with a particular state in the country (d) A Web service that can remember prior events SAQ 7-1
78
What is a non-transient service? (a) An instance of a service that does not receive data (b) An instance of a service that outlives its client (c) An instance of a service that generates stateful data (d) An instance of a service that generates stable data 7-1.78 SAQ 7-2
79
What is the Open Grid Services Architecture (OGSA)? (a) A standard for defining a structure for interoperable Grid computing services but not its implementation (b) A standard for defining a structure for interoperable Grid computing services that includes its implementation (c) An open source implementation of Grid computing middleware (d) A Grid computing environment that is open to all 7-1.79 SAQ 7-3
80
What is the WS-Resource Framework (WSRF)? (a) A way of connecting a Web service to a resource without specifying its implementation (b) A framework for Web service reliability (c) A standard that provides for Web services embedded within a computing resource (d) A standard that provides for stateful Web services 7-1.80 SAQ 7-5
81
7-1.81 When one issues the command: globus-start-container -p 8081 -nosec what does one see? (a) 10 pages of errors messages (b) Nothing because the -p option with port 8081 cannot be used with -nosec (no security) (c) A list of services deployed by all users in the container (d) A message that states whether port 8081 can be used without Globus security (e) A list of the services that only you have deployed in the container SAQ 7-6
82
Name one basic difference between a Web service and a WSRF Grid service. (a) No differences (b) A Grid service is accessed from a Grid (c) A Grid service is designed to be stateful (d) The connections between Web services are in the form of a Web and the connections between Grid services are in the form of a Grid 7-1.82 SAQ 7-8
83
7-1.83 Questions
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.