Processes communicating Process:program running Client process:process within a host. that initiates ▣within same host,two communication processes communicate Server process:process using inter-process that waits to be communication (defined contacted by OS). processes in different Note:applications with hosts communicate by P2P architectures have exchanging messages client processes server processes 2:Application Layer
2: Application Layer 11 Processes communicating Process: program running within a host. within same host, two processes communicate using inter-process communication (defined by OS). processes in different hosts communicate by exchanging messages Client process: process that initiates communication Server process: process that waits to be contacted Note: applications with P2P architectures have client processes & server processes
Sockets host or process sends/receives host or server server messages to/from its socket controlled by app developer socket analogous to door process process sending process shoves socket socket message out door TCP with TCPwith sending process relies on buffers, Internet buffers, variables variables transport infrastructure on other side of door which brings message to socket controlled by OS at receiving process API:(1)choice of transport protocol:(2)ability to fix a few parameters (lots more on this later) 2:Application Layer 12
2: Application Layer 12 Sockets process sends/receives messages to/from its socket socket analogous to door ❖ sending process shoves message out door ❖ sending process relies on transport infrastructure on other side of door which brings message to socket at receiving process process TCP with buffers, variables socket host or server process TCP with buffers, variables socket host or server Internet controlled by OS controlled by app developer API: (1) choice of transport protocol; (2) ability to fix a few parameters (lots more on this later)
Addressing processes ▣to receive messages, process must have identifier ▣host device has unique32-bit IP address Q:does IP address of host on which process runs suffice for identifying the process? 2:Application Layer 13
2: Application Layer 13 Addressing processes to receive messages, process must have identifier host device has unique32-bit IP address Q: does IP address of host on which process runs suffice for identifying the process?
Addressing processes to receive messages, identifier includes both process must have IP address and port identifier numbers associated with ▣host device has process on host. unique32-bit IP Example port numbers: address HTTP server:80 Q:does IP address of Mail server:25 host on which process to send HTTP message runs suffice for to gaia.cs.umass.edu web identifying the server: process? IP address:128.119.245.12 ÷Answer:NO,may Port number:80 processes can be running on same host more shortly. 2:Application Layer 14
2: Application Layer 14 Addressing processes to receive messages, process must have identifier host device has unique32-bit IP address Q: does IP address of host on which process runs suffice for identifying the process? ❖ Answer: NO, many processes can be running on same host identifier includes both IP address and port numbers associated with process on host. Example port numbers: ❖ HTTP server: 80 ❖ Mail server: 25 to send HTTP message to gaia.cs.umass.edu web server: ❖ IP address: 128.119.245.12 ❖ Port number: 80 more shortly
App-layer protocol defines ▣Types of messages Public-domain protocols: exchanged, ▣defined in RFCs *e.g.,request,response allows for ▣Message syntax: interoperability what fields in messages how fields are delineated ▣e.g.,HTTP,SMTP ▣Message semantics Proprietary protocols: meaning of information in e.g.,KaZaA fields Rules for when and how processes send respond to messages 2:Application Layer 15
2: Application Layer 15 App-layer protocol defines Types of messages exchanged, ❖ e.g., request, response Message syntax: ❖ what fields in messages & how fields are delineated Message semantics ❖ meaning of information in fields Rules for when and how processes send & respond to messages Public-domain protocols: defined in RFCs allows for interoperability e.g., HTTP, SMTP Proprietary protocols: e.g., KaZaA