490 likes | 636 Views
Computer Networks (CSE-4711) Lecture-Segment-10- Application Layer. Instructor: Sazid Zaman Khan Lecturer, Department of Computer Science and Engineering, IIUC. DNS (Domain Name System).
E N D
Computer Networks (CSE-4711)Lecture-Segment-10- Application Layer Instructor: SazidZaman Khan Lecturer, Department of Computer Science and Engineering, IIUC
DNS (Domain Name System) • The Domain Name System (DNS) is the system in the Internet that maps names of objects (usually host names) into IP numbers or other resource record values. The name space of the Internet is divided into domains, and the responsibility for managing names within each domain is delegated, typically to systems within each domain.
DNS (Domain Name System) • For example, all Internet systems that belong to the University of Yale have names within the yale.edu domain. The Internet's root name servers delegate the responsibility for managing the yale.edu name space to a name server system operated by University of Yale.
DNS (Domain Name System) • This name server can, in turn, delegate portions of the yale.edu name space to departmental name servers on campus. By this system, the department gains a measure of autonomy in inventing and managing the names within its subdomain. For example, some or all of the subdomains of yale.edu can be nameserved by various departments (such as Computer Science, Math, or Physics). Following slide explains this.
Name Servers Part of the DNS name space showing the division into zones.
Resource records • Resource Records define data types in the Domain Name System (DNS). Resource Records identified by RFC 1035 (What is RFC?) are stored in binary format internally for use by DNS software. But resource records are sent across a network in text format while they perform zone transfers.
Details of resource records (see resource records sheet) • see resource records sheet (except pointer).
Email • The main components of an e-mail system that facilitate sending and receiving of e-mails on Internet are : • An e-mail client • An e-mail server (SMTP server) • POP and IMAP servers.
Email client • If you use e-mails for online communication the you would definitely be using an e-mail client. An e-mail client provides you with the following capabilities : • Provides a list of messages that people have sent to you. Each entry in the list contains the name of sender, a subject, a few words from the message body and the time/date on which it was received. • Provides the ability to read a complete message, reply to it or forward it to other people. • Provides the ability to compose a new message and send it to the desired recipients. • Delete a message. • The e-mail clients could be standalone (like Microsoft Outlook, Pegasus etc) or could be web based (like gmail, yahoo etc).
Email server • Whenever you send a message from your e-mail client, it goes to an e-mail server. The e-mail server manages the messages received by it. It forwards the message to a POP or IMAP service if the message is to be sent to a recipient on the same subnet else it follows the standard procedure to send the message over Internet to the destined person.
Email server • An e-mail server comes into the picture twice if e-mail is sent over Internet to a remote destination. First it’s the sender’s e-mail server that sends the e-mail over the Internet and second is the receiver’s e-mail server that receives the e-mail and makes sure that it is delivered to the recipient’s system. On the other hand, an E-mail server comes into picture only once when the recipient is on the same subnet. • SMTP servers are widely used as e-mail servers all over the internet. An SMTP server is also known as Mail Transfer Agent (MTA).
POP server • POP stands for Post Office Protocol. A POP (or POP3) server in it’s simplest form stores the messages for a particular user in a text file. The file for a particular user is appended with information each time an e-mail is received by a POP server. If your e-mail client is configured to use a POP3 protocol then whenever you try to fetch e-mails through your e-mail client then a request is sent to your POP server for the same.
POP server • A POP server requires the log-in credentials of a user that are sent through e-mail client. Once a user is authenticated, the POP server provides access to user’s e-mails. As with any client server architecture, the e-mail client interacts with the POP server through a predefined set of commands. For example: • USER – For User-ID • PASS – For Password • LIST – Provide message list
POP server • E-mail client connects to port 110 on the server where POP service is running. After connecting the e-mail client issues the commands (as described above) to the POP server to authenticate, fetch e-mail, list e-mails etc.
POP server’s problem • One small problem with POP servers is that once an e-mail client fetches the e-mails from this server on client machine, it gets difficult to access the same e-mails from any other device or system as they get downloaded on client machine and are removed from the server. Though there exists and option ‘Keep a copy on server’ through which e-mail clients can tell the server not to delete the e-mails. But, this leads to multiple copies of your mailbox on clients as well as on server and so it makes the management of e-mails difficult.
IMAP • IMAP stands for Internet message access protocol. This protocol is also used to access e-mails but it is far more capable than POP. One of the most prominent feature an IMAP server provides is the central access to e-mails. Unlike POP server, an IMAP server keeps the e-mails on the server itself and so you can access e-mails from any machine or device
IMAP • This server also provides easy management of e-mails like searching, categorizing the e-mails and placing them into various sub-folders etc. The only problem that one could imagine with IMAP server is that you always need an Internet connection so that the e-mail client is able to fetch e-mails from the IMAP server. But today, almost all of the e-mail clients have the capability to cache the e-mails so that you can even view them when you are offline.
IMAP • To interact with IMAP server, the e-mail client connects to server machine on port 143. As with POP, IMAP server also understands a set of commands which the e-mail client uses to connect with the server.
Email (step by step) • An e-mail client like Gmail, yahoo, outlook etc is used to create or reply to an e-mail. • Once the e-mail is drafted successfully, it is sent using the e-mail client. • This e-mail first goes to the SMTP server (also known as MTA (Mail transfer agent) ) to which the e-mail client is connected. • The e-mail server looks out for the recipients address. The address is of the form<name>@domain.com
Email (step by step) • The e-mail server first uses the DNS technique to resolve the domain name into a valid IP address. • Next it sends the e-mail to to this IP address over the Internet. • Now the e-mail traverses over the Internet in a series of IP packets and reaches the destination SMTP server or the MTA. • This server collects all the e-mails and places them to appropriate location so that these are accessible to your e-mail clients through POP or IMAP services.
IMAP (Internet Message Access Protocol) A comparison of POP3 and IMAP.
Streaming video and audio • In streaming video and audio, the traveling information is a stream of data from a server. The decoder is a stand-alone player or a plugin that works as part of a Web browser. The server, information stream and decoder work together to let people watch live or prerecorded broadcasts.
Some players for streaming media • QuickTime, from Apple, plays files that end in .mov. • RealNetworksRealMedia plays .rm files.
Pre-requisites for streaming video and audio • The main issues with streaming in the past were a CPU powerful enough to render video, and a data bus wide enough to transmit video data to the video adaptor and monitor, as well as the network bandwidth (this was the age where the best access to networks was through a 28.8Kb modem).
Pre-requisites for streaming video and audio • Consider the problem: a PC usually had an XGA monitor with a resolution of 640 x 480 pixels at 16 bits per pixel. Video, though, was 320 x 240 pixels. At a video refresh rate of 24 frames per second, the data bus on the PC had to process 320 x 240 x 2 (bytes per pixel) x 24 bytes per second, which works out at about 3.5MB per second.
Pre-requisites for streaming video and audio • In fact, for a while the only option available was to download the media as a file from some remote server and play it once the file was fully downloaded. • Several things had to come together before streaming media could happen. First of all, the video itself had to be compressed to reduce the footprint of the media file on disk. At 3.5MB per second, a one minute video would take up 200MB on the hard drive - an amount of space that frankly was not readily available on most PCs of the time.
Pre-requisites for streaming video and audio • The CPU had to be able to decompress the video data in real time and render frames at the correct frame rate. The data bus of the PC had to be able to handle transferring that amount of data to the video sub-system, and the latter had to be able to refresh the monitor at the correct frame rate
Streaming media(audio or video) • By the late 90s, streaming video had started to become the norm. Unlike in previous years, where the video had to be downloaded in its entirety before viewing, streaming is characterised by playing the video data as it's received. • First, this requires a special compressed video format to facilitate play while downloading. • The viewer has to buffer enough data to play should there be some network contention; a few seconds' worth, say.
Streaming media(audio or video) • The protocol between viewer and remote media server must allow for renegotiating the resolution of the media should the latency or bandwidth of the network change. If the network latency increases and/or the bandwidth decreases, a lower resolution may be more acceptable than introducing stuttering to the user's playback experience.
Types of streaming • Nowadays, video streaming tends to split into two camps: there's what might be called pseudo-streaming and there's streaming proper.
Pseudo Streaming • Pseudo-streaming is characterized by downloading an actual file and playing that file as it's being downloaded. YouTube videos tend to be of this variety; you download a video file (and save it temporarily), and play it back during the download. Since the complete file is downloaded, replaying a YouTube video tends to be very quick: there's no more data to download. The file is, however, managed by the viewer and will be deleted once the user moves away to another video.
Pseudo Streaming • The media server is different for pseudo-streaming as well. In essence, it operates as a big peer to peer file server: it stores a set of files and will send one as fast as possible to a client requesting it. • Pseudo-streaming also uses plain HTTP as a delivery protocol, meaning that it is available on local corporate networks that may block other ports.
Real streaming • Real streaming, on the other hand, is characterised by a data-buffering viewer (all data is kept in memory), with no file being saved on disk. Real streaming also allows for automatic resolution changes (say from 720p to 480p or vice versa) to contend with real-time changes to the network throughput or latency, whereas pseudo-streaming has no such feature. Of course, with some YouTube videos you can elect to view the video in a higher or lower resolution, in which case the video resumes at the changed resolution. • For this to work though, the video must have been uploaded at those different resolutions in the first place. The server, in effect, has to store multiple resolution versions of the video.
Real streaming • Media servers that provide real streaming use a different protocol and port to provide video and audio streams. A common protocol used is RTMP (Real-Time Message Protocol, an Adobe standard used by Flash streaming), where the port used is 1935 (HTTP's is 80). There are other variants, including one that tunnels streams through HTTP.
Real streaming • There are also other protocols in use such as RTSP (Real-Time Streaming Protocol), which uses RTP (Real-time Transport Protocol) and RTCP (Real-Time Control Protocol). These protocols break up the streams (generally there are more than one, such as a video and an audio channel) into very small packets and then transmits them to the client viewer.
The architecture of World Wide Web • From next slide
Architectural Overview The parts of the Web model.
Client server model –the main concept of World Wide Web • Client/server describes the relationship between two computer programs in which one program, the client, makes a service request from another program, the server, which fulfills the request. Although the client/server idea can be used by programs within a single computer, it is a more important idea in a network. In a network, the client/server model provides a convenient way to interconnect programs that are distributed efficiently across different locations. Computer transactions using the client/server model are very common. For example, to check your bank account from your computer, a client program in your computer forwards your request to a server program at the bank. That program may in turn forward the request to its own client program that sends a request to a database server at another bank computer to retrieve your account balance. The balance is returned back to the bank data client, which in turn serves it back to the client in your personal computer, which displays the information for you.
Client server model –the main concept of World Wide Web • In the usual client/server model, one server, sometimes called a daemon, is activated and awaits client requests. Typically, multiple client programs share the services of a common server program. Both client programs and server programs are often part of a larger program or application. Relative to the Internet, your Web browser is a client program that requests services (the sending of Web pages or files) from a Web server (which technically is called a Hypertext Transport Protocol or HTTP server) in another computer somewhere on the Internet. Similarly, your computer with TCP/IP installed allows you to make client requests for files from File Transfer Protocol (FTP) servers in other computers on the Internet.
The Client Side (a) A browser plug-in.
The Server Side A multithreaded Web server with a front end and processing modules.
The Server Side A server farm.
URLs – Uniform Resource Locaters Some common URLs.
Content delivery network (CDN) • A content delivery network (CDN) is a system of servers, or computers interconnected over the Internet, that are placed closer to users across the globe to reduce the distance content travels across long-haul networks, like wide are networks (WANs). These servers contain duplicate content of the originating network. CDNs dynamically provide data to clients by calculating which server is located nearest to the client and delivering content based on those calculations.
Why CDN • This not only eliminates the distance that content travels, but reduces the number of hops a data packet must make. The result is less packet loss, optimized bandwidth and faster performance -- improving overall user experience. • A CDN is also ideal for Web content (static or otherwise) experiencing a surge in traffic because distributed CDN servers can handle a sudden large number of client requests at one time over the Internet. For example, spikes in Internet traffic from flash crowds due to a popular event, such as an online streaming video of a presidential inauguration, can be spread out across the CDN, making content delivery faster and less likely to fail.
Why CDN • Since it duplicates content across servers, a CDN inherently acts as an archive, extra storage space and remote data backup for disaster recovery. • In addition, CDNs provide the content provider a degree of protection from DoS (Denial of Service) attacks by using their large distributed server infrastructure to absorb the attack traffic. • CDN customers find they can improve site performance and pay less for data transfer because CDN providers offer pay-as-you-go services at considerably lower costs. Anyone looking to improve WAN performance or content delivery can use a CDN provider.
CDN providers • The largest CDN provider at the top of the market is Akamai Technologies. Other providers in the commercial CDN market include Amazon, Cloudfront, BitTorrent Inc.