Upload
hari-prasad
View
218
Download
0
Embed Size (px)
Citation preview
8/3/2019 Tdts04 Fo11 Ds Objektbaserade Och Corba
1/4
1
Tanenbaum & Van Steen, Distributed Systems:Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. Allrights reserved. 0-13-239227-5
DISTRIBUTED SYSTEMSPrinciples and Paradigms
Second Edition
ANDREW S. TANENBAUMMAARTEN VAN STEEN
Chapter 10DISTRIBUTED
OBJECT-BASED SYSTEMS
Tanenbaum & Van Steen, Distributed Systems:Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. Allrights reserved. 0-13-239227-5
Distributed Objects
Figure 10-1. Common organization of a remoteobject with client-side proxy.
Tanenbaum & Van Steen, Distributed Systems:Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. Allrights reserved. 0-13-239227-5
Example: Enterprise Java Beans
Figure 10-2. Generalarchitecture of anEJB server.
Tanenbaum & Van Steen, Distributed Systems:Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. Allrights reserved. 0-13-239227-5
Four Types of EJBs
Stateless session beans
Stateful session beans
Entity beans
Message-driven beans
Tanenbaum & Van Steen, Distributed Systems:Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. Allrights reserved. 0-13-239227-5
Object Adapter
Figure 10-5.Organization of anobject serversupporting differentactivation policies.
Tanenbaum & Van Steen, Distributed Systems:Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. Allrights reserved. 0-13-239227-5
Binding a Client to an Object
Figure 10-7. (a) An example with implicit binding usingonly global references. (b) An example with
explicit binding using global and local references.
8/3/2019 Tdts04 Fo11 Ds Objektbaserade Och Corba
2/4
2
Tanenbaum & Van Steen, Distributed Systems:Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. Allrights reserved. 0-13-239227-5
Parameter Passing
Figure 10-8. The situation when passing anobject by reference or by value.
Tanenbaum & Van Steen, Distributed Systems:Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. Allrights reserved. 0-13-239227-5
Object-Based Messaging (1)
Figure 10-9. CORBAs callback model forasynchronous method invocation.
Tanenbaum & Van Steen, Distributed Systems:Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. Allrights reserved. 0-13-239227-5
Object-Based Messaging (2)
Figure 10-10. CORBAs polling model forasynchronous method invocation.
Tanenbaum & Van Steen, Distributed Systems:Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. Allrights reserved. 0-13-239227-5
CORBA Object References
Figure 10-11. The organization of an IOR withspecific information for IIOP.
Tanenbaum & Van Steen, Distributed Systems:Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. Allrights reserved. 0-13-239227-5
Synchronization
Figure 10-14. Differences in control flow for locking objects
Tanenbaum & Van Steen, Distributed Systems:Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. Allrights reserved. 0-13-239227-5
Replication and consistency:
Totally Ordered Multicasting
Figure 6-11. Updating a replicated database andleaving it in an inconsistent state.
8/3/2019 Tdts04 Fo11 Ds Objektbaserade Och Corba
3/4
3
Tanenbaum & Van Steen, Distributed Systems:Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. Allrights reserved. 0-13-239227-5
Consistency and Replication:Primary-Based, Remote-Write Protocols
Figure 7-20. The principle of a primary-backup protocol.
Tanenbaum & Van Steen, Distributed Systems:Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. Allrights reserved. 0-13-239227-5
Consistency and replication:
Primary-Based, Local-Write Protocols
Figure 7-21. Primary-backup protocol in which the primarymigrates to the process wanting to perform an update.
Tanenbaum & Van Steen, Distributed Systems:Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. Allrights reserved. 0-13-239227-5
Granularity of invocations:Entry Consistency
Figure 10-15. Deterministic thread schedulingfor replicated object servers.
Tanenbaum & Van Steen, Distributed Systems:Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. Allrights reserved. 0-13-239227-5
Replication Frameworks (1)
Invocations to objects are intercepted at three
different points:
At the client side just before the invocation is
passed to the stub.
Inside the clients stub, where the interception
forms part of the replication algorithm.
At the server side, just before the object is
about to be invoked.
Tanenbaum & Van Steen, Distributed Systems:Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. Allrights reserved. 0-13-239227-5
Interceptors, generally
Figure 2-15. Using interceptors to handleremote-object invocations.
Tanenbaum & Van Steen, Distributed Systems:Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. Allrights reserved. 0-13-239227-5
Replication Frameworks (2):Interceptors in EJB
Figure 10-16. A general framework for separating replication
algorithms from objects in an EJB environment.
8/3/2019 Tdts04 Fo11 Ds Objektbaserade Och Corba
4/4
4
Tanenbaum & Van Steen, Distributed Systems:Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. Allrights reserved. 0-13-239227-5
Replicated Invocations (1)
Figure 10-17. The problem of replicated method invocations.
Tanenbaum & Van Steen, Distributed Systems:Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. Allrights reserved. 0-13-239227-5
Replicated Invocations (2)
Figure 10-18. (a) Forwarding aninvocation request from a
replicated object to anotherreplicated object.
Tanenbaum & Van Steen, Distributed Systems:Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. Allrights reserved. 0-13-239227-5
Replicated Invocations (3)
Figure 10-18. (b) Returning areply from one replicatedobject to another.
Tanenbaum & Van Steen, Distributed Systems:Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. Allrights reserved. 0-13-239227-5
Example: Fault-Tolerant CORBA
Figure 10-19. A possible organization of anIOGR for an object group having a primary and backups.
Tanenbaum & Van Steen, Distributed Systems:Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. Allrights reserved. 0-13-239227-5
An Example Architecture
Figure 10-20. An example architecture of afault-tolerant CORBA system.
Tanenbaum & Van Steen, Distributed Systems:Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. Allrights reserved. 0-13-239227-5
Example: Fault-Tolerant Java
Causes for nondeterministic behavior:
1. JVM can execute native code, that is, code that isexternal to the JVM and provided to the latter
through an interface.
2. Input data may be subject to nondeterminism.
3. In the presence of failures, different JVMs will
produce different output revealing that themachines have been replicated.