Chapter 4: Interprocess Communication ‏

  • Published on
    23-Feb-2016

  • View
    42

  • Download
    1

Embed Size (px)

DESCRIPTION

Chapter 4: Interprocess Communication . Pages 145 - 172 . Objectives . Introduction. The API for internet protocols External Data representation and marshaling Multicast communication. Middleware layers. API for Internet Protocols : characteristics of interprocess communication. - PowerPoint PPT Presentation

Transcript

Slide 1

Chapter 4: Interprocess CommunicationPages 145 - 172 1Objectives Introduction.The API for internet protocolsExternal Data representation and marshalingMulticast communication.

2Middleware layers3

API for Internet Protocols : characteristics of interprocess communicationsynchronous and asynchronous communicationblocking send: waits until the corresponding receive is issuednon-blocking send: sends and moves onblocking receive: waits until the msg is receivednon-blocking receive: if the msg is not here, moves onsynchronous: blocking send and receiveasynchronous: non-blocking send and blocking or non-blocking receive4API for Internet Protocols : characteristics of interprocess communicationMessage DestinationIP address + port: one receiver, many sendersLocation transparencyname server or binder: translate service to locationOS (e.g. Mach): provides location-independent identifier mapping to lower-lever addressessend directly to processes (e.g. V System)multicast to a group of processes (e.g. Chorous) Reliability Ordering5API for the Internet Protocols: Sockets and portsprogramming abstraction for UDP/TCPoriginated from BSD UNIX6

API for Internet Protocols: UDP Datagrammessage size: up to 216, usually restrict to 8K blocking: non-blocking send, blocking receive timeouts: timeout on blocking receive receive from any: doesn't specify sender origin (possible to specify a particular host for send and receive) failure model:omission failures: can be droppedordering: can be out of order use of UDP DNS and less overhead: no state information, extra messages, latency due to start up7

API for Internet Protocols : TCP streammessage size: unlimited lost messages: flow control message duplication and ordering message destination matching of data itemsblocking Threads

8API for Internet Protocols : TCP streamfailure model checksum to detect and reject corrupt packets sequence # to deal with lost and out-of-order packets connection broken if ack not received when timeout

Use of TCP HTTP,FTP,Telnet,SMTPJAVA API for TCP streams: ServerSocket,Socket

9External Data Representation and Marshalling different ways to represent int, float, char... (internally) byte ordering for integersbig-endian: most significant byte firstsmall-endian: least significant byte first standard external data representationmarshal before sending, unmarshal before receiving send in sender's format and indicates what format, receivers translate if necessary External data representationCORBA's Common Data Representation (CDR)Java's object serialization self studyExtensible Markup Language (XML)

10CORBA IDL11

CORBA IDL compiler generates marshalling and unmarshalling routinesStruct. with string, string, unsigned long12

Extensible Markup Language (XML)

13

Extensible Markup Language (XML)

XML namespaces

14

External Data Representation (2): Remote object referencecall methods on a remote object (CORBA, Java, ..)

15

Multicast communication IP-multicastFailure model for multicast datagrams16Multicast communication : IP multicast Class D addresses, first four bits are 1110 in IPv4multicast routers: route messages to out-going links that have members multicast address allocationpermanenttemporary17

Recommended

View more >