Distributed Systems - PowerPoint PPT Presentation

About This Presentation
Title:

Distributed Systems

Description:

Components of distributed systems are written in different ... Infra- structure. Client side. Object Implementation. Side. IDL. Java. Client. C Object ... – PowerPoint PPT presentation

Number of Views:52
Avg rating:3.0/5.0
Slides: 38
Provided by: drmicha
Category:

less

Transcript and Presenter's Notes

Title: Distributed Systems


1
Distributed Systems
  • Topic 6
  • Resolving Heterogeneity
  • Dr. Michael R. Lyu
  • Computer Science Engineering Department
  • The Chinese University of Hong Kong

2
Outline
  • Heterogeneous Programming Languages
  • Common Object Model
  • Common Interface Definition Language
  • Programming Language Bindings
  • Heterogeneous Middleware
  • Interoperability
  • Interworking
  • Heterogeneous Data Representation
  • Standardized Data Representation
  • Application-Level Transport Protocol
  • Virtual Machines

3
1.1 Heterogeneous Languages Motivation
  • Components of distributed systems are written in
    different programming languages
  • Programming languages may or may not have their
    own object model
  • Object models largely vary
  • Differences need to be overcome in order to
    facilitate integration and portability

4
1.1 Heterogeneous Programming Languages
  • 1 Polylingual applications.
  • 2 Standardization of bindings.
  • 3 Available bindings.
  • 4 What bindings need to address.
  • 5 An example IDL/C.

5
1.1 Polylingual Applications
  • Polylingual applications have components in
    different programming languages.
  • Language bindings address language
    interoperability.
  • Problem with n different languages, n(n-1)
    different language bindings needed.
  • Solution One language (such as IDL) as a
    mediator. Requires only n bindings.

6
1.1 Why do we use an IDL?
7
1.2 Interface Definition Language
  • Language for expressing all concepts of the
    middlewares object model
  • Should be
  • programming-language independent
  • not computationally complete
  • Bindings to different programming languages are
    needed
  • As an example OMG object model and OMG/IDL

8
1.2 Polylingual Applications with IDL
9
1.3 CORBA Programming Language Bindings
10
1.4 What Bindings Need to Address
  • Atomic data types and type constructors
  • Constants
  • Interfaces and multiple inheritance
  • Object references
  • Attribute accesses
  • Operation execution requests
  • Exceptions
  • Invocation of ORB operations

11
1.5 An Example IDL/C
  • 1 Modules
  • 2 Atomic Types
  • 3 Records
  • 4 Interfaces
  • 5 Attributes
  • 6 Operations
  • 7 Inheritance
  • 8 Exceptions
  • 9 Operation Execution Requests

12
1.5.1 Modules
module BankApplication ...
  • IDL
  • C

namespace BankApplication ...
13
1.5.2 Atomic Types
  • IDL C
  • short CORBAShort
  • long CORBALong
  • unsigned short CORBAUShort
  • unsigned long CORBAULong
  • float CORBAFloat
  • double CORBADouble
  • char CORBAChar
  • boolean CORBABoolean
  • octet CORBAOctet
  • enum enum

14
1.5.3 Records
  • IDL
  • C

struct info long height short
weight
struct info CORBALong height
CORBAShort weight
15
1.5.4 Interfaces
interface person ...
  • IDL
  • C

class person ...
16
1.5.5 Attributes
  • IDL
  • C

interface person attribute readonly string
name attribute address lives_at
class person public string name()
void lives_at(address ) address
lives_at()
17
1.5.6 Operations
  • IDL
  • C

interface person void move(in address
new)
class person public void move(const
address new)
18
1.5.7 Inheritance
  • IDL
  • C

interface employee person ... person
boss()
class employee public virtual person
public person boss()
19
1.5.8 Exceptions
  • IDL
  • C

interface employee person exception
too_young... void retire() raises
(too_young)
class employee public virtual person
public class too_youngpublic UserException
too_young (const char id) too_young
() void retire() throw (too_young)
20
1.5.9 Operation Execution Requests
  • C

