Gary Kumfert & Scott Kohn Tammy Dahlgren, Tom Epperly, Steve Smith, and Bill Bosl Introducing...

Slides:



Advertisements
Similar presentations
pa 1 Porting BETA to ROTOR ROTOR Projects Presentation Day, June by Peter Andersen.
Advertisements

CCA Common Component Architecture CCA Forum Tutorial Working Group Language Interoperable.
Tammy Dahlgren, Tom Epperly, Scott Kohn, and Gary Kumfert Center for Applied Scientific Computing Common Component Architecture Working Group October 3,
Liang, Introduction to Java Programming, Eighth Edition, (c) 2011 Pearson Education, Inc. All rights reserved Immutable Objects and Classes.
Remote Method Invocation Chin-Chih Chang. Java Remote Object Invocation In Java, the object is serialized before being passed as a parameter to an RMI.
Bronis R. de Supinski Center for Applied Scientific Computing Lawrence Livermore National Laboratory June 2, 2005 The Most Needed Feature(s) for OpenMP.
Divorcing Language Dependencies from a Scientific Software Library Gary Kumfert, with Scott Kohn, Jeff Painter, & Cal Ribbens LLNLVaTech.
Java CourseWinter 2009/10. Introduction Object oriented, imperative programming language. Developed: Inspired by C++ programming language.
Hello AP Computer Science!. What are some of the things that you have used computers for?
Java and C++, The Difference An introduction Unit - 00.
Center for Component Technology for Terascale Simulation Software 122 June 2002Workshop on Performance Optimization via High Level Languages and Libraries.
GKK 1 CASC Recommended Viewing: Since this is a pictorial presentation, I’ve gone through the effort to type up what I normally say in the “notes” section.
Gary Kumfert with Bill Bosl, Tammy Dahlgren, Tom Epperly, Scott Kohn, & Steve Smith Achieving Language Interoperability with.
CCA Port, Component & Application Build Skeleton Templates “A new script toolkit for generating CCA build skeletons” Torsten Wilde and James Kohl Oak Ridge.
Liang, Introduction to Java Programming, Sixth Edition, (c) 2007 Pearson Education, Inc. All rights reserved Chapter 12 Object-Oriented.
1 Java Programming II Java Network II (Distributed Objects in Java)
Understanding the CORBA Model. What is CORBA?  The Common Object Request Broker Architecture (CORBA) allows distributed applications to interoperate.
CCA Common Component Architecture CCA Forum Tutorial Working Group Language Interoperable.
Tamara Dahlgren, Tom Epperly, Scott Kohn, & Gary Kumfert Center for Applied Scientific Computing.
An program As a simple example of socket programming we can implement a program that sends to a remote site As a simple example of socket.
1 CCA Meeting, Januray 25th 2007 Supporting the Master-Worker Paradigm in the Common Component Architecture Hinde Lilia Bouziane, Christian Pérez, Thierry.
CS 584 Lecture 18 l Assignment » Glenda assignment extended to the Java RMI Deadline » No Java RMI Assignment l Test » Friday, Saturday, Monday.
15 - RMI. Java RMI Architecture Example Deployment RMI is a part of J2SE (standard edition), but is used by J2EE) A J2EE server is not nessesary for using.
Presentation: RMI Continued 2 Using The Registry & Callbacks.
CCA Common Component Architecture CCA Forum Tutorial Working Group Contributors: Language Interoperability Using Gary.
CS200 Algorithms and Data StructuresColorado State University Part 4. Advanced Java Topics Instructor: Sangmi Pallickara
Tammy Dahlgren with Tom Epperly, Scott Kohn, and Gary Kumfert Center for Applied Scientific Computing Common Component Architecture Working Group October.
POS 406 Java Technology And Beginning Java Code
CCA Common Component Architecture CCA Forum Tutorial Working Group Introduction to the Ccaffeine.
Object-Oriented Modeling Chapter 10 CSCI CSCI 1302 – Object-Oriented Modeling2 Outline The Software Development Process Discovering Relationships.
1 Cisco Unified Application Environment Developers Conference 2008© 2008 Cisco Systems, Inc. All rights reserved.Cisco Public Introduction to Etch Scott.
Shannon Hastings Multiscale Computing Laboratory Department of Biomedical Informatics.
RMI Remote Method Invocation Distributed Object-based System and RPC Together 2-Jun-16.
CORBA Details Three Tier Architecture CORBA API Holders and Helpers COS Naming and Naming Contexts Transient and Persistent Objects Properties Callbacks.
 Remote Method Invocation  A true distributed computing application interface for Java, written to provide easy access to objects existing on remote.
