Nama:Fayyadh Syafiq Rabbani Kelas: 2IA15 NPM: 52418630
Nama:Fayyadh Syafiq Rabbani Kelas: 2IA15 NPM: 52418630
Kelas : 2IA15
NPM : 52418630
A classic example of client/server is a bank ATM network. Think of the ATMs as clients—one
user at a time can use each ATM to make withdrawals from their account. Each ATM connects to
a central computer (a server) to verify your PIN number and gain access to your account
information.
c) How does a hostname get translated into an address? Find out the IP address of a host (try
www.phptr.com).
When a client wants to talk to a server, it must know the IP address. A user will usually enter a
hostname rather than IP address, though, and the computer will then resolve the hostname into
an IP address that it can use. When the client makes an initial request to talk with a server, it
specifies which IP address it wants to talk with (the unique IP address of the server) and
specifies a port number. A port number is used to specify which service the client wishes to use
(HTTP, telnet, ftp, etc.). Think of this like a telephone call: a telephone number is like an IP
address and a port is an extension. Ports allow networked computers to provide many services
but use only a single address
The primary function of an HTTP server is to service client requests for documents. It waits for
HTTP requests and then returns data for each one. An HTTP daemon provides an HTTP service. It
allows a server to support client requests for documents. It generates errors when invalid
requests are received or when a document cannot be found. The Web server process also
generates log files of requests, errors, and other information.
b) Who developed the first Web server? What other early Web servers were developed?
The European Laboratory for Particle Physics (CERN) produced one of the first Web servers. The
World Wide Web Consortium (W3C) took over development of the CERN HTTPD (also known as
the W3C HTTPD), but no longer supports it. The W3C currently supports a Java-based server
known as Jigsaw. Both the CERN HTTPD and Jigsaw are reference implementations, meaning
that they illustrate features of HTTP but are not meant for large-scale production use. Source
code is available for both servers and they are excellent points of reference for developers
wishing to write their own HTTP daemons.
d) What was the first Web browser? Why did it succeed where similar services (such as ftp, gopher,
and WAIS) failed?
The first real HTML browser, NCSA Mosaic, came into being in early 1993. Although the
hypertext documents had been around for some time, Mosaic had several essential features
that made it popular right from the start. First, it was free, as are most browsers even today.
Second, it was available for all major platforms: UNIX, Macintosh, and Microsoft Windows.
Third, it was easy to create content—no special software was required to write HTML, only a
text editor. Before Mosaic, only textbased clients such as gopher, WAIS, telnet, and FTP were
widely available for retrieving information on the Internet. An easy-to-use GUI interface and
easy-to-create content launched the Web in the form of NCSA Mosaic clients and HTTPD servers
If you created a valid HTML document and saved it with a .html extension, it should look like a
simple Web page—as you’d expect. If you saved it with a .txt extension (which is the default for
many text editors), you might be looking at the source HTML in your browser rather than a
formatted version. And, of course, if the HTML you entered is not valid, you might see some
rather strange results in the browser.
b) Click on the hyperlink; it should display the Prentice Hall home page. View the source of the
Prentice Hall home page. What do you see?
Viewing the source of any HTML document you find on the Web should show you the source
code used to generate the document. For very complex pages, a lot of source is disp layed, and
it is often hard to read. For simpler pages, however, you can see exactly how the page is put
together. This text that you are viewing is plain ASCII text with no special formatting.
a) Find an image on the Prentice Hall home page. Can you determine what type of image it is? If
you can determine the name of the image file, you should be able to determine the type by the
filename extension. To find the name of the image, you might try looking at the source code.
The filenames for all images in the document should be in the <IMG> tags.
b) View the image by itself, then view the source of the image in the browser as you did with an
HTML file. What do you see?
In Netscape, do a “View Image” as in Exercise 1.2.1. Now right-click on the image and select
“View Source” or select “Page Source” from the view menu. You should see a page full of
garbage characters. This is binary data. Unlike ASCII text files, images are not meant to be
viewed in text mode
a) View any Web page from a browser. How can you determine what the MIME type of the
document is?
In Netscape, you can get information about the page that you’re currently viewing by selecting
“Page Info” from the view menu. In Internet Explorer, you can right-click in the document and
select “Properties” from the option menu. Along with the MIME type, you can view other
information about the document that is provided from the HTTP headers. Netscape shows the
last modified time, when the document expires, and whether or not the document is cached.
b) How are MIME types used when requesting or receiving documents on the Web
A browser is able to specify what types of data it is capable of displaying, and it specifies this by
using MIME types. When a server returns a document, it must tell the browser what type of
data is being returned, and it also specifies this by using a standard MIME type
a) What header is sent by the client to identify and give information about the browser?
The User-Agent request header contains information about the client program originating the
request. This is not a required header, but most browsers send it when making a request. The
server can use this header to determine what browser is requesting a document and to tailor its
response if necessary
b) What header is sent by the server so that the browser can determine what type of content is
being returned?
The Content-Type header indicates the media type of the data contained in the entity body. The
server determines the type of data by looking at the file extension and referencing the MIME
types file.
A caching proxy server helps improve performance for intranets. In general terms, a cache is
something that keeps frequently used data available for quick access. When a user requests a
URL, the proxy server checks to see if it has a local copy. If it does, that copy may get returned
rather than fetching the document from the real Web site again. This is similar to the disk cache
that Web browsers use, but by keeping all the documents on a local server, many users are able
to benefit. The speed of intranets is typically very fast compared to the connection to the
Internet, so retrieving files from a local server is noticeably faster than retrieving files from an
external server somewhere on the Internet.
c) Explain what happens when a URL is requested by a browser that is configured to use a proxy.
The browser will actually make an HTTP connection to the proxy server, not the Web server
requested. The proxy receives the request from the browser and then makes a connection to
the Web server for that URL. The proxy server retrieves the response and then returns the data
to the client requesting it.
1.4.2 IDENTIFY OTHER SERVICES THAT MAY RUN ALONGSIDE AN HTTP SERVER
a) Why is a streaming audio server useful if you want to deliver audio content?
Streaming audio allows users to listen to long audio clips (or even live audio feeds) without
having to wait for a large audio file to download. The client will start playing the audio almost
instantly. This works well as long as the network is fast enough to support the constant flow of
data. Compression algorithms make the audio data small enough that even a modem
connection is fast enough for decent-sounding audio transmission.