How to Write an Adaptor by rql14597

VIEWS: 6 PAGES: 33

									                   How to Write an Adaptor


                              Kelly Davis and Tom Gooldale
                     kdavis@aei.mpg.de and goodale@aei.mpg.de




                                       AEI-MPG




Kelly Davis and Tom Goodale
           Outline

 Introduction
 Cpi Classes
         File Management
         Collection Management
         Resource Management
         Peer-to-Peer Interaction
         Job Management
 Implementing a Provider
         Implement the Cpi functions
         Create a shared object
         Create a Manifest
         Jar the Manifest and shared object
         Sign the jar
 Integrating a Provider
         Install the signed jar
         Off to the races!

Kelly Davis and Tom Goodale
           Outline

 Introduction
 Cpi Classes
         File Management
         Collection Management
         Resource Management
         Peer-to-Peer Interaction
         Job Management
 Implementing a Provider
         Implement the Cpi functions
         Create a shared object
         Create a Manifest
         Jar the Manifest and shared object
         Sign the jar
 Integrating a Provider
         Install the signed jar
         Off to the races!

Kelly Davis and Tom Goodale
              Introduction


What is an Adaptor?

An adaptor is a software
component which adapts the
interface of a one software
component to the interface
expected by a second software
component.




   Kelly Davis and Tom Goodale
              Introduction


What is an Adaptor?

An adaptor is a software
component which adapts the
interface of a one software
component to the interface
expected by a second software
component.




   Kelly Davis and Tom Goodale
           Introduction



                  How are Adaptors used in GAT?

 GAT = Client
 CPIClass = Target
 GATAdaptor = Adaptor
 GATAdaptee = Adaptee




Kelly Davis and Tom Goodale
           Outline

 Introduction
 Cpi Classes
         File Management
         Collection Management
         Resource Management
         Peer-to-Peer Interaction
         Job Management
 Implementing a Provider
         Implement the Cpi functions
         Create a shared object
         Create a Manifest
         Jar the Manifest and shared object
         Sign the jar
 Integrating a Provider
         Install the signed jar
         Off to the races!

Kelly Davis and Tom Goodale
              Cpi Classes



What are Cpi Classes?

CpiClasses are abstract classes
that present to GAT a well defined
interface and thus allow for the
existence of GATAdaptors




   Kelly Davis and Tom Goodale
           Outline

 Introduction
 Cpi Classes
         File Management
         Collection Management
         Resource Management
         Peer-to-Peer Interaction
         Job Management
 Implementing a Provider
         Implement the Cpi functions
         Create a shared object
         Create a Manifest
         Jar the Manifest and shared object
         Sign the jar
 Integrating a Provider
         Install the signed jar
         Off to the races!

Kelly Davis and Tom Goodale
             File Management


   FileCpi

FileCpi - Abstract class that one
must extend to provide the File
capability.


   LogicalFileCpi
LogicalFileCpi - Abstract class that
one must extend to provide the
LogicalFile capability.



  Kelly Davis and Tom Goodale
           Outline

 Introduction
 Cpi Classes
         File Management
         Collection Management
         Resource Management
         Peer-to-Peer Interaction
         Job Management
 Implementing a Provider
         Implement the Cpi functions
         Create a shared object
         Create a Manifest
         Jar the Manifest and shared object
         Sign the jar
 Integrating a Provider
         Install the signed jar
         Off to the races!

Kelly Davis and Tom Goodale
             Collection Management




   CollectionCpi
CollectionCpi - Abstract class that
one must extend to provide the
Collection capability.




  Kelly Davis and Tom Goodale
           Outline

 Introduction
 Cpi Classes
         File Management
         Collection Management
         Resource Management
         Peer-to-Peer Interaction
         Job Management
 Implementing a Provider
         Implement the Cpi functions
         Create a shared object
         Create a Manifest
         Jar the Manifest and shared object
         Sign the jar
 Integrating a Provider
         Install the signed jar
         Off to the races!