Tammy Dahlgren, Tom Epperly, Scott Kohn, & Gary Kumfert.
Scott Kohn with Tammy Dahlgren, Tom Epperly, and Gary Kumfert Center for Applied Scientific Computing Lawrence Livermore National Laboratory October 2,
Programming in Java CSCI-2220 Object Oriented Programming.
Update on CORBA Support for Babel RMI Nanbor Wang and Roopa Pundaleeka Tech-X Corporation Boulder, CO Funded by DOE OASCR SBIR.
Lawrence Livermore National Laboratory Gary Kumfert UCRL-PRES Lawrence Livermore National Laboratory, P. O. Box 808, Livermore, CA This work.
Babel F2003 Struct Support Update and FACETS integration Funded by DOE (TASCS) Grant No DE-FC02-07ER25805, DOE Grant No DE-FG02-04ER84099 and Tech-X Stefan.
Tammy Dahlgren, Tom Epperly, Scott Kohn, & Gary Kumfert.
CCA Common Component Architecture CCA Forum Tutorial Working Group Common Component Architecture.
Wel come To Seminar On C#.
CCA Common Component Architecture CCA Forum Tutorial Working Group Writing Components.
UMBC Distributed Computing with Objects RMI/Corba CMSC 432 Shon Vick.
Basic Syntax อ. ยืนยง กันทะเนตร คณะเทคโนโลยีสารสนเทศและการสื่อสาร มหาวิทยาลัยพะเยา Chapter 2.
CCA Common Component Architecture CCA Forum Tutorial Working Group A Simple CCA Component Application.
CCA Common Component Architecture CCA Forum Tutorial Working Group Contributors: Introduction to the Ccaffeine Framework.
CCA Common Component Architecture CCA Forum Tutorial Working Group Writing Components.
CCA Common Component Architecture CCA Forum Tutorial Working Group Writing Components.
CCA Distributed Framework Interoperability. Goals Assume you have two (or more) framework instances. –Assume it contains a network of component instances.
CCA Common Component Architecture CCA Forum Tutorial Working Group Common Component Architecture.
Liang, Introduction to Java Programming, Eighth Edition, (c) 2011 Pearson Education, Inc. All rights reserved Fall 2013 Chapter 10 Thinking.
CCA Common Component Architecture CCA Forum Tutorial Working Group A Simple CCA Component.
Performance-Driven Interface Contract Enforcement for Scientific Components 10th International Symposium on Component-Based Software Engineering Medford,
CCA Common Component Architecture CCA Forum Tutorial Working Group Introduction to the Ccaffeine.
“Port Monitor”: progress & open questions Torsten Wilde and James Kohl Oak Ridge National Laboratory CCA Forum Quarterly Meeting Santa Fe, NM ~ October.
SESSION 1 Introduction in Java. Objectives Introduce classes and objects Starting with Java Introduce JDK Writing a simple Java program Using comments.
Chapter 11 Object-Oriented Design
Ch 1. A Python Q&A Session Bernard Chen 2007.
Remote Method Invocation
CS360 Windows Programming
CS18000: Problem Solving and Object-Oriented Programming
Units with – James tedder
Constructors, GUI’s(Using Swing) and ActionListner
Introducing Java.
Franca+ Bernhard Hennlich and Manfred Bathelt
Common Component Architecture (CCA)
Plug-In Architecture Pattern
Presentation transcript:

Gary Kumfert & Scott Kohn Tammy Dahlgren, Tom Epperly, Steve Smith, and Bill Bosl Introducing...

GKK 2 CASC What is Decaf? l A CCA framework. u 100% v-0.5 compliant u Supports “Hello World!” components l Not a competitor with CCAT or CCAFFIENE  Also thought of calling it “mouse” l Implemented using Babel u Proof of Babel’s applicability in CCA u research vehicle for us to grok CCA u distributed as example in release

GKK 3 CASC Outline l High Level Discussion cca.sidl & decaf.sidl in detail l Implementing the framework l Implementing “Hello World” l Feedback into the CCA Highlight Babel’s strengths and weaknesses

GKK 4 CASC High Level Discussion cca.sidl from cca-forum.org decaf.sidl by hand l Framework in C++ l “Hello World” component in F77 l Printf component in C l Drivers in F77, Python & Java Gary did in 2 days Scott did in 3 days

GKK 5 CASC Lines of Code (Decaf only) cca.sidl (excl. comments)28 decaf.sidl (excl. comments)12 Generated C/C++ code (wc –l *)22,067 Hand added Implementation96

GKK 6 CASC Biggest Time Consumers l Some Babel Bugfixes u new tests added to regression suite u Babel or better required l Demystifying CCA Spec u Lots of missing details u How to create a component instance? u How to bind a “uses port” to a “provides port”? u No main()! Due to GUI heritage?

