330 likes | 455 Views
How to Write an Adaptor. Kelly Davis and Tom Gooldale. kdavis@aei.mpg.de and goodale@aei.mpg.de. AEI-MPG. Outline. Introduction Cpi Classes File Management Collection Management Resource Management Peer-to-Peer Interaction Job Management Implementing a Provider
E N D
How to Write an Adaptor Kelly Davis and Tom Gooldale kdavis@aei.mpg.de and goodale@aei.mpg.de AEI-MPG
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!
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!
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.
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.
Introduction How are Adaptors used in GAT? • GAT =Client • CPIClass =Target • GATAdaptor =Adaptor • GATAdaptee =Adaptee
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!
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
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!
File Management • FileCpi • LogicalFileCpi FileCpi - Abstract class that one must extend to provide the File capability. LogicalFileCpi - Abstract class that one must extend to provide the LogicalFile capability.
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!
Collection Management • CollectionCpi CollectionCpi - Abstract class that one must extend to provide the Collection capability.
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!
Resource Management • ResourceBrokerCpi ResourceBrokerCpi - Abstract class that one must extend to provide the ResourceBroker capability.
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!
Peer-to-Peer Interaction • StreamCpi StreamCpi - Abstract class that one must extend to provide the Stream capability.
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!
Job Management • SimpleJobCpi • CheckpointableSimpleJobCpi SimpleJobCpi - Abstract class that one must extend to provide the SimpleJob capability. checkpointableSimpleJobCpi - Abstract class that one must extend to provide the CheckpointableSimpleJob capability.
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!
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!
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!
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!
Standard Attributes Manifest-Version Created-By Extension-Name Implementation-Title … GAT Attributes FileCpi-class FileCpi-schema Create Manifest: Java Manifest-Version: 1.0 Created-By: 1.4.1_01 (Apple Computer, Inc.) Extension-Name: org.gridlab.gat.adaptors.file 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 FileCpi-schema: httpg
Standard Attributes Manifest-Version Created-By Extension-Name Implementation-Title … GAT Attributes GAT-SO GAT-FileCpi-Constructor GAT-FileCpi-Equals … Create Manifest: C Manifest-Version: 1.0 Created-By: 1.4.1_01 (Apple Computer, Inc.) Extension-Name: MyFileCpi Implementation-Title: MyFirstAdaptor 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-FileCpi-Equals: MyFileCpi_Equals …
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!
Jar Manifest and Shared Object • Java • C >ls MANIFEST.MF org >jar cmf MANIFEST.MF file.jar org/ >ls MANIFEST.MF file.so >jar cmf MANIFEST.MF file.jar file.so
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!
Sign the jar • Java and C >jarsigner file.jar kdavis
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!
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!
Install the Signed jar • Java • C lib/ext [in the JRE] jre/lib/ext [in the Java 2 SDK] lib/ext [in the GAT install dir]
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!