client server computing
play

Client/Server Computing & link The types of messages exchanged - PowerPoint PPT Presentation

COMP 431 Application-Layer Protocols Internet Services & Protocols Overview application application transport Application-layer protocols define: network Client/Server Computing & link The types of messages exchanged


  1. COMP 431 Application-Layer Protocols Internet Services & Protocols Overview application application transport ◆ Application-layer protocols define: network Client/Server Computing & link » The types of messages exchanged physical » The syntax and semantics of messages Socket Programming » The rules for when and how messages are sent ◆ Public protocols (defined in RFCs) regional ISP Jasleen Kaur » HTTP, FTP, SMTP, POP, IMAP, DNS ◆ Proprietary protocols » RealAudio, RealVideo » Skype January 28, 2020 » … Institutional network 1 2

  2. Application-Layer Protocols Network Working Group R. Fielding UC Irvine Request for Comments: 2616 J. Gettys Compaq/W3C Obsoletes: 2068 J. Mogul Compaq Overview application Category: Standards Track H. Frystyk W3C/MIT application L. Masinter Xerox transport ◆ Application-layer protocols define: June 1999 P. Leach Microsoft network T. Berners-Lee W3C/MIT link » The types of messages exchanged physical » The syntax and semantics of messages Hypertext Transfer Protocol -- HTTP/1.1 » The rules for when and how messages are sent Abstract ◆ Public protocols (defined in RFCs) regional ISP The Hypertext Transfer Protocol (HTTP) is an application-level » HTTP, FTP, SMTP, POP, IMAP, DNS protocol for distributed, collaborative, hypermedia information systems. It is a generic, stateless, protocol which can be used for many tasks beyond its use for hypertext, such as name servers and ◆ Proprietary protocols distributed object management systems, through extension of its » RealAudio, RealVideo request methods, error codes and headers [47]. A feature of HTTP is the typing and negotiation of data representation, allowing systems » Skype to be built independently of the data being transferred. » … HTTP has been in use by the World-Wide Web global information Institutional network initiative since 1990. This specification defines the protocol referred to as "HTTP/1.1", and is an update to RFC 2068 [33]. 3 4

  3. Application-Layer Protocols Application-Layer Protocols application Overview Outline application transport application application network transport ◆ The architecture of distributed systems link ◆ Application developers write programs network physical » Client/Server computing that: link » Peer-to-Peer computing physical » Run on (different) end systems » Content delivery networks » Communicate over network network regional ISP ◆ The programming model used in link ◆ Note: application developers don’t constructing distributed systems physical regional ISP need to write code for network-core » Socket programming devices » Network devices do not run user applications or application layer protocols application application Institutional network transport network link Institutional network physical 5 6

  4. Application-Layer Protocols The Application Layer application application Outline The client-server paradigm transport network Client application application link ◆ Typical network application has two transport ◆ Example client/server systems and physical pieces: client and server network their application-level protocols: link ◆ Client: » The World-Wide Web (HTTP) physical » Initiates contact with server ( “ speaks regional ISP » Reliable file transfer (FTP) reply first ” ) » E-mail (SMTP & POP) » Requests service from server » Internet Domain Name System (DNS) » For W eb, client is implemented in regional ISP request ◆ Example p2p applications systems: browser; for e-mail, in mail reader » BitTorrent ◆ Server: ◆ Other protocols and systems: » Provides requested service to client » Streaming media — DASH » “ Always ” running Institutional network » Content delivery networks (CDNs) » May also include a “ client interface ” application application transport » A server may be a logical machine network » Implemented by one of thousands of link Institutional network Server physical servers in a data center physical 7 8

  5. The Application Layer Application-Layer Protocols application The peer-to-peer-paradigm application Outline transport network application application ◆ Example client/server systems and link transport ◆ No “always-on” server their application-level protocols physical network ◆ Arbitrary end systems directly » The World-Wide Web (HTTP) link physical communicate » Reliable file transfer (FTP) » E-mail (SMTP & POP) » Peers request service from other peers, regional ISP provide service in return to other peers » Internet Domain Name System (DNS) ◆ Self scalability – new peers bring new regional ISP service capacity, as well as new service ◆ Protocol design issues: demands » In-band vs. out-of-band control signaling ◆ Peers are intermittently » Push vs. pull protocols connected and change IP addresses » Persistent vs. non-persistent connections ◆ Complex management application application ◆ Client/server service architectures Institutional network transport » Contacted server responds vs . forwards request network link Institutional network physical 9 10

  6. Client/Server Paradigm Client/Server Paradigm Socket programming A quick aside on processes socket ◆ A process is the OS term for a ◆ Sockets are the fundamental clients, servers a host-local , application program running within a host building block for client/server created/released , OS-controlled systems client process : the executing ◆ On the same host, two processes interface into which an program that initiates the communicate using inter-process application process can both ◆ Sockets are created and managed communication send and receive messages communication by applications to/from another (remote or local) » A service defined by the OS server process : the executing » Strong analogies with files application process program waits to be contacted ◆ Processes on different hosts communicate by exchanging ◆ Two types of transport services messages are available via the socket API: » By using some protocol! » UDP sockets: unreliable, datagram-oriented communications » TCP sockets: reliable, stream-oriented communications 11 12

  7. Client/Server Paradigm Client/Server Paradigm application Socket-programming using TCP Addressing processes application transport network ◆ A socket is an application created, OS-controlled interface link ◆ To receive messages, a process must physical into which an application can both send and receive messages have an identifier to and from another application » How does a client identify a server » A “ door ” between application processes and end-to-end transport process protocols regional ISP ◆ We know that a host device has unique 32-bit IP address ◆ But does the IP address of host controlled by controlled by application application suffice for identifying the destination process process developer developer process? socket socket » No! Many processes can be (and are!) TCP with TCP with controlled by controlled by Institutional network app1 … app9 running on the same host buffers, buffers, operating operating transport Internet variables variables system system network link Host Host physical (end system) (end system) 13 14

  8. Client/Server Paradigm Socket-programming using TCP application Addressing processes TCP socket programming model application transport ◆ Processes are identified by a “port network ◆ A TCP socket provides a reliable, bi-directional, byte-stream number” link physical communications channel from one process to another » Sort of like a socket identifier » A “ pair of pipes ” abstraction ◆ The “server” identifier includes both an IP address and port numbers associated with the server process on the host regional ISP ◆ Example port numbers: » HTTP server: 80 » mail server: 25 Process Process Internet ◆ For a browser to send an HTTP read write bytes message to www.cs.unc.edu the request socket socket read write is addressed to IP address bytes Institutional network app1 … app9 152.2.131.244 and port 80 transport network Host Host link physical (end system) (end system) 15 16

  9. Socket-programming using TCP Socket-programming using TCP Network addressing for sockets Socket programming in Python ◆ Sockets are addressed using an IP address and port number Client Server Internet write read bytes socket socket read write bytes process process Local port numbers socket socket ( e.g ., 6500) ◆ Client creates a local TCP socket ◆ When the client creates a socket, the specifying the host and port number client’s TCP establishes connection to TCP with TCP with of server process server’s TCP buffers, buffers, variables variables » Python resolves host names to IP ◆ When contacted by a client, server addresses using DNS creates a new socket for server process Internet addresses of hosts ◆ Client contacts server to communicate with client ( e.g ., 152.2.131.245) End System End System » Server process must be running » This allows the server to talk with » Server must have created socket t hat multiple clients Internet domain “ welcomes ” client’s contact name of host DNS e.g ., classroom.cs.unc.edu 17 18

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend