Sockets h process sends/receives serve servei messages to/from its socket controlled by app developer socket analogous to door process process sending process shoves socket cket message out door TCP with TCP with sending process relies on buffers, Internet buffe variables variable 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 uct by Weiteng Sun chapter 2-application layer 11/73
Introduct by Weifeng Sun chapter2- application layer 11/73 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 unique 32-bit IP address Q: does IP address of host suf fice for identifying the rocess? uct by Weiteng Sun chapter 2-application layer 12/73
Introduct by Weifeng Sun chapter2- application layer 12/73 Addressing processes • to receive messages, process must have identifier • host device has unique 32-bit IP address • Q: does IP address of host suffice for identifying the process?
identifier includes both IP address and port numbers associated with rocess on host Example port numbers Http server 80 Mail server: 25 tosendhttpmessage to gaia. cs. umass. edu web server. IP address: 128. 119.245.12 Port number: 80 more shortly uct by Weifeng Sun chapter 2-application layer 13/73
Introduct by Weifeng Sun chapter2- application layer 13/73 • 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…
pp-layer protocol defines Types of messages Public-domain protocols exchange defined in RFCs e.g., request, response allows for Message syntax interoperability what fields in messages how fields are e.g, Http, SmtP lineate Proprietary protocols Message semantics g, Skype meaning of information in fields Rules for when and how rocesses send s respond to messages by Weifeng S chapter 2-application layer 14/73
Introduct by Weifeng Sun chapter2- application layer 14/73 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., Skype
Transport service requirements of common api Application Data loss Throughput Time sensiti file transfer no loss elastic no e-mail no loss elastic no Web documents no loss elastic no real-time audio/video loss-tolerant audio: 5kbps-1Mbps yes, 100s msec video: 10kbps-5Mbps stored audio/video loss-tolerant same as above yes, few secs interactive games loss-tolerant few kbps up yes, 100s msec instant messaging no loss elastic yes and no uct by Weiteng Sun chapter 2-application layer 15/73
Introduct by Weifeng Sun chapter2- application layer 15/73 Transport service requirements of common apps Application file transfer e-mail Web documents real-time audio/video stored audio/video interactive games instant messaging Data loss no loss no loss no loss loss-tolerant loss-tolerant loss-tolerant no loss Throughput elastic elastic elastic audio: 5kbps-1Mbps video:10kbps-5Mbps same as above few kbps up elastic Time Sensitive no no no yes, 100’s msec yes, few secs yes, 100’s msec yes and no