CCA Common Component Architecture CCA Forum Tutorial Working Group Contributors: Language Interoperability Using Gary.

Slides:



Advertisements
Similar presentations
Message Passing Vs Distributed Objects
Advertisements

Institute of Computer Science AGH Towards Multilanguage and Multiprotocol Interoperability: Experiments with Babel and RMIX Maciej Malawski, Daniel Harężlak,
CCA Common Component Architecture CCA Forum Tutorial Working Group Language Interoperable.
Gary Kumfert Center for Applied Scientific Computing is not a framework… but it makes frameworks better This work was performed under the auspices of the.
Common Object Request Broker Architecture (CORBA) By: Sunil Gopinath David Watkins.
Tammy Dahlgren, Tom Epperly, Scott Kohn, and Gary Kumfert Center for Applied Scientific Computing Common Component Architecture Working Group October 3,
CS 4800 By Brandon Andrews.  Specifications  Goals  Applications  Design Steps  Testing.
6/11/2015Page 1 Web Services-based Distributed System B. Ramamurthy.
Divorcing Language Dependencies from a Scientific Software Library Gary Kumfert, with Scott Kohn, Jeff Painter, & Cal Ribbens LLNLVaTech.
TerascaleSimulation Tools and Technologies Tutorial: Presenter Institution.
Inheritance and Polymorphism CS351 – Programming Paradigms.
CORBA Programming Using ACE/TAO
Lecture Roger Sutton CO530 Automation Tools 5: Class Libraries and Assemblies 1.
Copyright © 2003 ProsoftTraining. All rights reserved. Distributed Object Computing Using Java and CORBA.
.NET Framework & C#.
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.
1 3. Implementing Web Services 1.Create SOAP proxy interfaces and WSDL based service descriptions 2.Register/publish services 3.Stores service descriptions.
Understanding the CORBA Model. What is CORBA?  The Common Object Request Broker Architecture (CORBA) allows distributed applications to interoperate.
CORBA Celsina Bignoli Enterprise Computing Corporation have similar computing environments: –mixed set of HW platforms –a mixed set.
CCA Common Component Architecture CCA Forum Tutorial Working Group Language Interoperable.
A Hybrid Decomposition Scheme for Building Scientific Workflows Wei Lu Indiana University.
Tamara Dahlgren, Tom Epperly, Scott Kohn, & Gary Kumfert Center for Applied Scientific Computing.
CCA Common Component Architecture 1**1** Components for High Performance Computing: Common Component Architecture Rob Armstrong & CCA Working.
1 CCA Meeting, Januray 25th 2007 Supporting the Master-Worker Paradigm in the Common Component Architecture Hinde Lilia Bouziane, Christian Pérez, Thierry.
CCA Common Component Architecture CCA Forum Tutorial Working Group 1 Welcome to the Common.
Java Introduction to JNI Prepared by Humaira Siddiqui.
Introduction to Programming David Goldschmidt, Ph.D. Computer Science The College of Saint Rose Java Fundamentals (Comments, Variables, etc.)
Tammy Dahlgren with Tom Epperly, Scott Kohn, and Gary Kumfert Center for Applied Scientific Computing Common Component Architecture Working Group October.
Grid Computing Research Lab SUNY Binghamton 1 Plans for Babelizing XCAT-C++ Madhu Govindaraju Kenneth Chiu.
CCA Common Component Architecture CCA Forum Tutorial Working Group This work is licensed.
Ch 1. A Python Q&A Session Spring Why do people use Python? Software quality Developer productivity Program portability Support libraries Component.
CCA Common Component Architecture CCA Forum Tutorial Working Group Introduction to the Ccaffeine.
Advanced BioPSE NCRR Dynamic Compilation Joint Session #1: Advanced BioPSE/SCIRun.
Grid Computing Research Lab SUNY Binghamton 1 XCAT-C++: A High Performance Distributed CCA Framework Madhu Govindaraju.
Components for Beam Dynamics Douglas R. Dechow, Tech-X Lois Curfman McInnes, ANL Boyana Norris, ANL With thanks to the Common Component Architecture (CCA)
1 Cisco Unified Application Environment Developers Conference 2008© 2008 Cisco Systems, Inc. All rights reserved.Cisco Public Introduction to Etch Scott.
Center for Component Technology for Terascale Simulation Software CCA is about: Enhancing Programmer Productivity without sacrificing performance. Supporting.
SCIRun and SPA integration status Steven G. Parker Ayla Khan Oscar Barney.
Extreme! Computing Lab, Dept. of Computer Science, Indiana University 1 Programming the Grid with Components Madhu Govindaraju Aleksander Slominski Dennis.
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,
Update on CORBA Support for Babel RMI Nanbor Wang and Roopa Pundaleeka Tech-X Corporation Boulder, CO Funded by DOE OASCR SBIR.
Core Java Introduction Byju Veedu Ness Technologies httpdownload.oracle.com/javase/tutorial/getStarted/intro/definition.html.
Inheritance. Inheritance - Introduction Idea behind is to create new classes that are built on existing classes – you reuse the methods and fields and.
CCA Common Component Architecture CCA Forum Tutorial Working Group CCA Status and Plans.
CCA Common Component Architecture CCA Forum Tutorial Working Group 1 Welcome to the Common.
Getting Started with SIDL using the ANL SIDL Environment (ASE) ANL SIDL Team MCS Division, ANL April 2003 The ANL SIDL compilers are based on the Scientific.
Tammy Dahlgren, Tom Epperly, Scott Kohn, & Gary Kumfert.
Java Programming, Second Edition Chapter Twelve Advanced Inheritance Concepts.
CCA Common Component Architecture CCA Forum Tutorial Working Group Common Component Architecture.
Gary Kumfert & Scott Kohn Tammy Dahlgren, Tom Epperly, Steve Smith, and Bill Bosl Introducing...
CCA Common Component Architecture CCA Forum Tutorial Working Group Writing Components.
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.
Ganga/Dirac Data Management meeting October 2003 Gennady Kuznetsov Production Manager Tools and Ganga (New Architecture)
CCA Common Component Architecture CCA Forum Tutorial Working Group Common Component Architecture.
CCA Common Component Architecture CCA Forum Tutorial Working Group A Simple CCA Component.
CSE775 - Distributed Objects, Spring 2006
Chapter 5 Remote Procedure Call
Introduction to C# AKEEL AHMED.
Java Programming Language
Performance Technology for Parallel Component Software
Distributed System using Web Services
Distributed System using Web Services
Common Component Architecture (CCA)
Plug-In Architecture Pattern
Presentation transcript:

