Presentation is loading. Please wait.

Presentation is loading. Please wait.

Introduction to Globus Toolkit 4 at LA Grid CIS 6612 – Autonomic Grid Computing Summer 2006 PresentersFernando FarfánMayelin Felipe AgnosticsDiego LópezRamakrishna.

Similar presentations


Presentation on theme: "Introduction to Globus Toolkit 4 at LA Grid CIS 6612 – Autonomic Grid Computing Summer 2006 PresentersFernando FarfánMayelin Felipe AgnosticsDiego LópezRamakrishna."— Presentation transcript:

1 Introduction to Globus Toolkit 4 at LA Grid CIS 6612 – Autonomic Grid Computing Summer 2006 PresentersFernando FarfánMayelin Felipe AgnosticsDiego LópezRamakrishna Varadarajan

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 SERVICES Definition 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 Services are platform and language independent. Most Web Services use HTTP for transmitting messages. Web services can be combined to provide an integrated service. WEB SERVICES Advantages

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

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

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

8 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/gt4-tutorial/

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

10 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 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 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/gt4-tutorial/

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

13 WEB SERVICES Agnostic 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 DocumentationMDS 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 GT4 Agnostic 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 GT4 Agnostic 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 – GT4 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

21 GLOBUS TOOLKIT 4 – GT4 Components

22 GLOBUS TOOLKIT 4 – GT4 Java 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 – GT4 Agnostic 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 – GT4 Agnostic 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 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 applicationbook's webpage 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.this

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!! 1. Define the WS interface with WSDL. 2. Implement the service. 3. Define the deployment parameters. 4. Compile everything and generate a GAR file. 5. 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 <definitions name="MathService" targetNamespace="http://www.globus.org/namespaces/ examples/MathService_instance“ …> … The Definition <definitions name="MathService" targetNamespace="http://www.globus.org/namespaces/ examples/MathService_instance“ …> … The Port Type <portType name="MathPortType" wsrp:ResourceProperties="tns:MathResourceProperties"> … The Port Type <portType name="MathPortType" wsrp:ResourceProperties="tns:MathResourceProperties"> … The Messages The Messages The Response and Request Types The Response and Request Types The Resource Properties <portType name="MathPortType" wsrp:ResourceProperties="tns:MathResourceProperties"> The Resource Properties <portType name="MathPortType" wsrp:ResourceProperties="tns:MathResourceProperties">

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 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; } 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 share/schema/examples/MathService_instance/Math_service.wsdl Load on Startup The Common Parameters The Service Name <service name=“examples/core/first/MathService” provider=“Handler" use="literal" style="document”> The WSDL File share/schema/examples/MathService_instance/Math_service.wsdl Load on Startup The Common Parameters

35 WEB SERVICES IN GT4 Agnostic 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 -s $./globus-build-service.sh \ -d org/globus/examples/services/core/first \ -s schema/examples/MathService_instance/Math.wsdl $./globus-build-service.sh \ -d org/globus/examples/services/core/first \ -s schema/examples/MathService_instance/Math.wsdl $./globus-build-service.sh first or

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 $ 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 $ 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. Modify the deploy-server.wsdd file. 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?? 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 $ 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 Let’s run it again…

41 WEB SERVICES IN GT4 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. http://www.globus.org/toolkit/

42 to be continued …

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


Download ppt "Introduction to Globus Toolkit 4 at LA Grid CIS 6612 – Autonomic Grid Computing Summer 2006 PresentersFernando FarfánMayelin Felipe AgnosticsDiego LópezRamakrishna."

Similar presentations


Ads by Google