GKK 7 CASC HelloDriver.java (1/2) public class HelloDriver { public static void main(String args[]) { decaf.Framework decaf = new decaf.Framework(); cca.ComponentID server = decaf.createInstance( “HelloServer.Component”, “HelloServerInstance”); cca.ComponentID client = decaf.createInstance( “HelloClient.Component”, “HelloClientInstance”);

GKK 8 CASC HelloDriver.java (2/2) decaf.connect( client, “HelloServer”, server, “HelloServer”); cca.Port port = decaf.lookupPort(client, “GoPort”); cca.ports.GoPort go = (cca.ports.GoPort) port._cast(“cca.ports.GoPort”); go.go(); decaf.destroyInstance( server ); decaf.destroyInstance( client ); } // end main } // end class

GKK 9 CASC Outline l High Level Discussion cca.sidl & decaf.sidl in detail l Implementing the framework l Implementing “Hello World” l Feedback into the CCA spec

GKK 10 CASC Port – Key CCA Abstraction // cca.sidl version cca 0.5; package cca { interface Port { } … cca.sidl // decaf.sidl version decaf 0.5; package decaf { … decaf.sidl

GKK 11 CASC PortInfo – Port MetaData interface PortInfo { string getType(); string getName(); string getProperty( in string name ); } cca.sidl class PortInfo implements-all cca.PortInfo { void initialize( in string name, in string type, in array properties); } decaf.sidl

GKK 12 CASC Discussion Is array appropriate for properties? ? Can implement richer data structures. Should Babel have a standard library? class PortInfo implements-all cca.PortInfo { void initialize( in string name, in string type, in array properties); } decaf.sidl

GKK 13 CASC Component – Base Class for all CCA components interface Component { void setServices( in Services svcs ); } cca.sidl decaf.sidl

GKK 14 CASC ComponentID – handle to a component interface ComponentID { string toString(); } cca.sidl class ComponentID implements-all cca.ComponentID { void initialize( in string name ); } decaf.sidl

GKK 15 CASC Services – component’s view of the world (1/3) interface Services { Port getPort( in string name ); Port getPortNonblocking( in string name ); void releasePort( in string name ); PortInfo createPortInfo( in string name, in string type, in array properties ); ComponentID getComponentID(); // … cca.sidl

GKK 16 CASC Services – component’s view of the world (2/3) interface Services { // … continued void registerUsesPort( in PortInfo pinfo ); void unregisterUsesPort( in string name ); void addProvidesPort( in Port inPort, in PortInfo pinfo ); void removeProvidesPort( in string name ); } cca.sidl

GKK 17 CASC Services – component’s view of the world (3/3) class Services implements-all cca.Services { void bindPort( in string name, in cca.Port port ); cca.Port getProvidesPort( in string name ); void setComponentID( in cca.ComponentID cid ); } decaf.sidl

GKK 18 CASC Discussion Components can only access cca.Services, BuildServices needs decaf.Services If downcasting from cca.Services to decaf.Services, then the components are framework specific. Evidence of underspecification? CCA spec needs to enumerate those special components that are not portable and must be implemented by each framework. ! ?

GKK 19 CASC Indispensable Ports (1/2) package ports { interface GoPort extends Port { int go (); } interface BuilderService extends Port { ComponentID createInstance( in string className, in string requestedInstanceName ); void destroyInstance( in ComponentID toDie ); void connect( in ComponentID user, in string usingPortName, in ComponentID provider, in string providingPortName); } cca.sidl

GKK 20 CASC Indispensable Ports (2/2) class Framework implements-all cca.ports.BuilderService { cca.Port lookupPort( in cca.ComponentID id, in string portName ); } decaf.sidl

GKK 21 CASC Discussion BuilderService is still under discussion and not formally addopted into the spec! How did anyone build anything without create/connect/destroy functionality? !

GKK 22 CASC Outline l High Level Discussion cca.sidl & decaf.sidl in detail l Implementing the framework l Implementing “Hello World” l Feedback into the CCA spec

GKK 23 CASC Decaf Implementation Details l Used Babel’s C++ Bindings u generated 22K lines of code l Hand edited 8 files u added 96 lines of code by hand PortInfo ComponentID Services Framework decaf__Impl. hh cc

GKK 24 CASC decaf_PortInfo_Impl.hh // DO-NOT-DELETE splicer.begin(decaf.PortInfo._includes) #include // DO-NOT-DELETE splicer.end(decaf.PortInfo._includes) namespace decaf { class PortInfo_Impl { private: //... // DO-NOT-DELETE splicer.begin(decaf.PortInfo._data) std::string d_name; std::string d_type; std::map d_propertyMap; // DO-NOT-DELETE splicer.end(decaf.PortInfo._data)

GKK 25 CASC decaf_PortInfo_Impl.cc string decaf::PortInfo_impl::getProperty( /*in*/ string name ) throw () { // DO-NOT-DELETE splicer.begin(decaf.PortInfo.getProperty) return d_propertyMap[ name ]; // DO-NOT-DELETE splicer.end(decaf.PortInfo.getProperty) }

GKK 26 CASC cca::ComponentID decaf::Framework_impl::createInstance( /*in*/ string className, /*in*/ string requestedInstanceName ) throw() { // DO-NOT-DELETE splicer.begin(decaf.Framework.createInstance) SIDL::BaseClass sidl_class = SIDL::Loader::createClass( className ); cca::Component component = sidl_class; decaf::ComponentID cid; if ( component._not_nil() ) { string uniqueName = getUniqueName( requestedInstanceName ); cid = decaf::ComponentID::_create(); cid.initialize( uniqueName ); decaf::Services svc = decaf::Services::_create(); svc.setComponentID( cid ); d_instance[ uniqueName ] = std::make_pair( component, svc ); component.setServices( svc ); } return cid; // DO-NOT-DELETE splicer.end(decaf.Framework.createInstance) }

GKK 27 CASC Outline l High Level Discussion cca.sidl & decaf.sidl in detail l Implementing the framework l Implementing “Hello World” l Feedback into the CCA spec

GKK 28 CASC HelloWorld SIDL Files version HelloServer 0.5; package HelloServer { interface HelloPort extends cca.Port { string sayHello(); } class Component implements-all HelloPort, cca.Component {} } server.sidl version HelloClient 0.5; package HelloClient { class Component implements-all cca.ports.GoPort, cca.Component {} } client.sidl

GKK 29 CASC HelloServer_Component_ Impl.f subroutine HelloServer_Component_setServices_impl( & self, services) C... call SIDL_string__array_create_f(1, 0, 0, properties) call cca_Services_createPortInfo_f( & services, & 'HelloServer', & 'HelloServer.HelloPort', & properties, & portinfo) call HelloServer_Component__cast_f(self, 'cca.Port', & port) call cca_Services_addProvidesPort_f(services, port, & portinfo) call cca_PortInfo_deleteReference_f(portinfo) call SIDL_string__array_destroy_f(properties)

GKK 30 CASC HelloDriver.py (1/2) import decaf.Framework import cca.ports.GoPort if __name__ == ‘__main__’: decaf = decaf.Framework.Framework() server = decaf.createInstance( “HelloServer.Component”, “HelloServerInstance”); client = decaf.createInstance( “HelloClient.Component”, “HelloClientInstance”);

GKK 31 CASC HelloDriver.py (2/2) decaf.connect(client,”HelloServer”, server,”HelloServer”) port = decaf.lookupPort(client, “GoPort”) go = cca.ports.GoPort.GoPort(port) go.go() decaf.destroyInstance(server) decaf.destroyInstance(client)

GKK 32 CASC HelloDriver.py (1/2) import decaf.Framework import cca.ports.GoPort if __name__ == ‘__main__’: decaf = decaf.Framework.Framework() server = decaf.createInstance( “HelloServer.Component”, “HelloServerInstance”); client = decaf.createInstance( “HelloClient.Component”, “HelloClientInstance”); What’s non-standard?

GKK 33 CASC HelloDriver.py (2/2) decaf.connect(client,”HelloServer”, server,”HelloServer”) port = decaf.lookupPort(client, “GoPort”) go = cca.ports.GoPort.GoPort(port) go.go() decaf.destroyInstance(server) decaf.destroyInstance(client) What’s non-standard?

GKK 34 CASC Outline l High Level Discussion cca.sidl & decaf.sidl in detail l Implementing the framework l Implementing “Hello World” l Feedback into the CCA spec

GKK 35 CASC Feedback about CCA Spec l minimal u to the point of being unusable u cannot implement “Hello World! as is l doesn’t standardize driving from main()  More people probably care about scripted assembly than GUIs… and it scales better! l no create/bind/go/destroy in core spec l Recommend a cca.Framework interface l Recommend looking at Babel’s SIDL::Loader

GKK 36 CASC Babel is Ready for CCA l Demonstrated language independent CCA components. l Not necessarily Bug Free. l Babel’s firewall between interface and implementation forces better software design l Is CCA ready for Babel?

GKK 37 CASC The End

GKK 38 CASC Work performed under the auspices of the U. S. Department of Energy by the University of California, Lawrence Livermore National Laboratory under Contract W-7405-Eng-48 UCRL-PRES Nov 2001