CCA Common Component Architecture CCA Forum Tutorial Working Group Contributors: Language Interoperability Using Gary KumfertTammy Dahlgren, Tom Epperly, & Scott Kohn

2 Common Component Architecture CCA What I mean by “Language Interoperability” Simulation Framework (C) Solver Library (C++) Numerical Routines (f77) Scripting Driver (Python) Visualization System (Java) Callback Handlers (Python) Callback Handlers (Python)

3 Common Component Architecture CCA One reason why mixing languages is hard Native cfortran.h SWIG JNI Siloon Chasm Platform Dependent C C++ f77 f90 Python Java

4 Common Component Architecture CCA Babel makes all supported languages peers C C++ f77 f90 Python Java Once a library has been “Babelized” it is equally accessable from all supported languages This is not an LCD Solution!

5 Common Component Architecture CCA Babel Module’s Outline Introduction Babel Basics –What Babel does and how –How to use Babel –Concepts needed for future modules Babel & CCA –History & Current directions –Decaf Framework –Building language independent CCA components –Demo

6 Common Component Architecture CCA Babel’s Mechanism for Mixing Languages Code GeneratorRuntime Library SIDL interface description Babel Compiler C++ F77 F90 Python C XML Matlab? Java Babel Runtime Application

7 Common Component Architecture CCA greetings.sidl: A Sample SIDL File version greetings 1.0; package greetings { interface Hello { void setName( in string name ); string sayIt ( ); } class English implements-all Hello { } } version greetings 1.0; package greetings { interface Hello { void setName( in string name ); string sayIt ( ); } class English implements-all Hello { } }

