Kelly Davis How to Write an Adaptor Kelly Davis AEI-MPG.

Slides:



Advertisements
Similar presentations
Question examples. Session 1 Objectives Why certify? Positioning of the non-technical version What is Java? Key advantages of Java Java Applications vs.
Advertisements

Design Patterns.
1 Structural Design Patterns - Neeraj Ray. 2 Structural Patterns - Overview n Adapter n Bridge n Composite n Decorator.
Linzhang Wang Dept. of Computer Sci&Tech, Nanjing University The Bridge Pattern.
The Bridge Pattern.. Intent Decouple an abstraction from its implementation so that the two can vary independently Also known as: Handle/Body.
Apache Axis2 - OSGi Integration in WSO2 Carbon Platform
Liang, Introduction to Java Programming, Sixth Edition, (c) 2007 Pearson Education, Inc. All rights reserved Chapter 1 Object-Oriented.
William Shiver.  Pattern used to decouple an abstraction from its implementation so that the two can vary independently.
The Bridge Pattern Guang Hu February Overview MotivationMotivation ParticipantsParticipants  Structure  Applicability  Benefits  Drawbacks 
Bridge The decoupling of abstraction and implementation.
Patterns Lecture 2. Singleton Ensure a class only has one instance, and provide a global point of access to it.
Introduction to Systems Architecture Kieran Mathieson.
Chapter 8, Object Design Introduction to Design Patterns
Design Patterns Based on Design Patterns. Elements of Reusable Object-Oriented Software. by E.Gamma, R. Helm, R. Johnson,J. Vlissides.
Java Jar Files Bar-Ilan University תשס"ה by Moshe Fresko.
Kelly Davis GAT: Grid Application Toolkit Kelly Davis AEI-MPG.
Introduction to Ant David Rabinowitz. March 3rd, 2004 Object Oriented Design Course 2 Ant Yet another build tool? Why do we need one where there are make,
Chapter 8 Object Design Reuse and Patterns. Finding Objects The hardest problems in object-oriented system development are: –Identifying objects –Decomposing.
Design Pattern – Bridge (Structural) References Yih-shoung Chen, Department of Information Engineering, Feng Chia University,Taiwan, R.O.C. The Bridge.
Chapter 22 Object-Oriented Design
Introduction to Ant- a framework example Amit Shabtay.
Kelly Davis Architecture of GAT Kelly Davis AEI-MPG.
Deployment. Packaging programs in Jar files Deployment applications with Java web start Creating and deploying applets with Java Plug-in.
Chapter 25 More Design Patterns.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 18 Slide 1 Software Reuse 2.
Grid Workflow within Triana Ian Wang Cardiff University.
Software Waterfall Life Cycle Requirements Construction Design Testing Delivery and Installation Operations and Maintenance Concept Exploration Prototype.
Case Studies on Design Patterns Design Refinements Examples.
Department of Computer Science, York University Object Oriented Software Construction 13/10/ :44 AM 0 CSE3311 – Software Design Adapter Pattern.
Object-Oriented Modeling Chapter 10 CSCI CSCI 1302 – Object-Oriented Modeling2 Outline The Software Development Process Discovering Relationships.
Kelly Davis and Tom Goodale How to Write an Adaptor Kelly Davis and Tom Gooldale and
Operating System What is an Operating System? A program that acts as an intermediary between a user of a computer and the computer hardware. An operating.
Kelly Davis and Tom Goodale Architecture of GAT Kelly Davis and Tom Goodale and
Ant & Jar Ant – Java-based build tool Jar – pkzip archive, that contains metadata (a manifest file) that the JRE understands.
9 Systems Analysis and Design in a Changing World, Fourth Edition.
Introduction to Java Beans CIS 421 Web-based Java Programming.
Csci5931 Web Security1 Java Security Model (GS: Ch. 7)
Linzhang Wang Dept. of Computer Sci&Tech, Nanjing University The Strategy Pattern.
Video – Any Device, Anytime, Anywhere - Motorola Inc.
© Copyright 1992–2004 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. Chapter 26 - Java Object-Based Programming Outline 26.1Introduction.
Behavioral Patterns CSE301 University of Sunderland Harry R Erwin, PhD.
Liang, Introduction to Java Programming, Sixth Edition, (c) 2007 Pearson Education, Inc. All rights reserved Object-Oriented Design.
Adapter and Façade Patterns By Wode Ni and Leonard Bacon-Shone.
Unix Servers Used in This Class  Two Unix servers set up in CS department will be used for some programming projects  Machine name: eustis.eecs.ucf.edu.
Bridge Bridge is used when we need to decouple an abstraction from its implementation so that the two can vary independently. This type of design pattern.
The Strategy Pattern (Behavioral) ©SoftMoore ConsultingSlide 1.
CSC 480 Software Engineering Lab 5 – Abstract Factory Pattern Oct 30, 2002.
Reference – Object Oriented Software Development Using Java - Jia COP 3331 Object Oriented Analysis and Design Chapter 10 – Patterns Jean Muhammad.
Adaptor Bridge Composite UNIT-IV1 Repeated key points for Structural Patterns (Intent, Motivation, Also Known As…) Code Examples Reference
David Foster LCG Project 12-March-02 Fabric Automation The Challenge of LHC Scale Fabrics LHC Computing Grid Workshop David Foster 12 th March 2002.
Linux A practical introduction. 1)Background and Getting Started Linux is an operating system with multiple providers Red Hat/CentOS (our version) Ubuntu.
By Robert Smith Feb 23,  The normal method of dealing with an abstraction having several implementations is through inheritance.  However, this.
Writing GAT Adaptors Hartmut Kaiser
GGF10 DRMAA Working Group Hrabri Rajic Intel GGF10 Berlin, Germany March, 2004 GLOBALGRIDFORUM.ORG.
Access QA servers Install SSH/SFTP software –T:\QualityAssurance\Tools\SSH.
ESRIN, 15 July 2009 Slide 1 Web Service Security support in the SSE Toolbox HMA-T Phase 2 FP 14 December 2009 S. Gianfranceschi, Intecs.
Strategy Design Pattern
DISTRIBUTED SYSTEMS Principles and Paradigms Second Edition ANDREW S
Adapter Design Pattern
Behavioral and Structural Patterns
Slides by Steve Armstrong LeTourneau University Longview, TX
Software Engineering Lecture #14.
BRIDGE PATTERN.
Structural Pattern part-I introduction
Structural Patterns: Adapter and Bridge
Strategy Design Pattern
Introduction to Design Patterns
Adapter Design Pattern
Adapter Pattern Jim Fawcett
Adapter Pattern Jim Fawcett
Presentation transcript:

