Common Component Architecture (CCA)
E N D
Presentation Transcript
Common Component Architecture (CCA) Balaprasuna Chennupati Amit Karnik 20-MAR-2002
Outline • Motivation and History • Relationship to Existing Standards • Design Goals • Architectural Overview • SIDL • CCA Ports • CCA Services • Implementations • Example
Motivation • High performance computing (HPC) exhibits the following • Simulations are increasingly complex • Acute need for code reuse and flexibility • Combines multi-disciplinary expertise • Rapid application development and change • Dynamic attachment capabilities • Requires distributed execution • Fast connections and parallel interactions
History of CCA • Developed by the CCA forum (NOV 98) constituted of • National energy laboratories like Argonne, Lawrence Berkley, Lawrence Livermore, Los Almos, Oak Ridge, Sandia and • Research laboratories from Indiana Univ. and Univ. of Utah • Released Version 0.5 in Dec 1999
Relationship to Other Standards • Microsoft COM and ActiveX • Provides component interoperability on Windows platform with language-independence • Lacks abstractions for parallel and scientific computing data types • ex. Complex numbers, Dynamic multiD arrays • Scientific Computing on Windows is not very popular
Relationship to Other Standards • Sun JavaBeans and EJB • Cross-platform component architecture based on the Java programming language • Although JNI supports language interoperability - leads to intolerable performance penalty (JVM) • Composition only by events/listeners • CCA shares a similar event subscribe model for event-notification and provides more…
Relationship to Other Standards • CORBA 2.0 • Cross-language, cross-platform distributed object model • Lacks an explicit component model • No abstractions for scientific data types • Overhead of communication through the ORB – leads to performance penalty • No concept of attaching two parallel components together
Design Goals for CCA • Should provide language and platform independence (esp. C, C++, Fortran) • Support for tightly coupled direct & loosely coupled distributed component communication • Allow dynamic component plug ability • Represent the abstractions and data types such as complex nos. and dynamic multiD arrays
Architectural Overview [ARM99]
Architectural Overview • Scientific IDL (SIDL) – used to define inputs/outputs for components • Repository API – used to deposit and retrieve SIDL definitions • CCA Ports – enable component interactions • CCA Services – services provided by the framework • Configuration API – supports interaction between components and builders
SIDL • Scientific Interface Definition Language • High level description language • Provides for scientific data types • Provides seamless language interoperability by hiding language dependency • Currently mappings to C, C++, Fortran 77/90, Python, Java
SIDL • Leverages existing IDL technologies and language mappings (CORBA, Java) • Fortran mapping similar to CORBA’s C mapping except, SIDL classes and interfaces map into Fortran integers • SIDL-to-language bindings use static IDL stubs and skeletons
SIDL - Example interface Component { void setServices(in Services svc);}; interface ComponentID{ string toString();}; }; // end package gov.cca package gov.cca { interface Port {}; interface PortInfo{ string getType(); string getName(); string getProperty(in string name);}; interface Services { Port getPort(in string name); Port getPortNonblocking(in string name); void registerUsesPort(in PortInfo name_and_type); void unregisterUsesPort(in string name); void addProvidesPort(in Port inPort, in PortInfo name); void removeProvidesPort(in string name); ComponentID getComponentID();};
Ports • Based on interactions limited to pipelining I/O • Define interactions between tightly coupled parallel components as well as loosely coupled remote components • Fast communication and scalable performance • Interaction using the very same interface in either of the connection types • Support for attaching two parallel components together
Ports • JavaBeans components register themselves as listeners and are notified using events • CCA uses Provides/Uses design pattern • CORBA 3.0 model proposes both Events and Provides/Uses interface exchange mechanism
Ports • Provides/Uses interface design pattern • Direct component interface connection for HPC • Distributed connections through a proxy • Two types of ports • Provides port : interface that a component provides to other components • Uses port : interface that has methods which the component wants to call on other components
Ports • Provides ports listen to calls on their functions called by other components through their Uses ports • Uses ports maintain a list of listeners • Component interaction is achieved by registering the Provides port as a listener of a Uses port of another component • A call on a method in the Uses port of one component results in calls to the corresponding member function on each listener resulting in zero or more invocations
Ports [ARM99]
Direct-Connect Ports • Used to achieve HPC in CCA • Call translates to a single function call • Only overhead is incurred due to the SIDL bindings (2-3 function calls) • Achieved by directly passing the Provides port supplied by one component as a Uses port for another component
Collective Ports • Allows interactions between two parallel components or a serial and a parallel one • Provides/Uses port interfaces are available to all threads and processes of the component • CCA standard does not restrict the means of sharing (shared or distributed memory models)
Services • Presents framework abstraction and defines minimal set of services for CCA compliance • Provides • Creation of CCA ports • Access to CCA ports • Additional facilities to handle naming, relationship management, error handling, querying
CCA with CORBA 3.0 • CORBA 3.0 introduces the concept of the provides/uses design pattern making CCA components CORBA 3.0-compliant • Thus, CCA is a potential piece to sit over CORBA 3.0 • However there is no CORBA 3.0 implementation from any vendor currently
CCA Implementations • CCAFFEINE from Sandia National Labs • CCA Fast Framework Example In Need of Everything • Assumes message passing environment • Implemented in C++ and allows graphical component composition • CCAT from Indian Univ. • Service based architecture using Java RMI and Globus NEXUS
CCA Implementations • XCAT from Indiana Univ • Grid enabled framework of CCA based on Globus • Uses RMI and XSOAP
Example • ConsumerPort package gov.cca.eg.port; public interface StringConsumerPort extends gov.cca.Port { public void setString(String s) throws Exception; }
Example • TimeProducerPort package gov.cca.eg.port; public interface TimeProducerPort extends gov.cca.Port { public String getTime(); }
Example • TimeStamper package gov.cca.eg.component; public class TimeStamper implements gov.cca.Component, gov.cca.eg.port.StringConsumerPort { gov.cca.Services svc; gov.cca.eg.port.StringConsumerPort out; gov.cca.PortInfo outInfo; gov.cca.eg.port.TimeProducerPort time; gov.cca.PortInfo timeInfo; public TimeStamper(){ }
Example public void setServices(gov.cca.Services svc) { gov.cca.eg.port.StringConsumerPort stringer =(gov.cca.eg.port.StringConsumerPort) this; svc.addProvidesPort(stringer, svc.createPortInfo("in0", "StringConsumerPort", null)); svc.registerUsesPort(outInfo = svc.createPortInfo("out0", "StringConsumerPort", null)); svc.registerUsesPort(timeInfo = svc.createPortInfo("time0", "TimeProducerPort", null)); }
Example public void setString(String s) { out = (gov.cca.eg.port.StringConsumerPort)svc.getPort("out0"); time = (gov.cca.eg.port.TimeProducerPort)svc.getPort("time0"); out.setString(s+"@"+time.getTime()); svc.releasePort("out0"); svc.releasePort("time0"); } }
References • [ARM99] Toward a Common Component Architecture for High Performance Scientific Computing. Armstrong et al • [ALL00] The CCA Core Specification In A Distributed Memory SPMD Framework. Allan et al • www.cca-forum.org • www.cs.ucsd.edu/classes/sp00/cse225/notes/jeff/talk.html • http://www.extreme.indiana.edu/ccat/ • http://www.cca-forum.org/ccafe/ccafe.html • http://www.acl.lanl.gov/cca-forum/
Take-Away points • Standard for interoperability among HPC components • Fast connections and parallel collective interactions using Ports • Scientific abstractions for specifying component interfaces using SIDL • CORBA 3.0 compliant