Kelly Davis and Tom Goodale
             Resource Management



   ResourceBrokerCpi

ResourceBrokerCpi - Abstract
class that one must extend to
provide the ResourceBroker
capability.




  Kelly Davis and Tom Goodale
           Outline

 Introduction
 Cpi Classes
         File Management
         Collection Management
         Resource Management
         Peer-to-Peer Interaction
         Job Management
 Implementing a Provider
         Implement the Cpi functions
         Create a shared object
         Create a Manifest
         Jar the Manifest and shared object
         Sign the jar
 Integrating a Provider
         Install the signed jar
         Off to the races!

Kelly Davis and Tom Goodale
             Peer-to-Peer Interaction



   StreamCpi

StreamCpi - Abstract class that
one must extend to provide the
Stream capability.




  Kelly Davis and Tom Goodale
           Outline

 Introduction
 Cpi Classes
         File Management
         Collection Management
         Resource Management
         Peer-to-Peer Interaction
         Job Management
 Implementing a Provider
         Implement the Cpi functions
         Create a shared object
         Create a Manifest
         Jar the Manifest and shared object
         Sign the jar
 Integrating a Provider
         Install the signed jar
         Off to the races!

Kelly Davis and Tom Goodale
              Job Management


   SimpleJobCpi

SimpleJobCpi - Abstract class that
one must extend to provide the
SimpleJob capability.


   CheckpointableSimpleJobCpi
checkpointableSimpleJobCpi -
Abstract class that one must
extend to provide the
CheckpointableSimpleJob
capability.


   Kelly Davis and Tom Goodale
           Outline

 Introduction
 Cpi Classes
         File Management
         Collection Management
         Resource Management
         Peer-to-Peer Interaction
         Job Management
 Implementing a Provider
         Implement the Cpi functions
         Create a shared object
         Create a Manifest
         Jar the Manifest and shared object
         Sign the jar
 Integrating a Provider
         Install the signed jar
         Off to the races!

Kelly Davis and Tom Goodale
           Outline

 Introduction
 Cpi Classes
         File Management
         Collection Management
         Resource Management
         Peer-to-Peer Interaction
         Job Management
 Implementing a Provider
         Implement the Cpi functions
         Create a shared object
         Create a Manifest
         Jar the Manifest and shared object
         Sign the jar
 Integrating a Provider
         Install the signed jar
         Off to the races!

Kelly Davis and Tom Goodale
           Implement the CPI Functions




Kelly Davis and Tom Goodale
           Outline

 Introduction
 Cpi Classes
         File Management
         Collection Management
         Resource Management
         Peer-to-Peer Interaction
         Job Management
 Implementing a Provider
         Implement the Cpi functions
         Create a shared object
         Create a Manifest
         Jar the Manifest and shared object
         Sign the jar
 Integrating a Provider
         Install the signed jar
         Off to the races!

Kelly Davis and Tom Goodale
           Outline

 Introduction
 Cpi Classes
         File Management
         Collection Management
         Resource Management
         Peer-to-Peer Interaction
         Job Management
 Implementing a Provider
         Implement the Cpi functions
         Create a shared object
         Create a Manifest
         Jar the Manifest and shared object
         Sign the jar
 Integrating a Provider
         Install the signed jar
         Off to the races!

Kelly Davis and Tom Goodale
           Create Manifest: Java

 Standard Attributes
        Manifest-Version
        Created-By             Manifest-Version: 1.0
                               Created-By: 1.4.1_01 (Apple Computer, Inc.)
        Extension-Name         Extension-Name: org.gridlab.gat.adaptors.file
        Implementation-Title   Implementation-Title: MyFirstAdaptor
                               Implementation-Version: 1.0
        …                      Implementation-Vendor: GridLab
                               Implementation-Vendor-Id: org.gridlab
                               Implementation-URL: http://www.gridlab.org/file.jar
                               Sealed: true
                               FileCpi-class: org.gridlab.gat.adaptors.file.MyFileCpi
 GAT Attributes                FileCpi-schema: httpg
        FileCpi-class
        FileCpi-schema




