170 likes | 307 Vues
Chapter Two. Application Layer Prepared by: Dr. Bahjat Qazzaz CS Dept. Sept. 2007. Application Layer: Introduction. This layer is the main reason for the existence of computer networks. Many ingenious and wonderful network applications have been created
E N D
Chapter Two Application Layer Prepared by: Dr. Bahjat Qazzaz CS Dept. Sept. 2007
Application Layer: Introduction • This layer is the main reason for the existence of computer networks. • Many ingenious and wonderful network applications have been created • Text e-mail, remote access to computers, file transfer, and text chat. • Multimedia Applications (Killer applications or resources hungry applications) such as: video streaming, Internet radio, video conferencing • Instant messages and P2P file sharing.
Application Layer: Introduction • Examples of NW applications • Electronic mail • The Web • Instant messaging • Login into a remote computer • P2P file sharing • FTP • Video conferencing …..
Application Layer: Introduction • Application’s programs should run on different end systems and communicate with each other over the network. • Example: Web application • Web browser program running in the user’s host • Web server program that runs on web server host
Application Layer: Introduction • You need to develop applications that run on multiple machines. • You don’t need to write SW that runs on routers or Ethernet switches.
Application Layer: NW application. Paradigm (or architecture) • Client/Server paradigm • P2P architecture • Hybrid of client/server and P2P
Application Layer: NW application. Paradigm (or architecture) • Client/Server paradigm • The client is a program running on the user’s host and request a service • The server is a program running on remote host (normally) listening for a request (connection) and responds to the requests • Example: web applications, FTP, … • Clients don’t communicate with each other directly
Application Layer: NW application. Paradigm (or architecture) • Client/Server paradigm • The server has a well-known address called IP address. The server is always on, and the client can always request a service • A single server is incapable of keeping up with all the request from clients. So, cluster of servers (hosts) can be implemented. This is referred to as SERVER FARM.
Application Layer: NW application. Paradigm (or architecture) • P2P Architecture • There isn’t a server in the center of the application • Instead, pair of hosts (called peers) communicate directly with each other • In the P2P, none of the peer host is required to be always on
Application Layer: NW application. Paradigm (or architecture) • Hybrid of client/server and P2P • Participant can communicate bwn each other without passing through intermediate server. • Also, a peer can queries a central server to determine which currently-up (on) peers have a desired file Most NW apps consist of multiple pairs of communicating processes Client & Server
Application Layer: Processes communication • Processes on two different end systems communicate with each other by exchanging messages across the computer network. • The client/server paradigm consists of two processes, one of them is labeled client, and the other is labeled server • But how do they exchange messages!!!!!
Application Layer: Processes communication • Sockets • A process sends messages into, and receives messages from, network through its socket. • A socket is an interface bwn the application layer and the transport layer, and it is referred to as: • The Application Programming Interface (API).*1 • Addressing processes….follow--
Application Layer: Processes communication • Sockets-Addressing processes • For a sending process to identify the receiving process, it has to provide two pieces of information: • The name or address of the host (IP address). The IP address is a 32 bit number that uniquely identifies the host. 1* • An identifier that specifies the receiving process, called Port Number. Such as: 80 for web server. لأن الجهاز ممكن أن يحتوي على أكثر من خادم
Application Layer: Processes communication • An application layer protocol defines • The types of messages exchanged (request messages and response messages) • The syntax of the various message types (such as fields in the message and how the fields are delineated) • The semantics of the fields (the meaning of the information in the fields) • Rules for determining when and how a process sends messages and responds to messages
Application Layer: services needed • What services does an application need? A network application need the following services from the transport layer • Reliable data transfer *1 • Bandwidth: some app must transfer data at a certain rate, or do different encoding *2 • Timing: Some Interactive real-time applications require tight timing constraints on data delivery. Long delays cause unacceptable results (Internet telephony)
Application Layer: services needed • Services provided by the Internet Transport Protocols. TCP & UDP • TCP • Reliable transfer service • Allows client and server to exchange control information before transmission (hand-shaking) • Then connection exist (full-duplex). • It includes congestion-control mechanism (throttles the sender when there is a congestion). *1 • TCP does not • Guarantee minimum transmission rate.TCP regulates that *2 • Provide any delay guarantee *3
Application Layer: services needed • Services provided by the Internet Transport Protocols. TCP & UDP • UDP • Unreliable data transfer • No handshaking • Messages may get out of order • Good for loss-tolerant applications • No guarantee of minimum delay or transmission rate