1 / 43

Introduction to Globus Toolkit 4 at LA Grid

Introduction to Globus Toolkit 4 at LA Grid. CIS 6612 – Autonomic Grid Computing Summer 2006. OUTLINE. WEB SERVICES FUNDAMENTALS GRID FUNDAMENTALS OGSA, WSRF & GT4 LAGRID @ CIS.FIU.EDU DEVELOPING WS IN LAGRID Unsecured Examples Secure Examples A SAMPLE APPLICATION: FileBuy.

alexandert
Download Presentation

Introduction to Globus Toolkit 4 at LA Grid

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Introduction to Globus Toolkit 4 at LA Grid CIS 6612 – Autonomic Grid Computing Summer 2006

  2. OUTLINE • WEB SERVICES FUNDAMENTALS • GRID FUNDAMENTALS • OGSA, WSRF & GT4 • LAGRID @ CIS.FIU.EDU • DEVELOPING WS IN LAGRID • Unsecured Examples • Secure Examples • A SAMPLE APPLICATION: FileBuy

  3. WEB SERVICESDefinition • According to the W3C a Web service is a software system designed to support interoperable machine-to-machine interaction over a network. • 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.

  4. WEB SERVICESAdvantages • Web Services are platform and language independent. • Most Web Services use HTTP for transmitting messages. • Web services can be combined to provide an integrated service.

  5. WEB SERVICESDisadvantages • Overhead– transmitting messages in XML • Lack of versatility - not as many features as other distributed computing technologies

  6. WEB SERVICESTypical Web Service Invocation The Globus Toolkit 4 Tutorial. http://gdp.globus.org/gt4-tutorial/

  7. WEB SERVICESDetailed Web Service Invocation The Globus Toolkit 4 Tutorial. http://gdp.globus.org/gt4-tutorial/

  8. WEB SERVICESServer Side handles HTTP messages provides a 'living space' for applications that must be accessed by different clients handles SOAP requests andresponses The Globus Toolkit 4 Tutorial. http://gdp.globus.org/gt4-tutorial/

  9. WEB SERVICESAgnostic 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.

  10. WEB SERVICESAgnostic 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 WS-Addressing 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.

  11. WEB SERVICESAchieving 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/gt4-tutorial/

  12. WEB SERVICESAgnostic 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.

  13. WEB SERVICESAgnostic Question How do you discover the existence of a service in a grid using Globus ToolKit? 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 GT4 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. GT4 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

  14. WHAT’S A GRID ANYWAYS? • GRID SYSTEM: A system that … • 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.

  15. OGSA, WSRF & GT4 • OPEN GRID SERVICES ARCHITECTURE (OGSA) • VO Management Service. • Resource Discovery and Management Service. • Job Management Service. • … security, data management, etc. • WEB SERVICES RESOURCE FRAMEWORK (WSRF) • Specifications under the auspices of OASIS. • OGSA is the architecture, while WSRF is the infrastructure.

  16. OGSA, WSRF & GT4 B. Sotomayor and L. Childers. Globus Toolkit 4, Programming Java Services. 2006. The Morgan Kaufmann Series in Networking.

  17. OGSA AND GLOBUS TOOLKIT • De facto standard for construction of Grid systems. • OGSA evolves from GT2. • GT3 includes redesigned elements: • Common notification mechanisms for service registration and service state. • GT3 released in March 2003. • GT4 released in April 2005.

  18. OGSA AND GT4Agnostic Question A key requirement of OGSA is a unique Grid Service Handle, how does the GT4 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.

  19. OGSA AND GT4Agnostic Question How far is the mass-adoption of the GT4 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): • Publications: ClusterWorld • Events and Meetings: SC, GRID, etc. • Partners in Industry and Academia Communities.

  20. GLOBUS TOOLKIT 4 – GT4Definition • 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

  21. GLOBUS TOOLKIT 4 – GT4Components

  22. GLOBUS TOOLKIT 4 – GT4Java WS Core • Java WS Core provides APIs and tools for developing Grid services. • Includes a container based on Apache Axis to host various GT4 services implemented in Java, such as GRAM, RFT, MDS-Index, and our own custom Web Services.

  23. GLOBUS TOOLKIT 4 – GT4Agnostic Question • What feature/service is most useful to you as you work with GT4 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

  24. GLOBUS TOOLKIT 4 – GT4Agnostic Question The "Grid" has been around since the mid 1990's, after 10 years of theory/development, is GT4 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, GridPort, NetSolve, Ninf, Access Grid, etc., but essentially all build on the Globus Toolkit as infrastructure. http://www.gridforum.org/mail_archive/gce-g/2002/Archive/msg00370.html

  25. 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/

  26. LA-GRID @ CIS.FIU Globus-enabled hosts: • ip-comm.cs.fiu.edu • la-blade-01.cs.fiu.edu • la-blade-02.cs.fiu.edu • la-blade-03.cs.fiu.edu • la-blade-04.cs.fiu.edu • la-blade-05.cs.fiu.edu • la-blade-06.cs.fiu.edu • la-blade-08-ppc.cs.fiu.edu • la-blade-09-ppc.cs.fiu.edu • tsunami-linux.cs.fiu.edu • starscream.cs.fiu.edu

  27. GETTING READY FOR LAGRID • 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

  28. SETTING UP LAGRID ENVIRONMENT • Step 1: Download the examples • Go to the book's webpage, go to Downloads, and select to download the source code for the MathService examples and the FileBuy application • Untar/unzip the file by running the following command from the directory where you saved the downloaded file: tar -xvzf gt4book-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.

  29. GT4 JAVA WS CORE • Building web services using GT4. • Stateful web services! • Following WSRF specifications.

  30. WRITE A STATEFUL WEB SERVICE IN 5 SIMPLE STEPS!! • Define the WS interface with WSDL. • Implement the service. • Define the deployment parameters. • Compile everything and generate a GAR file. • Deploy the service.

  31. OUR FIRST EXAMPLE: MathService • A simple Math web service. • Operations: Addition & Subtraction & Get Value. • Resources: Value (integer) & Last operation performed (String).

  32. MathService: THE 5 STEPS. • Step 1: The WSDL. The Definition <?xml version="1.0" encoding="UTF-8"?> <definitions name="MathService" targetNamespace="http://www.globus.org/namespaces/ examples/MathService_instance“ …> … </definition> The Port Type <?xml version="1.0" encoding="UTF-8"?> <definitions …> <portType name="MathPortType" wsrp:ResourceProperties="tns:MathResourceProperties"> <operation name="add"> <input message="tns:AddInputMessage"/> <output message="tns:AddOutputMessage"/> </operation> … </portType> </definitions> The Messages <?xml version="1.0" encoding="UTF-8"?> <definitions …> <message name="AddInputMessage"> <part name="parameters" element="tns:add"/> </message> <message name="AddOutputMessage"> <part name="parameters" element="tns:addResponse"/> </message> </definitions> The Response and Request Types <?xml version="1.0" encoding="UTF-8"?> <definitions …> <xsd:element name="add" type="xsd:int"/> <xsd:element name="addResponse"> <xsd:complexType/> </xsd:element> </definitions> The Resource Properties <portType name="MathPortType" wsrp:ResourceProperties="tns:MathResourceProperties"> <!-- operations --> </portType>

  33. MathService: THE 5 STEPS. • Step 2: Implementing the Service in Java The Bare Bones package org.globus.examples.services.core.first.impl; import java.rmi.RemoteException; import org.globus.examples.stubs.MathService_instance.*; import org.globus.wsrf.*; import org.globus.wsrf.impl.*; public class MathService implements Resource, ResourceProperties { … } The Resource Properties /* Resource properties */ private int value; private String lastOp; /* Get/Setters for the RPs */ public int getValue() { return value; } public synchronized void setValue(int value) { this.value = value; }

  34. MathService: THE 5 STEPS. • Step 3: Configuring the Deployment (WSDD & JNDI) The Service Name <service name=“examples/core/first/MathService” provider=“Handler" use="literal" style="document”> The WSDL File <wsdlFile>share/schema/examples/MathService_instance/Math_service.wsdl </wsdlFile> Load on Startup <parameter name="loadOnStartup" value="true"/> The Common Parameters <parameter name="allowedMethods" value="*"/> <parameter name="handlerClass" value="org.globus.axis.providers.RPCProvider"/> <parameter name="scope" value="Application"/>

  35. WEB SERVICES IN GT4Agnostic Question What purpose does JNDI play within the GT4 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.

  36. MathService: THE 5 STEPS. • Step 4: Create a GAR file with Ant • 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/MathService_instance/Math.wsdl or $ ./globus-build-service.sh first

  37. MathService: THE 5 STEPS. • Step 5: Deploy the Service into a Web Service Container • Uses Ant. • Unpacks the GAR. • Copies the WSDL, compiled stubs, compiled implementation & WSDD into the GT4 directory tree. $ sudo –u globus globus-deploy-gar \ org_globus_examples_services_core_first.gar $ sudo –u globus globus-undeploy-gar \ org_globus_examples_services_core_first

  38. MathService: THE CLIENT • Tests the service invoking both the add and substract operations. $ java -cp ./build/stubs/classes/:$CLASSPATH \ org.globus.examples.clients.MathService_instance.Client \ https://la-blade-01.cs.fiu.edu:8443/wsrf/services/core/first/MathService AxisFault faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException faultSubcode: faultString: java.io.IOException: No socket factory for 'https' protocol faultActor: faultNode: faultDetail: ...

  39. HOW TO MAKE THE SERVICE SECURE?? • Create the security-config.xml file.<securityConfig xmlns="http://www.globus.org"> <authz value="none"/></securityConfig> • Modify the deploy-server.wsdd file.<parameter name="securityDescriptor" value="etc/org_globus_examples_services_core_first/security-config.xml"/> • Add the following to the client.static { Util.registerTransport();}…((Stub)mathFactory)._setProperty( Constants.GSI_SEC_CONV, Constants.ENCRYPTION);((Stub)mathFactory)._setProperty( Constants.AUTHORIZATION, NoAuthorization.getInstance()); Our acknowledge to Ramakrishna!

  40. HOW TO MAKE THE SERVICE SECURE?? • Let’s run it again… • Is it secure now?Not really… We just added the skeleton to make it secure. $ java -cp ./build/stubs/classes/:$CLASSPATH \ org.globus.examples.clients.MathService_instance.Client \ https://la-blade-01.cs.fiu.edu:8443/wsrf/services/core/first/MathService Current value: 15 Current value: 10

  41. WEB SERVICES IN GT4Agnostic 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.

  42. to be continued …

  43. USEFUL LINKS • Our site! [COMING SOON]http://www.cis.fiu.edu/~mfelip01/CIS-6612/GT4_project.html • Globus toolkit 4 Programmer’s Tutorialhttp://gdp.globus.org/gt4-tutorial/ • Globus toolkit 4: Programming Java Serviceshttp://www.gt4book.com/ • OASIS.http://www.oasis-open.org/ • The Globus Alliance;http://www.globus.org/

More Related