Introduction to Globus Toolkit 4 at LA Grid
Introduction to Globus Toolkit 4 at LA Grid CIS 6612 – Autonomic Grid Computing Summer 2006 Presenters Fernando Farfán Mayelin Felipe Agnostics Diego López Ramakrishna Varadarajan
OUTLINE l l l WEB SERVICES FUNDAMENTALS GRID FUNDAMENTALS OGSA, WSRF & GT 4 LAGRID @ CIS. FIU. EDU DEVELOPING WS IN LAGRID l l l Unsecured Examples Secure Examples A SAMPLE APPLICATION: File. Buy
WEB SERVICES Definition l According to the W 3 C a Web service is a software system designed to support interoperable machine-tomachine interaction over a network. l Just another distributed computing technology that allows us to create client/server applications. Note: Information provided by Web Services is intended to be accessed by software, not directly by humans.
WEB SERVICES Advantages l Web Services are platform and language independent. l Most Web Services use HTTP for transmitting messages. l Web services can be combined to provide an integrated service.
WEB SERVICES Disadvantages l Overhead – transmitting messages in XML l Lack of versatility - not as many features as other distributed computing technologies
WEB SERVICES Typical Web Service Invocation The Globus Toolkit 4 Tutorial. http: //gdp. globus. org/gt 4 -tutorial/
WEB SERVICES Detailed Web Service Invocation The Globus Toolkit 4 Tutorial. http: //gdp. globus. org/gt 4 -tutorial/
WEB SERVICES Server Side handles HTTP messages provides a 'living space' for applications that must be accessed by different clients handles SOAP requests and responses The Globus Toolkit 4 Tutorial. http: //gdp. globus. org/gt 4 -tutorial/
WEB SERVICES Agnostic Question Can you compare a stateless vs. stateful web service? Stateless web services don’t “remember” information from one invocation to another whereas stateful Web Services do. • When Web Services are used just to create Internet-based applications with loosely coupled clients and servers, they can be stateless. The service can be restarted without concern of previous interactions. Example: the Weather Web Service mentioned in the tutorial • When Web Services are used to create Grid Applications, they are generally required to be stateful.
WEB SERVICES Agnostic Question What do you think are the tradeoffs of providing the state explicitly within the request message or maintaining the state implicitly within system components with which the web service can interact? In the paper Modeling Stateful Resources with Web Services the authors mention that the Web service could maintain the resource identity as static service state, thus obviating the need to pass that identity in the WSAddressing endpoint reference. This design choice implies a one-to-one mapping from Web service endpoints to stateful resources and thus a need for a unique Web service endpoint for each stateful resource.
WEB SERVICES Achieving Statefulness • The state is kept in a separate entity called a resource. • Each resource has a unique key. The Globus Toolkit 4 Tutorial. http: //gdp. globus. org/gt 4 -tutorial/
WEB SERVICES Agnostic Question The key contributions of WSRF are enabling web services to manage stateful resources and its standardization. What do you think are the advantages of separating state from services and what are the advantages of standardization? A stateless Web service can be restarted without concern for its history of prior interactions. Standardization enhances service interoperability.
WEB SERVICES Agnostic Question How do you discover the existence of a service in a grid using Globus Tool. Kit? Does it have any standard service to do that? How do we discover resources available on the Grid? The Index Service component of the Monitoring and Discovery Service area of the GT 4 collects information about resources in the grid and makes it available. Users need only know the location of a suitable Index Service in order to discover and monitor all of the resources and services that it indexes. GT 4 also provides a few command-line tools, such as wsrf-get-property and wsrf-query that can be used to retrieve resource properties. For more information: MDS Documentation
WHAT’S A GRID ANYWAYS? l GRID SYSTEM: A system that … l l l Coordinates resources that are not subject to centralized control. Using standard, open, general-purpose protocols and interfaces. To deliver nontrivial qualities of service. GRID COMPUTING: The field of computing science which concerns with Grid Systems. A GRID: an actual, working Grid system (i. e. LAGrid). THE GRID: Accessible to the general public, in the same sense that The Internet is publicly accessed.
OGSA, WSRF & GT 4 l OPEN GRID SERVICES ARCHITECTURE (OGSA) l l l WEB SERVICES RESOURCE FRAMEWORK (WSRF) l l VO Management Service. Resource Discovery and Management Service. Job Management Service. … security, data management, etc. Specifications under the auspices of OASIS. OGSA is the architecture, while WSRF is the infrastructure.
OGSA, WSRF & GT 4 B. Sotomayor and L. Childers. Globus Toolkit 4, Programming Java Services. 2006. The Morgan Kaufmann Series in Networking.
OGSA AND GLOBUS TOOLKIT l l l De facto standard for construction of Grid systems. OGSA evolves from GT 2. GT 3 includes redesigned elements: l l l Common notification mechanisms for service registration and service state. GT 3 released in March 2003. GT 4 released in April 2005.
OGSA AND GT 4 Agnostic Question A key requirement of OGSA is a unique Grid Service Handle, how does the GT 4 Toolkit meet this key requirement? Globus implements the OGSA-specified Grid Service Handle and the Grid Service Reference as network-wide pointers to grid service instances. A client application uses these two services to access the services.
OGSA AND GT 4 Agnostic Question How far is the mass-adoption of the GT 4 Toolkit? Are there any "marketing" campaigns to expedite the adoption of this Open standard? Globus Alliance (www. globus. org/alliance), Globus Consortium (www. globusconsortium. org): l l l Publications: Cluster. World Events and Meetings: SC, GRID, etc. Partners in Industry and Academia Communities.
GLOBUS TOOLKIT 4 – GT 4 Definition • Open source toolkit developed by The Globus Alliance that allows us to build Grid applications. • Organized as a collection of loosely coupled components. • Consists of services, programming libraries, and development tools. High-level services • Resource Monitoring and Discovery Service • Job Submission Infrastructure • Security Infrastructure • Data Management Services
GLOBUS TOOLKIT 4 – GT 4 Components
GLOBUS TOOLKIT 4 – GT 4 Java WS Core • Java WS Core provides APIs and tools for developing Grid services. • Includes a container based on Apache Axis to host various GT 4 services implemented in Java, such as GRAM, RFT, MDS-Index, and our own custom Web Services.
GLOBUS TOOLKIT 4 – GT 4 Agnostic Question What feature/service is most useful to you as you work with GT 4 Toolkit? The globus-build-service. sh and globus-deploy-gar scripts use Ant to create and deploy the GAR file so we don’t need to worry about: • Processing the WSDL file • Creating the stub classes from the WSDL • Compiling the stub classes • Compiling the service implementation • Organizing all the files into a very specific directory structure
GLOBUS TOOLKIT 4 – GT 4 Agnostic Question The "Grid" has been around since the mid 1990's, after 10 years of theory/development, is GT 4 the most developed Grid Toolkit in existence? While there is other grid toolkits Globus is considered by some the de facto standard for building Grid solutions. According to Ian Foster, there is a wide variety of tools for Grid computing such as Condor-G, MPICH-G, Nimrod-G, Cactus, Grid. Port, Net. Solve, Ninf, Access Grid, etc. , but essentially all build on the Globus Toolkit as infrastructure. http: //www. gridforum. org/mail_archive/gce-g/2002/Archive/msg 00370. html
WHAT IS LA GRID? “First-ever comprehensive computing grid to link faculty, students, and researchers from institutions across the United States, Latin America and Spain to collaborate on complex industry applications for business and societal needs. ” • IBM • Florida International University • University of Puerto Rico at Mayagüez • Barcelona Supercomputing Center • University of Miami • Tecnológico de Monterrey http: //lagrid. fiu. edu/
LA-GRID @ CIS. FIU Globus-enabled hosts: l ip-comm. cs. fiu. edu l la-blade-01. cs. fiu. edu l la-blade-02. cs. fiu. edu l la-blade-03. cs. fiu. edu l la-blade-04. cs. fiu. edu l la-blade-05. cs. fiu. edu l la-blade-06. cs. fiu. edu l la-blade-08 -ppc. cs. fiu. edu l la-blade-09 -ppc. cs. fiu. edu l tsunami-linux. cs. fiu. edu l starscream. cs. fiu. edu
GETTING READY FOR LAGRID l l l Globus Identity. Get a Globus Identity certificate issued by the Certificate Authority. http: //www. cs. fiu. edu/~esj/globus. html Security Enrollment. Enroll as a Secure Globus User with Eric Johnson. Setup environment
SETTING UP LAGRID ENVIRONMENT l l l l Step 1: Download the examples Go to the book's webpage, go to Downloads, and select to download the source code for the Math. Service examples and the File. Buy application Untar/unzip the file by running the following command from the directory where you saved the downloaded file: tar -xvzf gt 4 book-examples. tar. gz Step 2: Set the following environment variables Set $GLOBUS_LOCATION to /depot/globus-4 Set $ANT_HOME to /depot/ant-1. x Step 3: Getting a Globus Authentication Model Identity Please visit this page for more information on how to get a Globus Identity Certificate.
GT 4 JAVA WS CORE l l l Building web services using GT 4. Stateful web services! Following WSRF specifications.
WRITE A STATEFUL WEB SERVICE IN 5 SIMPLE STEPS!! 1. 2. 3. 4. 5. Define the WS interface with WSDL. Implement the service. Define the deployment parameters. Compile everything and generate a GAR file. Deploy the service.
OUR FIRST EXAMPLE: Math. Service l l l A simple Math web service. Operations: Addition & Subtraction & Get Value. Resources: Value (integer) & Last operation performed (String).
Math. Service: THE 5 STEPS. l Step 1: The WSDL. The Definition The Port Type <? xml version="1. 0" encoding="UTF-8"? > <definitions name="Math. Service" <? xml version="1. 0" encoding="UTF-8"? > Thetarget. Namespace="http: //www. globus. org/namespaces/ Messages <definitions …> examples/Math. Service_instance“ …> The Response and Request Types <? xml version="1. 0" encoding="UTF-8"? > …<port. Type name="Math. Port. Type" <definitions …> wsrp: Resource. Properties="tns: Math. Resource. Properties"> </definition> The<operation Resource Properties <? xml version="1. 0" encoding="UTF-8"? > <message name="Add. Input. Message"> name="add"> <definitions …> <part name="parameters" element="tns: add"/> <input message="tns: Add. Input. Message"/> <port. Type name="Math. Port. Type" <xsd: element name="add" type="xsd: int"/> </message> <output message="tns: Add. Output. Message"/> wsrp: Resource. Properties="tns: Math. Resource. Properties"> <xsd: element <message name="Add. Output. Message"> </operation> … name="add. Response"> <part<xsd: complex. Type/> name="parameters" element="tns: add. Response"/> </port. Type> <!-operations --> </xsd: element> </message> </definitions> </port. Type>
Math. Service: THE 5 STEPS. l Step 2: Implementing the Service in Java The Bare Bones The Resource Properties package org. globus. examples. services. core. first. impl; /* Resource properties */ import java. rmi. Remote. Exception; privateorg. globus. examples. stubs. Math. Service_instance. *; int value; import privateorg. globus. wsrf. *; String last. Op; import org. globus. wsrf. impl. *; /* Get/Setters for the RPs */ public class int get. Value() { public Math. Service return value; implements Resource, Resource. Properties { } … } public synchronized void set. Value(int value) { this. value = value; }
Math. Service: THE 5 STEPS. l Step 3: Configuring the Deployment (WSDD & JNDI) The Service Name <service name=“examples/core/first/Math. Service” provider=“Handler" use="literal" style="document”> The WSDL File <wsdl. File>share/schema/examples/Math. Service_instance/Math_service. wsdl </wsdl. File> Load on Startup <parameter name="load. On. Startup" value="true"/> The Common Parameters <parameter name="allowed. Methods" value="*"/> <parameter name="handler. Class" value="org. globus. axis. providers. RPCProvider"/> <parameter name="scope" value="Application"/>
WEB SERVICES IN GT 4 Agnostic Question What purpose does JNDI play within the GT 4 environment? The Java Naming and Directory Interface allow us to build directory-enabled applications. This will make our Web service available to client connections through a Web services container. A service (identified by its path) will want to locate its resource home. It can also interact with a variety of directories such as LDAP.
Math. Service: THE 5 STEPS. l Step 4: Create a GAR file with Ant l l l Process the WSDL to add missing pieces. Create stub classes from the WSDL. Compile stub classes. Compile service implementation. Organize all files into its specific directory structure. . /globus-build-service. sh –d <service base directory> -s <service’s WSDL file> $. /globus-build-service. sh -d org/globus/examples/services/core/first -s schema/examples/Math. Service_instance/Math. wsdl or $. /globus-build-service. sh first
Math. Service: THE 5 STEPS. l Step 5: Deploy the Service into a Web Service Container l l l Uses Ant. Unpacks the GAR. Copies the WSDL, compiled stubs, compiled implementation & WSDD into the GT 4 directory tree. $ sudo –u globus-deploy-gar org_globus_examples_services_core_first. gar $ sudo –u globus-undeploy-gar org_globus_examples_services_core_first
Math. Service: THE CLIENT l Tests the service invoking both the add and substract operations. $ java -cp. /build/stubs/classes/: $CLASSPATH org. globus. examples. clients. Math. Service_instance. Client https: //la-blade-01. cs. fiu. edu: 8443/wsrf/services/core/first/Math. Service Axis. Fault fault. Code: {http: //schemas. xmlsoap. org/soap/envelope/}Server. user. Exception fault. Subcode: fault. String: java. io. IOException: No socket factory for 'https' protocol fault. Actor: fault. Node: fault. Detail: . . .
HOW TO MAKE THE SERVICE SECURE? ? l Create the security-config. xml file. <security. Config xmlns="http: //www. globus. org"> <authz value="none"/> </security. Config> l Modify the deploy-server. wsdd file. <parameter name="security. Descriptor" value="etc/org_globus_examples_services_core_first/securityconfig. xml"/> l Add the following to the client. static { Util. register. Transport(); } … ((Stub)math. Factory). _set. Property( Constants. GSI_SEC_CONV, Constants. ENCRYPTION); ((Stub)math. Factory). _set. Property( Constants. AUTHORIZATION, No. Authorization. get. Instance()); Our acknowledge to Ramakrishna!
HOW TO MAKE THE SERVICE SECURE? ? l Let’s run it again… $ java -cp. /build/stubs/classes/: $CLASSPATH org. globus. examples. clients. Math. Service_instance. Client https: //la-blade-01. cs. fiu. edu: 8443/wsrf/services/core/first/Math. Service Current value: 15 Current value: 10 l Is it secure now? Not really… We just added the skeleton to make it secure.
WEB SERVICES IN GT 4 Agnostic Question How do I create a Grid infrastructure? Can we use any machine which has the Globus Toolkit's Grid Services installed on it? To build a Grid, we recommend that you download the Globus Toolkit and follow the instructions in the Globus Toolkit System Administrator's Guide. Both of these are available at the Globus website, http: //www. globus. org/toolkit/. The documentation will take you through the process of building the Globus Toolkit software, setting up a Grid information service, setting up a certificate authority or using someone else's, installing the Globus resource management tools on your servers, and installing Globus client tools and libraries for your users.
to be continued …
USEFUL LINKS l l l Our site! [COMING SOON] http: //www. cis. fiu. edu/~mfelip 01/CIS 6612/GT 4_project. html Globus toolkit 4 Programmer’s Tutorial http: //gdp. globus. org/gt 4 -tutorial/ Globus toolkit 4: Programming Java Services http: //www. gt 4 book. com/ OASIS. http: //www. oasis-open. org/ The Globus Alliance; http: //www. globus. org/
- Slides: 43