Professional Documents
Culture Documents
Chapter 2
1/63
Agenda
1-Layered protocols 2-Remote Procedure 3-Remote Object Invocation 4-Message-Oriented Communication 5-Stream-Oriented Communication
2/63
1 - Layered Protocols
3/63
OSI Model
-OSI: Open Systems Interconnection
-Developed by the International Organization for Standardization (ISO) -Provides a generic framework to discuss the layers and functionalities of communication protocols.
2-2
6/63
7/63
+Reliable delivery of data (breaks message into pieces small enough, +Ordering of delivery Examples: TCP (connection-oriented) UDP (connectionless) RTP (Real-time Transport Protocol)
8/63
10/63
Middleware Protocols
-Support high-level communication services -The session and presentation layers are merged into the middleware layer, Ex: Microsoft ODBC (Open Database Connectivity), OLE DB
12/63
13/63
Client
count = doSomething();
Server
procedure doSomething();
Client Stub
Server Stub
OS
OS
14/63
a) b) c)
Original message on the Pentium (little-endian) The message after receipt on the SPARC (big-endian ) The message after being inverted. The little numbers in boxes indicate the address of each byte
17/63
Parameter Specification
-Caller and callee agree on the format of message they exchange
Ex: word = 4 bytes float = 1 word character is the rightmost byte of word => the client stub must use this format and the server stub know that incoming message for foobar has this format
18/63
2-12
a) b)
The interconnection between client and server in a traditional RPC The interaction using asynchronous RPC
19/63
2-13
21/63
2-14
2-15
24/63
25/63
2-16
When a client binds to a distributed object, an implementation of the object interface (proxy) is loaded into the clients address space
27/63
a) b)
An example with implicit binding using only global references An example with explicit binding using global and local references Problems: + Language dependent + Address of server an Object reference
Kyung Hee University 28/63
29/63
2-18
stream
30/63
31/63
2. Synchronizing
Synchronized methods Only proxy synchronization is allowed only
32/63
Local objects are passed by value, remote objects are passed by reference Proxy can be used as a reference to a remote object: Possible to serialize the proxy and send it Kyung Hee University server to another
33/63
stream
34/63
4-Message-Oriented Communication
35/63
36/63
37/63
38/63
39/63
(e) Delivery-based transient synchronous communication at message delivery (f) Response-based transient synchronous communication
41/63
44/63
46/63
48/63
of
Message-Queuing
Enable persistent communication between processes Handling access to database Perform computation In wide range of application, include: -Email -Workflow -Groupware -Batch processing
49/63
end
50/63
5-Stream-Oriented Communication
51/63
52/63
53/63
54/63
56/63
58/63
2 ways to translate
RSVP translates QoS parameters into data link layer parameters
Kyung Hee University
Data link layer provides its own set of parameters (as in ATM)
59/63
61/63
62/63
63/63
64/63
2-41
message
66/63
END OF CHAPTER 2