8 Common Component Architecture CCA Library Developer Does This... `babel --server=C++ greetings.sidl` Add implementation details Compile & Link into Library/DLL SIDL interface description Babel Compiler C++ Skels C++ Impls IORs C++ Stubs libgreetings.so

9 Common Component Architecture CCA Adding the Implementation string greetings::English_impl::sayIt() throw () { // DO-NOT-DELETE splicer.begin(greetings.English.sayIt) string msg(“Hello “); return msg + d_name + “!”; // DO-NOT-DELETE splicer.end(greetings.English.sayIt) } string greetings::English_impl::sayIt() throw () { // DO-NOT-DELETE splicer.begin(greetings.English.sayIt) string msg(“Hello “); return msg + d_name + “!”; // DO-NOT-DELETE splicer.end(greetings.English.sayIt) } namespace greetings { class English_impl { private: // DO-NOT-DELETE splicer.begin(greetings.English._impl) string d_name; // DO-NOT-DELETE splicer.end(greetings.English._impl) namespace greetings { class English_impl { private: // DO-NOT-DELETE splicer.begin(greetings.English._impl) string d_name; // DO-NOT-DELETE splicer.end(greetings.English._impl)

10 Common Component Architecture CCA Library User Does This... `babel --client=F77 greetings.sidl` Compile & Link generated Code & Runtime Place DLL in suitable location SIDL interface description Babel Compiler IOR Headers F77 Stubs libgreetings.so Babel Runtime Application

11 Common Component Architecture CCA Babel Module’s Outline Introduction Babel Basics –What Babel does and how –How to use Babel –Concepts needed for future modules Babel & CCA –History & Current directions –Decaf Framework –Building language independent CCA components –Demo

12 Common Component Architecture CCA History of Babel & CCA XCAT (Indiana) SciRUN (Utah) CCAFFEINE (SNL) Babel (LLNL) Tutorial Frameworks Language Interoperability Applications Data MxN Decaf Babelized Frameworks CCAFFEINE t

13 Common Component Architecture CCA Decaf Details & Disclaimers Babel is a hardened tool Decaf is an example, not a product –Demonstrate Babel’s readiness for “real” CCA frameworks –Maintained as a stopgap –Distributed in “examples” subdirectory of Babel Decaf has no GUI

14 Common Component Architecture CCA The CCA Spec is a SIDL File version cca 0.6; package cca { interface Port { } interface Component { void setServices( in Services svcs ); } interface Services { Port getPort( in string portName ); registerUsesPort( /*etc*/ ); addProvidesPort( /*etc*/ ); /*etc*/ version cca 0.6; package cca { interface Port { } interface Component { void setServices( in Services svcs ); } interface Services { Port getPort( in string portName ); registerUsesPort( /*etc*/ ); addProvidesPort( /*etc*/ ); /*etc*/

15 Common Component Architecture CCA The CCA from Babel’s POV

16 Common Component Architecture CCA How I Implemented Decaf wrote decaf.sidl file `babel --server=C++ cca.sidl decaf.sidl` Add implementation details Compile & Link into Library/DLL cca.sidl & decaf.sidl Babel Compiler C++ Skels C++ Impls IORs C++ Stubs libdecaf.so

17 Common Component Architecture CCA An Extra Babel Tip “precompile” SIDL into XML store XML in a directory Use Babel’s –R option to specify search directories cca.sidl Babel Compiler XML Type Repository decaf.sidl Babel Compiler Skels Impls IORs Stubs

18 Common Component Architecture CCA How to Use CCA Components and Decaf Decaf doesn’t provide a GUI Simply program by explicitly –creating components –connecting points –envoking the “goPort” Use Babel as needed to generate bindings in your language of choice Make sure Babel Runtime can locate DLLs for Decaf and any CCA components.

19 Common Component Architecture CCA To Use the Decaf Framework `babel --client=Java –Rrepo function.sidl` Compile & Link generated Code & Runtime Place DLLs in suitable location SIDL files Babel Compiler IOR Headers Java Stubs Babel Runtime Application Repo (XML) component1.so libdecaf.so

20 Common Component Architecture CCA Example: A Driver in Python import decaf.Framework import cca.ports.GoPort if __name__ == ’__main__’: decaf = decaf.Framework.Framework() server = decaf.createInstance( ”ServerName”, ”HelloServer.Component”, 0 ) client = decaf.createInstance( ”ClientName”, ”HelloClient.Component”, 0 ) decaf.connect(server,”HelloPort”, client,”HelloPort” ) port = decaf.lookupPort(client,”GoPort”) go = cca.ports.GoPort.GoPort( port ) go.go() import decaf.Framework import cca.ports.GoPort if __name__ == ’__main__’: decaf = decaf.Framework.Framework() server = decaf.createInstance( ”ServerName”, ”HelloServer.Component”, 0 ) client = decaf.createInstance( ”ClientName”, ”HelloClient.Component”, 0 ) decaf.connect(server,”HelloPort”, client,”HelloPort” ) port = decaf.lookupPort(client,”GoPort”) go = cca.ports.GoPort.GoPort( port ) go.go()

21 Common Component Architecture CCA How to Write and Use Babelized CCA Components Define “Ports” in SIDL Define “Components” that implement those Ports, again in SIDL Use Babel to generate the glue-code Write the guts of your component(s)

22 Common Component Architecture CCA SIDL 101: Classes & Interfaces SIDL has 3 user-defined objects –Interfaces – APIs only, No Implementation –Abstract Classes – 1+ methods unimplemented –Concrete Classes – All methods are implemented Inheritance (like Java/Objective C) –Interfaces may extend Interfaces –Classes extend no more than one Class –Classes can implement multiple Interfaces Only Concrete Classes can be Instantiated

23 Common Component Architecture CCA SIDL 101: Methods and Arguments Methods are public virtual by default –static methods are not associated with an object instance –final methods can not be overridden Arguments have 3 parts –Mode: can be in, out, or inout (like CORBA) –Type: one of (bool, char, int, long, float, double, fcomplex, dcomplex, array, enum, interface, class ) –Name:

24 Common Component Architecture CCA How to Write A Babelized CCA Component (1/3) Define “Ports” in SIDL –CCA Port = a SIDL Interface extends cca.Port version tutorial 1.0; package tutorial { interface Function extends cca.Port { double evaluate( in double x ); } version tutorial 1.0; package tutorial { interface Function extends cca.Port { double evaluate( in double x ); }

25 Common Component Architecture CCA How to Write A Babelized CCA Component (2/3) Define “Components” that implement those Ports –CCA Component = SIDL Class implements cca.Component (& any provided ports) class LinearFunction implements tutorial.Function, cca.Component { double evaluate( in double x ); void setServices( in cca.Services svcs ); } class LinearFunction implements tutorial.Function, cca.Component { double evaluate( in double x ); void setServices( in cca.Services svcs ); } class LinearFunction implements-all tutorial.Function, cca.Component { }

26 Common Component Architecture CCA How to Write A Babelized CCA Component (3/3) Use Babel to generate the glue code –`babel --server=C –Rrepo function.sidl` Add implementation Details SIDL interface description Babel Compiler C Skels C Impls IORs C Stubs libfunction.so