340 likes | 484 Views
Object-orientation by Khoshafian and Abnous. Chap 10. Standards in OO. 서울대학교 컴퓨터공학과 객체지향시스템 연구실 SNU OOPSLA LAB 김 형 주 교수. Contents. 1. Introduction 2. Object Sharing and Interoperability 3. Understanding OMG 4. OLE 2 5. OpenDoc 6. ODMG-93 7. Summary. 1. Introduction.
E N D
Object-orientation by Khoshafian and Abnous Chap 10. Standards in OO 서울대학교 컴퓨터공학과 객체지향시스템 연구실 SNU OOPSLA LAB 김 형 주 교수 SNU, OOPSLA Lab
Contents 1. Introduction 2. Object Sharing and Interoperability 3. Understanding OMG 4. OLE 2 5. OpenDoc 6. ODMG-93 7. Summary SNU, OOPSLA Lab
1. Introduction • Object sharing and interoperability • Same or different heterogeneous machine • OMG CORBA • MS OLE 2 • CILabs OpenDoc • Next Generation Databases • SQL3 • ODMG-93 SNU, OOPSLA Lab
2. Object Sharing and Interoperability (1) • Component software • A reusable piece of s/w can be plugged into other components • Compound documents • Contain components pertaining to different applications • Located on physically distributed sites in a network • Figure 10.1 • graphics package, spreadshet, word processor, groupware • bitmap image, vector graphics, text, voice, video SNU, OOPSLA Lab
Object Sharing and Interoperability (2) • Standardization • MS OLE 2, CI Labs OpenDoc • Binary representation of the objects • Ability of components to be written in different languages • Microsoft Component Object Model (COM) • IBM System Object Model (SOM) • User interface standard • Interaction with the component document • Presentation, creation, menus, integration of parts SNU, OOPSLA Lab
Object Sharing and Interoperability (3) • Storage representation standard • Standards for storing compound document part • Hierarchical containment storage structure • Distributed and collaborative computing • Interaction of components in a distributed collaborative environment SNU, OOPSLA Lab
Major Stream Standards • Compound document sharing • MS OLE2 • CI Labs (IBM + Apple) Open Doc • MS COM • IBM SOM • Distributed/Collaborative computing • MS DCOM • IBM DSOM • OMG (SUN, HP, DEC) CORBA SNU, OOPSLA Lab
3. Understanding OMG • “To help reduce complexity, lower costs, and hasten the introduction of new software architecture” (OMG Guide, 1992) • Define the architecture for modularized software applications by defining the standard infrastructure and framework required to support such applications in a heterogeneous distributed network of computers • HP, Digital, SUN, IBM, and more 1000 computer related organizations in the world SNU, OOPSLA Lab
CORBA (1) • 3.1 CORBA Overview • Common Object Request Broker Architecture • Framework and specification for object collaboration and sharing across heterogeneous networks of machines and applications • CORBA Object Model • Object • Operations • Types • Subtyping SNU, OOPSLA Lab
Application Objects Common Facilities Object Request Broker Object Services CORBA Architecture
3.2 CORBA- Architecture • 3.2.1 Object Request Broker • Backbone of CORBA • Corba programming: • IDL + API ==> client/server object interaction • ORB clients • Applications or objects can send message to any other CORBA-compliant objects • Static interface • Precompiled IDL stubs to invoke object services • Dynamic interface • Request an ORB, retrieve its method name, dynamically invoke the object’s method • Object adaptor • Services for managing objects within an ORB server • Functionality to instantiate objects, generate and manage object references, route client requests to server methods, broadcast the presence of object servers SNU, OOPSLA Lab
Server Client Logical Request ORB A ORB B Bridge ORB-to-ORB bridging
3.2 CORBA- Architecture • 3.2.2 Application Objects • Specific to end-user application • 3.2.3 Common Facilities • General purpose components • Horizontal • Presentation of data • retrieval and storage of information • system/task management • Vertical • Health, finance, legal etc SNU, OOPSLA Lab
3.2 CORBA- Architecture • 3.2.4 Object Services • Event notification services • Interface for registering and delivering events • Persistence services • Interface for storing objects • Life-cycle management services • Define how to manage objects • Transaction services : Two phase commit protocol • Concurrency control services : Locking • Relationships services :Link • Externalization services • Object stream interface SNU, OOPSLA Lab
4. OLE 2 • Since 1993 • OLE automation allows one application to interact with and use the services of another application • MS claims • 1980 ==> personalization of computing • 1990 ==> componentization of computing • OLE2 will transform the way software is producd and used • Container, Component technology • Compound document sharing: Object Linking and Embedding • Another O/S: more than 100 API functions SNU, OOPSLA Lab
OLE2: Component Object Model • Interoperability • Marshalling: synchronous rpc mechanism In-Place Activatoin Linking Embedding Compound Document Drag and Drop Uniform Data Transfer Automation Compound Files Monikers Component Object Model SNU, OOPSLA Lab
Architecture of OLE 2 (2) • 4.2.2 OLE 2 storage model • Flie system within a file : storage,stream • Transacted storage • Incremental access • Sharable storage SNU, OOPSLA Lab
Storage Object Substorage Stream Substorage Stream Substorage Stream Substorage Stream Stream Stream Stream Substorage Substorage Stream Storage Object
Architecture of OLE 2 (3) • 4.2.3 Uniform data transfer • Uniform mechanism for transferring any type of data • 4.2.4 Drag and drop • 4.2.5 Embedding object • Component document • 4.2.6 Viewing components • Automatically store and use a graphical image of objects • 4.2.7 Linking and monikers • Moniker: location of source data and code to bind to data • 4.2.8 In-place activation • Only single window to work with the compound document • 4.2.9 Automation • Register a set of commands or functions SNU, OOPSLA Lab
5. OpenDoc (1) • CI Labs: Component Integration Laboratories • IBM and Apple (since 1994) • 5.1 Document or content-based model • A document is a structural collection of parts • 5.2 Parts : object pertaining to a different application • Root part • Content objects • 5.3 Part handlers (application programs) • Displaying the part • Editing the part • Managing storage for the part SNU, OOPSLA Lab
OpenDoc (2) • 5.4 Editors and viewers • Part editors and part viewers • 5.5 In-place editing • One context of compound document and edit in-place • 5.6 Frames and layout • Compound document parts can be wrapped with built-in frames and layouts • 5.7 Linking: Parts can be embedded in other parts • 5.8 Storage • Persistent multipart documents • concurrent accesses by multiple part handlers SNU, OOPSLA Lab
OpenDoc (3) • 5.9 Run time: the document shell for each document • the persistent storage system • the window and its associated state • the event dispatcher • an arbitration registry • 5.10 Sharing and distributed objects • Concurrently sharing compound documents • Versioning • Distributed objects: remote object invocation • DSOM SNU, OOPSLA Lab
6. Standardization for OODB: ODMG-93 • Relational • SQL, SQL-92 (SQL2), ODBC, SQL3 • Object-oriented database standard:ODMG93 • Object Design, ONTOS, O2, Versant, Objectivity, HP, POET, Itasca, Intellitic, DEC, Servio, TI, etc • Main goal : “To put forward a set of standards allowing an ODBMS customer to write portable applcations, i.e, applications that could run on more than one ODBMS product” SNU, OOPSLA Lab
6.1 The ODMG-93 Object Model • Types • One interface, several implementations • A subtype can specialize a supertype • Object identity • Literals • Atomic values , structured atomic values SNU, OOPSLA Lab
6.1 The ODMG-93 Object Model (cont’d) • Structured objects • Structure construct • Collection type • Set,Bag,List,Array • Relationships • One-to-one, one-to-many, many-to-many • Inverse of relationship SNU, OOPSLA Lab
6.2 The ODMG-93 ODL (1) • Syntax for defining interfaces • Compatible with OMG’s IDL <type definition> :: =interface <type name>[:supertype list>] { [<type_property_list>] [<property_list>] [<operations_list>] }; SNU, OOPSLA Lab
6.2 The ODMG-93 ODL (2) interface SalesPerson: Employee { extent SalesPeople; attributestring District; relationship Set<Account> Accounts inverse Account::SalesRep; relationship Set<Department> WorksIn; SalesManager Manager; ... < operations > }; SNU, OOPSLA Lab
6.3 The ODMG-93 OQL (1) • Standardize a number of OO database language concepts • Support both values and identity • Constructor type, set operator, collection expression, aggregate SNU, OOPSLA Lab
6.3 The ODMG-93 OQL (2) BNF form select <query expression> from <identifier> in <query expression> where <query expression> selectstruct(ManagerName: x.Manager.name, DepartmentName: y.Name) from x in SalesPeople, y in x.WorksIn where y.Location.City = “NY” SNU, OOPSLA Lab
6.4 The ODMG-93 C++ Bindings • Descriptions and specifications for the C++ ODL/OML constructs in the ODMG standard • C++ ODL • Binding • Through a class library • C++ OML • Classes and OQL functions SNU, OOPSLA Lab
The Step involved in generating executable applications from C++ODL C++ ODL Delcarations ODL Preprocessor Preprocessor Generated C++ Header X Source Files User Source and Header C++ Files ODBMS Data MetaData C++ Compiler ODBMS RunTime Object Code Linker Object DBMS Executable Application
6.4 OMG and ODMG-93 (1) • ODMG/OM (object model) • A superset of the OMG/OM • Interoperability and portability • ODMG/ODL (object definition language) • A superset of IDL • ORB and ODMG-93 • Object Database Adaptor • Handling client objects registered through an ORB interface SNU, OOPSLA Lab
6.4 ODMG-93 and SQL3 • Object Oriented DBMS • OQL/ODL • Relational DBMS • SQL3 • Object oriented features • Programming language features SNU, OOPSLA Lab
Summary • Object sharing and interoperability • Allow applications to share objects • Major Standards • OMG CORBA • Microsoft OLE 2 • CILab OpenDoc • Database • ODMG-93 • Provide a framework for interoperability for OODBMS applications SNU, OOPSLA Lab