Kelly Davis and Tom Goodale
           Create Manifest: C

Standard Attributes
      Manifest-Version          Manifest-Version: 1.0
      Created-By                Created-By: 1.4.1_01 (Apple Computer, Inc.)
                                Extension-Name: MyFileCpi
      Extension-Name            Implementation-Title: MyFirstAdaptor
      Implementation-Title      Implementation-Version: 1.0
                                Implementation-Vendor: GridLab
      …                         Implementation-Vendor-Id: org.gridlab
                                Implementation-URL: http://www.gridlab.org/file.jar
                                FileCpi-schema: httpg
                                GAT-SO: file.so
                                GAT-FileCpi-Constructor: MyFileCpi_Constructor
GAT Attributes                  GAT-FileCpi-Equals: MyFileCpi_Equals
      GAT-SO                    …

      GAT-FileCpi-Constructor
      GAT-FileCpi-Equals
      …


Kelly Davis and Tom Goodale
           Outline

 Introduction
 Cpi Classes
         File Management
         Collection Management
         Resource Management
         Peer-to-Peer Interaction
         Job Management
 Implementing a Provider
         Implement the Cpi functions
         Create a shared object
         Create a Manifest
         Jar the Manifest and shared object
         Sign the jar
 Integrating a Provider
         Install the signed jar
         Off to the races!

Kelly Davis and Tom Goodale
              Jar Manifest and Shared Object

    Java

>ls
MANIFEST.MF org
>jar cmf MANIFEST.MF file.jar org/



    C

>ls
MANIFEST.MF file.so
>jar cmf MANIFEST.MF file.jar file.so




   Kelly Davis and Tom Goodale
           Outline

 Introduction
 Cpi Classes
         File Management
         Collection Management
         Resource Management
         Peer-to-Peer Interaction
         Job Management
 Implementing a Provider
         Implement the Cpi functions
         Create a shared object
         Create a Manifest
         Jar the Manifest and shared object
         Sign the jar
 Integrating a Provider
         Install the signed jar
         Off to the races!

Kelly Davis and Tom Goodale
              Sign the jar




    Java and C

>jarsigner file.jar kdavis




   Kelly Davis and Tom Goodale
           Outline

 Introduction
 Cpi Classes
         File Management
         Collection Management
         Resource Management
         Peer-to-Peer Interaction
         Job Management
 Implementing a Provider
         Implement the Cpi functions
         Create a shared object
         Create a Manifest
         Jar the Manifest and shared object
         Sign the jar
 Integrating a Provider
         Install the signed jar
         Off to the races!

Kelly Davis and Tom Goodale
           Outline

 Introduction
 Cpi Classes
         File Management
         Collection Management
         Resource Management
         Peer-to-Peer Interaction
         Job Management
 Implementing a Provider
         Implement the Cpi functions
         Create a shared object
         Create a Manifest
         Jar the Manifest and shared object
         Sign the jar
 Integrating a Provider
         Install the signed jar
         Off to the races!

Kelly Davis and Tom Goodale
               Install the Signed jar


     Java
lib/ext       [in the JRE]
jre/lib/ext [in the Java 2 SDK]



     C
lib/ext        [in the GAT install dir]




    Kelly Davis and Tom Goodale
           Outline

 Introduction
 Cpi Classes
         File Management
         Collection Management
         Resource Management
         Peer-to-Peer Interaction
         Job Management
 Implementing a Provider
         Implement the Cpi functions
         Create a shared object
         Create a Manifest
         Jar the Manifest and shared object
         Sign the jar
 Integrating a Provider
         Install the signed jar
         Off to the races!

Kelly Davis and Tom Goodale

								
To top