1 / 29

GT4 安装与开发

GT4 安装与开发. 李长华. Agenda. GT4 概述 GT4 的安装 GT4 的服务开发. GT4 的安装(1). 必备软件: JDK1.4.2+ ANT1.5.4+ Tomcat 5+( 可选). 准备工作. 2.1 创建一普通用户帐号,用于安装,管理 GT4. such as globus, 在此用户下创建目录 GT4 , 为 GT4 的安装目录 2.2 设置环境变量 JAVA_HOME,ANT_HOME,GLOBUS_LOCATION,GPT_LOCATION. 安装 GT4( 在普通帐号下工作 ).

forest
Download Presentation

GT4 安装与开发

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. GT4安装与开发 李长华

  2. Agenda • GT4概述 GT4的安装 • GT4的服务开发

  3. GT4的安装(1) • 必备软件: JDK1.4.2+ ANT1.5.4+ Tomcat 5+(可选)

  4. 准备工作 • 2.1 创建一普通用户帐号,用于安装,管理GT4. such as globus, 在此用户下创建目录GT4,为GT4的安装目录 • 2.2设置环境变量 JAVA_HOME,ANT_HOME,GLOBUS_LOCATION,GPT_LOCATION

  5. 安装GT4(在普通帐号下工作) • 3.1. 下载GT3.9.5软件压缩包 • 3.2 在此目录下 ./configure –prefix=$GLOBUS_LOCATION • 3.3 make • 3.4 source $GLOBUS_LOCATION/etc/globus-user-env.sh • globus-start-container -nosec

  6. WEB SERVICE的层次结构

  7. WSDL

  8. WS调用机制

  9. WS服务器(Apache Asix)

  10. WS-----WSRF(1)

  11. WS-----WSRF(2)

  12. How to persist state in WSRF

  13. How to persist state in WSRF(2)

  14. WS-Resource

  15. WS-Resource • WS-ResourceProperties • WS-ResourceLifecycle • WS-RenewableReferences

  16. How to Write a stateful WS • Step 1: Defining the interface in WSDL • Step 2: Implementing the service in Java • Step 3: Configuring the deployment in WSDD (and JNDI) • Step 4: Create a GAR file with Ant • Step 5: Deploy the service into a Web services container

  17. Step 1: Defining the interface in WSDL • MathService WSDL • Namespace mappings http\://www.globus.org/namespaces/2004/11/progtutorial/wsrf/MathService= org.globus.progtutorial.stubs.MathService http\://www.globus.org/namespaces/2004/11/progtutorial/wsrf/MathService/bindings= org.globus.progtutorial.stubs.MathService.bindings http\://www.globus.org/namespaces/2004/11/progtutorial/wsrf/MathService/service= org.globus.progtutorial.stubs.MathService.service

  18. Step 2: Implementing the service in Java

  19. Write Java code • MathNameSpaces • MathService implements MathNamespaces • MathResource implements Resource, ResourceIdentifier, ResourceProperties, MathNamespaces • MathResourceHome extends ResourceHomeImpl

  20. Step 3: Configuring the deployment in WSDD (and JNDI) • The WSDD deployment descriptor Tells the Web service container how it should publish our Web service • The JNDI deploy file Locate resource homes.

  21. Step 4: Create a GAR file with Ant Processing the WSDL file to add missing pieces (such as bindings) Creating the stub classes from the WSDL Compiling the stubs classes Compiling the service implementation Organize all the files into a very specific directory structure

  22. ./tutorial_build.sh -d <service base directory> -s <service's WSDL file>

  23. Step 5: Deploy the service into a Web services container • ant \ -f share/globus_wsrf_common/build-packages.xml \ deployGar \ -Dgar.name=<full path of GAR file>

  24. Client • implements MathNamespaces • MathServiceAddressingLocator locator = new MathServiceAddressingLocator();

  25. 关于GT4的思考(1) • 由于GT4的整个系统并不是GT3的延续,而是重新进行了建模,用WSRF代替了OGSI,因此,也就决定如果采用GT4,一切可能都要从新开始 • 目前GT4虽与GT3可以兼容,那只是在GT4中包含了GT3的大部分组件,使得GT4变得很庞大,但仍然只是同床异梦

  26. 关于GT4的思考(2) • GT4只是一个很底层的东西,各大组件提供了丰富的API,但如果不做什么二次开发,基本上还没有什么实际的用处。

  27. 关于GT4的思考(3) • 服务与状态的分离为我们提供了更大的灵活性

More Related