Chapter 4: Interprocess Communication --- - Layering: --------------------------- Applications, services --------------------------- RMI and RPC Chapter 5 --------------------------- Request-reply protocol marshalling Chapter 4 External data representation --------------------------- UDP / TCP Chapter 3 --------------------------- - synchronous communication: both send and receive are blocking; - asynchronous communication: send is non-blocking, while both blocking and non-blocking receive are supported; - instead of using ports, in the V System messages are addressed to processes; - an agreed standard for the representation of data structures and primite values is called an external data representation; - marshalling is the process of taking a collection of data items and assembling them into a form suitable for transmission in a message; unmarshalling is the reverse process; Ex: - CORBA's common data representation; - Java's oject serialization mechanism; - Sun's XDR - CORBA'S CDR: - can represent all data types used as arguments in remote invocation in CORBA; - 15 basic types + composite types; - in CDR, multi-byte types are transmitted in the sender's format; - the types of data items are described in CORBA IDL, which provides a notation for describing the types of the arguments and results of RMI methods; - from this definition, the CORBA interface compiler generates appropriate marshalling and unmarshalling operations; - Java object serialization: - to serialize an object, its class information is written out, followed by the types and names of its instance variables; If the instance variables belong to new classes, then their class information must also be written out. - Remote object references: - when a remote method invocation is sent, the message needs to specify a particular object. A remote object reference is an identifier for a remote object valid throughout a distributed system; - must be unique over space and time. Ex: - IP || port || time || object# - Three protocols for implementing various types of RPC: - the request (R) protocol; - the request-reply (RR) protocol; - the request-reply-acknowledge (RRA) protocol; - IP multicast: - multicast addresses can be permanent or temporary; - UDP/IP multicast suffers from omission failures; - some applications require reliable multicast: ordered, no duplicates, all-or-none semantics;