1 / 90

CORBA: achtergrond, architectuur en implementaties

CORBA: achtergrond, architectuur en implementaties. Met dank aan Aart van Halteren, KPN Research. Heterogeneity. Programming languages 3 million programmers write COBOL for a living 1.6 million use Visual Basic, 1.1 mln C and C++ Operating systems

aislin
Download Presentation

CORBA: achtergrond, architectuur en implementaties

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CORBA:achtergrond, architectuur en implementaties Met dank aan Aart van Halteren, KPN Research

  2. Heterogeneity • Programming languages • 3 million programmers write COBOL for a living • 1.6 million use Visual Basic, 1.1 mln C and C++ • Operating systems • Unix, MVS, MacOS, NT, Windows 2000, Windows CE, PalmOS,... • What about the pager, mobile phone, set-top box? • Networks • ATM, IP, Ethernet, SS7, Appletalk, USB, .... • Proprietary: networks in cars.

  3. There must be consensus on interoperability Focus on Interoperability • There will not be consensus on hardware platforms; • There will not be consensus on operating systems; • There will not be consensus on network protocols; • There will not be consensus on application formats.

  4. Creating consensus... • Object Management Group • mission • organisation • process • Object Management Architecture ObjectRequest Broker

  5. Focus on easy usable (“off the shelf”) standard components OMG’s Mission • Co-operative creation and promulgation of object-oriented standards based on commercially available software, guaranteeing: • reusability of components; • interoperability & portability.

  6. Platform Technology Committee Domain Technology Committee Architecture Board OMG’s Organisation Board of Directors • Policies & Procedures • End-User Requirements • Metrics • Security SIG • Finance • Business Objects • Healthcare • Manufacturing • Multimedia/Commerce • Telecommunications • ORB & Object Services • Real-Time • ...

  7. OMG’s process outline • Write Request for Proposal (RFP) • 3 week rule • Issue RFP • Receive Letter of Intent (LOI) • 60 days • Receive Initial Submission • 12 weeks • Review submission + feedback • Receive Final submission • Fax/Email Vote • 10-14 weeks • 2/3 majority • Product availability check (BoD) • New OMG standard! module Pricing { interface UsageCalc { ... };

  8. Object Management Architecture DomainInterfaces CORBAfacilities Application Interfaces Object Request Broker CORBAservices

  9. Object Request Broker CORBA services • Formerly: Common Object Services Specificication (COSS) • Generic object services: • Event Service • Naming Service • Object Transaction Service • Lifecycle Service • .... • Specifications implemented by several vendors

  10. Object Request Broker CORBA facilities • Formerly: Common Facilities • Object framework • Mobile Agent Facility • Calendar Facility • ... • Specifications implemented by several vendors

  11. Object Request Broker Domain interfaces • Similar to CORBA facilities • Domain specific • Telecom • Healthcare • Manufacturing • Finance • ... • Examples • “Control and Management of A/V Streams” (telecom) • General Ledger Facility (finance) • Negotiation Facility (ec)

  12. Object Request Broker Application objects • No standardisation, but canditates • Enterprise and application specific • “In-house” development

  13. Object Management Architecture Non-standardizedapplication-specific interfaces Verticaldomain-specific interfaces Horizontalfacility interfaces DomainInterfaces CORBAfacilities Application Interfaces Object Request Broker CORBAservices General service interfaces

  14. CORBA 2.x CORBA: The middleware that is everywhere http://www.omg.org/.. ../library/c2indx.html ../corba/corbaiiop.htm ../cgi-bin/doclist.pl http://www.cs.wustl.edu/~schmidt/

  15. Status Object Request Broker • Initial revision adopted in October 1991 • Revisions • 2.0, July 1995 • 2.1, August 1997 • 2.2, February 1998 • 2.3, June 1999

  16. Status (continued) • Main areas of CORBA 2.2: • Object model • ORB architecture • OMG IDL • Interoperability (DCE, OLE/COM) • Language mappings(C, C++, Smalltalk, Cobol, Ada, Java) • Major additions of CORBA 2.3 • value types • portable object adapter • interoperability with DCOM • GIOP 1.2

  17. Distributed Computing • distribution of resources and work • a task is performed by co-operating computers • resources are shared among tasks • two categories • distribution by nature • distribution by design

  18. Distributed Object-Oriented Systems Object-Orientation DistributedObjects + DistributedComputing

  19. Distributed objects • objects distributed over the nework • location not important • objects interact through interfaces • invoke an action • obtain a result from the object • interface hides object implementation ‘Object X’ ‘Object Y’ ‘Object Z’ ORB

  20. OMG Interface Definition Language (IDL) C C++ Small talk Ada Cobol Java C C++ Small talk Ada Cobol Java IDL IDL IDL IDL IDL IDL IDL IDL IDL IDL IDL IDL Client Server ORB

  21. IDL types Type Complex declarator Basic type Constructed type Template type array struct union sequence string short long boolean ..... char any

  22. Example IDL module bank { interface account { readonlyattributefloat balance; void makeLodgement (in float f); void makeWithdrawal (in float f); }; interface accountManagement { exception reject {string reason;}; account newAccount (in string name) raises (reject); void deleteAccount (in account a); }; };

  23. Object Implementation CORBA 2.x object interaction Server side Client side Client

  24. CORBA 2.x object interaction Server side Client side Object Implementation Client Dynamic Invocation Client IDL Stubs ORB Interface Static Skeletons Dynamic Skeleton Object Adapter Object Request Broker Core

  25. Object Adapter CORBA 2.x static invocation Server side Client side Object Implementation Client Dynamic Invocation Client IDL Stubs ORB Interface Static Skeletons Dynamic Skeleton Object Request Broker Core

  26. CORBA 2.x dynamic client invocation Server side Client side Object Implementation Client Dynamic Invocation Client IDL Stubs ORB Interface Static Skeletons Dynamic Skeleton Object Adapter Object Request Broker Core Interface Repository

  27. Object Adapter CORBA 2.x dynamic server invocation Server side Client side Object Implementation Client Dynamic Invocation Client IDL Stubs ORB Interface Static Skeletons Dynamic Skeleton Implemen- tation Repository Object Request Broker Core Interface Repository

  28. CORBA 2.x ORB interface Server side Client side Object Implementation Client Dynamic Invocation Client IDL Stubs ORB Interface Static Skeletons Dynamic Skeleton Object Adapter Implemen- tation Repository Object Request Broker Core Interface Repository

  29. CORBA 2.x architecture Server side Client side Object Implementation Client Dynamic Invocation Client IDL Stubs ORB Interface Static Skeletons Dynamic Skeleton Object Adapter Implemen- tation Repository Object Request Broker Core Interface Repository Identical for all ORBs Per object type (IDL compiler)

  30. Chat service

  31. Involved objects ‘Server’ Broadcaster Receiver ‘Client 1’ ‘Client n’ ‘Client 1’

  32. Interactions between objects ‘Server’ Broadcaster say print print Receiver print ‘Client 1’ ‘Client n’ ‘Client 1’

  33. Receiver registers with Broadcaster sends text messages to Broadcaster receives text messages from Broadcaster and print these messages Broadcaster accepts Receivers throws exception if Receiver is already registered allows Receivers to deregister allows Receivers to set an alias (nickname) receives text messages distributes text messages to all registered receivers Requirements Interface Receiver{ ... } Interface Broadcaster{ ... }

  34. Interface receiver Interface Receiver { void print(in string message); } Interface Broadcaster{ exception AlreadyRegistered {}; exception UnknownReceiver{}; void register(in Receiver theReceiver, in string nickName) throws AlreadyRegistered; void deregister(in Receiver theReceiver) void setAlias(in string nickname, in Receiver theReceiver) void say(in string someMessage); }

  35. IDL for Receiver object interface Receiver { /** * * Print a text. * * This message is called by the chat * server on each client for * every new message. * * @param text The text to print. * **/ onewayvoid print(instring text); };

  36. IDL for Broadcaster (1) interface Broadcaster { /** * * Register a receiver (chat client). * * Chat clients must use this function to register * with the chat server (broadcaster) in order to * receive messages from the chat server. * **/ void register(inReceiver receiver, in string id, in string host, in string nick) raises(AlreadyRegistered, NickExists);

  37. IDL for Broadcaster (2) /** * * Unregister a receiver (chat client). * * Chat clients must use this function to unregister * with the chat server (broadcaster) before * they disconnect. * **/ void unregister(inReceiver receiver) raises(UnknownReceiver);

  38. IDL for Broadcaster (3) /** * * Set a receiver's nick name. * **/ void setNickName(inReceiver receiver, instring nick) raises(UnknownReceiver, NickExists); /** * * Say something to all registered chat clients. * **/ void say(instring text);

  39. Client IDL stub • Generated from IDL • Responsible for marshalling/demarshalling of parameters • Generated for a specific language mapping (e.g. C++, Java, Smalltalk, COBOL) • Known as Static Invocation interface (SII)

  40. Acting as a client (C++) // // Create ORB // CORBA_ORB_var orb = CORBA_ORB_init(argc, argv); // // Get "server" object // CORBA_Object_var obj = <obtain object reference> Broadcaster_var server = Broadcaster::_narrow(obj); // // Call Broadcaster // server->say(“Hello there!”);

  41. Acting as a client (Java) public static void main(String args[]) { try { // // Create ORB // ORB orb = ORB.init(args, props); // Create “server” object // org.omg.CORBA.Object obj = orb.string_to_object(url); Broadcaster server = BroadcasterHelper.narrow(obj); try { server.say(message); } }

  42. Static skeleton • Generated from IDL • Responsible for marshalling/demarshalling of parameters • Generated for a specific language mapping (e.g. C++, Java, Smalltalk, COBOL) • Upcall to object implementation

  43. Acting as a server (Java) import org.omg.CORBA.*; import chat.BroadcasterPackage.*; final public class Broadcaster_impl extends _BroadcasterImplBase { // // Say something to all Receivers // public void say(String text) { for(int i = 0 ; i < receiverDescSeq_.length ; i++) { try { receiverDescSeq_[i].receiver.print(text); } } }

  44. Object adapter • Registers object implementations • Generates object references • Maps object references to implementations • (De)Activation of implementations • Interacts with Implementation Repository (IR) • Several flavours • Basic Object Adapter • Object Database Adapter • Portable Object Adapter

  45. Working with the BOA import org.omg.CORBA.*; import java.io.*; import java.util.*; final public class Server { public static void main(String args[]) { try{ // Create ORB and BOA // ORB orb = ORB.init(args, props); BOA boa = ((com.ooc.CORBA.ORB)orb).BOA_init(args, props); //<... Do other init stuff here> // Run implementation // boa.impl_is_ready(null); }

  46. Implementation Repository (IR) • Stores information on object implementations • how to activate • activation policies • admission control • ...

  47. Dynamic Invocation Interface • No compilation of IDL • For building requests run-time • Uses the Interface Repository for discovering IDL definitions run-time • Slower then SII

  48. Interface Repository (IFR) • Stores IDL specifications • IDL constructs representedas objects (typeCode)

  49. ORB interface • Direct access to ORB core • Standard for every ORB • Available for both clients and implementations • Creates stringified object references

  50. Working with the ORB interface (Java) String ref = orb.object_to_string(p); System.out.println(“The IOR is: “ + ref);

More Related