employee emp ... try emp-gtretire()
catch (const too_young IsTooYoung) //
Handle the Specific Exception catch (const
SystemException SysEx) switch
(SysEx-gtminor() ) case BAD_PARAM ...
break case NO_MEMORY ... break
21
2 Need for Heterogeneous Middleware
  • Middleware implementations differ
  • Available programming language bindings
  • Available services facilities
  • Supported hardware platforms
  • Supported operating system platforms
  • Separation of security domains.
  • Large scale distributed systems.

22
2.1 Heterogeneous Middleware
23
2.2 Middleware Integration
24
2.2 Bridging
  • in-line
  • request-level

25
2.3 Interoperability vs. Interworking
  • Interoperability denotes the ability of different
    implementations of the same middleware standard
    to work together. Requires
  • Definition of interaction protocols
  • Interworking defines how different middleware
    standards are integrated. Requires
  • Mapping of object models
  • Definition of interaction protocols

26
2.3 Interoperability vs. Interworking
  • Interoperability between different
    implementations of the same standard (CORBA)
  • Interworking between different standards
  • CORBA DCE
  • CORBA COM/DCOM/OLE
  • First CORBA interoperability
  • Then COM/CORBA interworking

27
2.4 Interoperability Protocols
28
2.4.1 General Inter-ORB Protocol (GIOP)
  • Define eight messages
  • Request
  • Reply
  • Fragment
  • Locate Request
  • Locate Reply
  • Cancel request
  • Close Connection
  • Message Error

29
2.4.2 Common Data Representation
  • Defined as part of GIOP.
  • Presentation layer implementation to support
    heterogeneity.
  • Mapping of IDL data types to transport byte
    stream.
  • Encodings of
  • primitive types
  • constructed types
  • interoperable object references

30
2.4.3 Internet Inter-ORB Protocol (IIOP)
  • Maps GIOP to TCP/IP.
  • Provides operations to open and close TCP/IP
    connections.
  • Is required from ORBs for CORBA compliance.
  • Supported by Netscape Communicator and others.

31
2.5 Motivation for Interworking
  • COM and OLE/Automation are widely used for
    desktop integration of PC applications
  • Compound documents
  • Visual Basic / Visual C User Interfaces.
  • OMG has no support for compound documents and
    user interfaces yet.
  • COM and OLE do not support distribution.
  • CORBA was designed to support distribution.

32
2.5.1 COM-CORBA Interworking
  • Goal provide transparent bi-directional mapping
    between COM/OLE and CORBA.
  • Adopted specification was submitted by consortium
    of 11 ORB vendors. Most of them have COM/OLE
    Interworking implemented in their ORB products.
  • Microsoft decided not to be involved in this
    effort but rather pursue its own distributed
    object environment (DCOM).
  • CORBA2.2 specification defines interworking
    between CORBA and DCOM.

33
2.5.2 Interworking Architecture
34
2.5.3 Architecture Instantiations
35
2.5.5 CORBA COM
  • Enables COM Clients to access CORBA objects
  • Fairly straight-forward mapping
  • IDL atomic types map closely to COM primitives
  • Constructed types also map closely
  • CORBA object references map to COM interface
    pointers
  • Inherited CORBA interfaces may be represented as
    multiple COM interfaces
  • CORBA attributes mapped to set and get
    operations in COM.

36
3 Heterogeneous Data Representation
  • Examples of Heterogeneity
  • Big-endian versus little-endian data
    representation
  • Different encoding schemes for character set
  • Different ways complex data types are implemented
    by run-time environment of programming languages
  • Resolution Standardized Data Representation
  • Resolution Application-Level Transport Protocol
  • Resolution Virtual Machines

37
4 Summary
  • Polylingual applications.
  • IDL programming language bindings.
  • Heterogeneous Middleware
  • Heterogeneous Data Representation.
Write a Comment
User Comments (0)
About PowerShow.com