Kelly Davis How to Write an Adaptor Kelly Davis AEI-MPG

Kelly Davis Outline Introduction Cpi Classes Bridge Design Pattern 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 Outline Introduction Cpi Classes Bridge Design Pattern 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 Introduction What is an Adaptor? An adaptor is a software component which adapts the interface of one software component to the interface expected by a second software component.

Kelly Davis 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 Introduction How are Adaptors used in GAT?  GAT = Client  CPIClass = Target  GATAdaptor = Adaptor  GATAdaptee = Adaptee

Kelly Davis Outline Introduction Cpi Classes Bridge Design Pattern 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 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 Outline Introduction Cpi Classes Bridge Design Pattern 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 Bridge Design Pattern Intent Applicability To avoid permanent binding of abstraction and implementation Abstraction and implementation should be sub-classable Changes in implementation should not effect clients Implementation should be completely hidden from clients Implementation may need to be shared among multiple clients Decouple an abstraction from its implementation so that the two can vary independently.

Kelly Davis Bridge Design Pattern Structure

Kelly Davis Outline Introduction Cpi Classes Bridge Design Pattern 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 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.

Kelly Davis Outline Introduction Cpi Classes Bridge Design Pattern 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 Collection Management CollectionCpi CollectionCpi - Abstract class that one must extend to provide the Collection capability.

Kelly Davis Outline Introduction Cpi Classes Bridge Design Pattern 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 Resource Management ResourceBrokerCpi ResourceBrokerCpi - Abstract class that one must extend to provide the ResourceBroker capability.

Kelly Davis Outline Introduction Cpi Classes Bridge Design Pattern 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 Peer-to-Peer Interaction StreamCpi FileStreamCpi StreamCpi - Abstract class that one must extend to provide the Stream capability. FileStreamCpi - Abstract class that one must extend to provide the FileStream capability.

Kelly Davis Outline Introduction Cpi Classes Bridge Design Pattern 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 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.

Kelly Davis Outline Introduction Cpi Classes Bridge Design Pattern 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 Implement the CPI Functions

Kelly Davis Outline Introduction Cpi Classes Bridge Design Pattern 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 Outline Introduction Cpi Classes Bridge Design Pattern 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 Create Manifest: Java Standard Attributes Manifest-Version Created-By Extension-Name Implementation-Title … GAT Attributes FileCpi-class FileCpi-schema Manifest-Version: 1.0 Created-By: 1.4.1_01 (Apple Computer, Inc.) Extension-Name: org.gridlab.gat.io Implementation-Title: DefaultFileAdaptor Implementation-Version: 1.0 Implementation-Vendor: GridLab Implementation-Vendor-Id: org.gridlab Implementation-URL: Sealed: false GATAdaptor: true FileCpi-class: org.gridlab.gat.io.DefaultFileAdaptor FileCpi-schema: file

Kelly Davis Outline Introduction Cpi Classes Bridge Design Pattern 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 Jar Manifest and Shared Object Java >ls MANIFEST.MF org >jar cmf MANIFEST.MF file.jar org/

Kelly Davis Outline Introduction Cpi Classes Bridge Design Pattern 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 Sign the jar Java >jarsigner file.jar kdavis

Kelly Davis Outline Introduction Cpi Classes Bridge Design Pattern 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 Outline Introduction Cpi Classes Bridge Design Pattern 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 Install the Signed jar Java ${JAVA_HOME}/lib/ext [in the JRE]

Kelly Davis Outline Introduction Cpi Classes Bridge Design Pattern 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 Off to the races! Pre-Alpha Java GAT Various default adaptors

Kelly Davis Off to the races! 1. mkdir JavaGAT 2. cd JavaGAT 3. curl -o GAT.tgzhttp:// -o GAT.tgz 4. curl -o GATAdaptors.tgzhttp:// -o GATAdaptors.tgz 5. tar xfvz GAT.tgz 6. tar xfvz GATAdaptors.tgz 7. rm GAT.tgz 8. rm GATAdaptors.tgz 9. cd GAT 10. edit build.xml and change all xxxxx to your chosen alias in your keystore and change all yyyyy to your keystore password. You may need to change the type of key dependent upon your keystore. 11. ant 12. cp lib/GAT.jar to $JAVA_HOME/lib/ext 13. cd../GATAdaptors/ 14. edit build.xml and change all xxxxx to your chosen alias in your keystore and change all yyyyy to your keystore password. You may need to change the type of key dependent upon your keystore. 15. ant 16. cp lib/*.jar to $JAVA_HOME/lib/ext

Kelly Davis For more information… GridLab GAT mailing list GAT-BoF at GGF9 in Chicago(October 7-9)