CORBA Programming for Ada95

CORBA Programming for Ada95

Real-Time and Non-Real-Time CORBA Programming for Ada95 Brad Balfour Objective Interface 13873 Park Center Road, Suite 360 Herndon, VA 20171-3247 703/295-6500 http://www.ois.com/ [email protected] [email protected] Tutorial Goals Understand the goals and rationale behind CORBA and its usage Gain an introduction to the use of CORBA in software development effort Become familiar with both the basics of CORBA through specific examples of the use of ORBexpress Become familiar with the specific additional issues introduced by the combination of real- time applications and CORBA Be able to discuss the advantages and disadvantages of CORBA Be able to discuss the technologies and issues of 10/1/00real-time CORBA ©2000 Objective Interface Systems, Inc. 2 Assumed Prerequisites Familiarity with Ada 95 and at least one Ada 95 compiler No knowledge of: CORBA Distributed Object Computing is needed nor assumed 10/1/00 ©2000 Objective Interface Systems, Inc. 3 Questions How many managers? How many engineers? Using? Ada 83? Ada 95? C? C++? Java? Others? Any CORBA experience? Any experience building distributed systems? Any object-oriented experience? 10/1/00 ©2000 Objective Interface Systems, Inc. 4 Who is Objective Interface? Leading Real-Time CORBA vendor Provider of ORBexpress for Ada 95 Provider of ORBexpress Real-Time for Ada 95 Key contributors to the CORBA standard Co-authors of the original IDL to Ada mapping Key submitters and Co-authors of the Real-Time CORBA standard Active contributors to other OMG standardization efforts 10/1/00 ©2000 Objective Interface Systems, Inc. 5 Disclaimer (and Fine Print) Objective Interface is an ORB vendor On the positive side: We speak from experience We were part of the group that created the Ada mapping for the CORBA standard We’ve been in the ORB business since 1995 We are one of five teams that submitted proposals for the Real-Time CORBA standard and are actively writing the consolidated submission On the negative side: We are not “neutral” 10/1/00 ©2000 Objective Interface Systems, Inc. 6 Notes/Sidebars Icons for Important Basics Advanced Topics Implementation Notes/ ORB internals ORBexpress Specific Topics Ada Specific Notes Performance Notes 10/1/00 ©2000 Objective Interface Systems, Inc. 7 Tutorial Topics Section I: Introduction Section II: Overview of CORBA Section III: IDL Section IV: Client Development Section V: Server Development Section VI: Multi-Threaded CORBA Section VII: CORBA Performance Section VIII: Real-Time CORBA 10/1/00 ©2000 Objective Interface Systems, Inc. 8 Section II — Overview CORBA Concepts What CORBA Provides Overview of the CORBA Development Process ORB Tool Components CORBA Runtime View Overview 10/1/00 ©2000 Objective Interface Systems, Inc. 9 CORBA Concepts What are Objects ? Fundamentally: Objects Communicate IDL is the Key CORBA Clients and Servers CORBA Functionality When/Where to Use Benefits to Application Developers 10/1/00 ©2000 Objective Interface Systems, Inc. 10 What are Objects ? (according to the OMG) Reusable self contained components of a business computing model Live blobs of intelligence and data that can be combined into an infinite number of lego-like arrangements Objects represent familiar, real-world things ImplementationsImplementations of of an an IDL IDL interface interface that that are are containedcontained in in Servers Servers and and accessed accessed by by Clients Clients 10/1/00 ©2000 Objective Interface Systems, Inc. 11 Fundamentally: Objects Communicate Objects invoke operations on other objects and supply operation implementations If they are not in the same process, then they need a way to communicate! How could they communicate? Roll your own communication (e.g., sockets) DCE (not an OO approach) Microsoft’s DCOM [Distributed Component Object Model] (on windows only) OMG’s distributed object model called: Common Object Request Broker Architecture 10/1/00 ©2000 Objective Interface Systems, Inc. 12 IDL is the Key Provides the glue to attach the object to the software bus OMG’s Interface Definition Language (IDL) Specifies interfaces to remote objects Part of the CORBA specification Fully Object-Oriented A declarative language mapped to modern programming languages Ada 95, C, C++, COBOL, Eiffel, Java, Smalltalk,... LanguageLanguage NeutralNeutral InterfaceInterface (API)(API) 10/1/00 ©2000 Objective Interface Systems, Inc. 13 CORBA Clients and Servers Basic CORBA Runtime Architecture (Diagram) Client Server Object Request Object Request Broker Library Broker Library Network ClientClient sendssends aa requestrequest toto thethe serverserver Server receives request from Client Server sends a reply to the Client Client gets reply from the Server 10/1/00 ©2000 Objective Interface Systems, Inc. 14 CORBA Functionality Application Common CodeCode youyou Objects Facilities Domain write SpecificSpecific Object Request Broker ORBexpressexpress CORBACORBA 2.02.0 CompliantCompliant ORB Domain IndependentIndependent Object Services 10/1/00 ©2000 Objective Interface Systems, Inc. 15 When/Where to Use To Connect multiple H/W, OSs, & Languages Unix, Windows 95/NT, OpenVMS, VxWorks Ada 95 ↔ C++ ↔ Java ↔ Smalltalk ↔ C ↔ … To distribute applications on object boundaries TheThe Approach: Approach: OOOO Interfaces Interfaces (APIs), (APIs), Abstraction, Abstraction, Inheritance, Inheritance, Polymorphism Polymorphism TheThe Approach Approach Provides: Provides: CommunicationCommunication by by converting converting data data and and messages messages to to a a common common format format (IIOP)(IIOP) ApplicationsApplications written written as as if if the the other other side side were were using using the the same same technology technology 10/1/00 ©2000 Objective Interface Systems, Inc. 16 Benefits to Application Developers CORBA removes the need Raises the level of for abstraction Socket Level Programming Moves infrastructure Defining a client/server support to COTS vendors protocol Results: Defining a message format No more ‘stove pipe’ Marshalling of data applications Demarshalling data upon Allows Ada and other return from call languages to cooperate on an Saves developer’s time equal footing Reduces the need for bindings to GUIs, databases, etc. 10/1/00 ©2000 Objective Interface Systems, Inc. 17 What CORBA Provides A middleware infrastructure for providing N-tier distributed systems Seamless connectivity between: hardware architectures operating systems network transports programming languages Location and access transparency 10/1/00 ©2000 Objective Interface Systems, Inc. 18 Overview of the CORBA Development Process The basic question answered in this section: How are CORBA applications created? Things to think about: How does this differ from the process of creating a non-distributed Ada 95 application? What aspects of the process differ depending on the Ada 95 toolset used? What aspects of the process differ if the clients as servers are built by different teams? 10/1/00 ©2000 Objective Interface Systems, Inc. 19 Diagram of Process IDL Source Code idl2ada SpecSpec FilesFiles&& IncompleteIncomplete CompleteComplete BodiesBodies ImplementationImplementation BodiesBodies ORBexpress Libraries (object code) Ada 95 Compiler linker CompletedCompleted ImplementationImplementation Bodies,Bodies, ServerServer Mainline, Client Client Server 10/1/00 ©2000 Objective Interface Systems, Inc. 20 Definitions Interface: The main OO construct in IDL. Defines an object class. Contains attributes, operations and associated data types and exceptions Object: An occurrence of an interface. All objects are accessed by reference Object Implementation: An instance of an interface’s implementation. Specifically a variable of the type Interface_Name.Impl.Object 10/1/00 ©2000 Objective Interface Systems, Inc. 21 Definitions [2] Object Reference: A distributed, network smart location transparent pointer. Also known as an IOR (Interoperable Object Reference) Server (mainline): A container of Object Implementations. An executable Ada 95 program containing Object Implementations. Client: Any program that uses CORBA IDL and Object References to execute operations on remote objects. A program (process) that uses references (of type Interface_Name.Ref) to invoke operations or set attributes. 10/1/00 ©2000 Objective Interface Systems, Inc. 22 IDL Source Code idl2ada SpecSpec Files Files&& CompleteComplete IncompleteIncomplete Bodies ImplementationImplementation Bodies Step 1: Create BodiesBodies ORBexpress Libraries (object code) Ada 95 IDL Source Compiler IDL Source linker CompletedCompleted ImplementationImplementation Bodies,Bodies, Server Server Mainline, Client IDL: Interface Definition Language Mainline, Client Client Server It is the OMG standard for defining a language neutral Application Programming Interface (API) Details will be presented in Section II of the course and are in Chapter 3 of the manual Is used to describe the services, attributes and data types that an Object in a Server provides to Clients Syntax similar to C++/Java. Semantics similar to Ada 95 IDL may be created by or provided to team IDLIDL interfaces interfaces typically typically describe describe a a distributed distributed (network) (network) interface interface 10/1/00 ©2000 Objective Interface Systems, Inc. 23 IDL Source Code idl2ada SpecSpec Files Files&& CompleteComplete IncompleteIncomplete Bodies ImplementationImplementation Bodies Step 2: Translate

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    86 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us