Unit_1

Download as pdf or txt
Download as pdf or txt
You are on page 1of 27

UNIT-I

Introduction and Web Development Strategies, History of Web and Internet, Protocols
Governing Web, Writing Web Projects, Connecting to Internet, Introduction to Internet
services and tools, Introduction to client-server computing

Introduction
 Web technology refers to the means by which computers communicate with each other using
markup languages and multimedia packages. It gives us a way to interact with hosted
information, like websites. Web technology involves the use of hypertext markup language
(HTML) and cascading style sheets (CSS).
 The methods by which computers communicate with each other through the use of markup
languages and multimedia packages is known as web technology.

 Web technology is the development of the mechanism that allows two of more computer
devices to communicate over a network. For instance, in a typical office setting, a number of
computers plus additional devices such as printers may be interconnected via a network,
allowing for quick and convenient transmission of information. The processes involved in web
technology are complex and diverse, which is why major businesses employ whole departments
to deal with the issue. Web technology has revolutionized communication methods and has
made operations far more efficient.

Advantages of web technology


The main advantage of web technology is that it offers convenience and a high speed of
communication in the computer world. Whether in the office or the home, processes using a computer
are more swift and straightforward with the use of a network.

Disadvantages of web technology


 Matters involving web technology can be very complicated, and it would be difficult for
someone without relevant experience to sort a network problem out. This means it is necessary
to employ someone with the specific skills to solve network issues, which costs money.
Additionally, the existence of a network provides the opportunity for an attack on the computer
system.
 Weaknesses in a network could be exploited; important information could be stolen or
destroyed and malware could infect the various network systems. For this reason, network
security is another issue that must be considered when using web technology.

Web Development Strategies


Web development refers to building website and deploying on the web. Web development requires use
of scripting languages both at the server end as well as at client end.
A lot has changed in the way people access the web. Years ago, people could only access the web on
their desktops and laptops, but these days people have smart phones, tablets and other smart mobile
devices. Web developers now have to change the way they develop websites in order to accommodate
these changes, and to ensure that everyone gets what they are looking for online, irrespective of the
device they are using. There are so many challenges that web developers have to face every day as they
try to accommodate different users, and some of the strategies explained here can help in ensuring that
their projects are a success

A lot has changed in the way people access the web. Years ago, people could only access the web on
their desktops and laptops, but these days people have smart phones, tablets and other smart mobile
devices. Web developers now have to change the way they develop websites in order to accommodate
these changes, and to ensure that everyone gets what they are looking for online, irrespective of the
device they are using. There are so many challenges that web developers have to face every day as they
try to accommodate different users, and some of the strategies explained here can help in ensuring that
their projects are a success.
1. Strategy for Responsive web design:
Web developers should now focus on creating just one design, but one that is compatible with
multiple devices. This way, regardless of the type of device that is accessing the website, users
will be able to see the same content in the same way.
2. Strategy of Software Prototyping Development:
In order to get it right, you can try to test your design using figure that are available to you.

Figure : Software Design and Prototyping


Thus, before putting the software into function, prototyping has become the essential step. It is essential
to know in advance how the software would look like and if it is able to deliver the expected
functionalities. Therefore, the developer has to have thorough requirement gathering and analysis done
before the actual process, and should be ready for revisions post development, till the final product is
refined and sophisticated on all aspects.

3. Business Strategy/Marketing Plans and Strategies:


Research is undoubtedly the backbone of a successful offering. What makes you unique from
and better than others? This is something the brand owner has to be sure of at first place before
expecting the end users to understand it. How your business is going to be a one stop with
solution provider, what resources would be required to handle customer expectations and how
these resources would be put to use, to make the offering effective and yielding, are some of the
questions that need thorough research.

4. Strategy of Competitor Analysis:


Identifying weak points of competition and giving solution to those is a great opportunity that
may get missed off the radar if analysis of competitors’ approach and offerings is not done.
5. Gather a good team:
Working alone is not always a good idea especially as a web developer because you may not get
everything right, and sometimes delays can cause can cost you a client, especially if you have
tight deadlines to meet. You can gather a team of well skilled web developers to work with, so
as to ensure that every project is finished on time and without any mistakes.
6. Identify Your Target Audience:
It is essential to do a detailed profiling of your target audience. Their attitude, perceptions,
expectations and buying sentiment are worth knowing in order to prepare your web
development process to sync with their attributes.
7. Customize your apps:
Most web developers prefer to use templates because they are readily available and easy to
work with, but what they do not provide is the uniqueness that some projects need. You have to
customize your apps if you want to give them the feel or look that will bring out the best in the
brand you are creating the app for customers.
8. Always test and validate your projects:
Once the project is complete, validate your code, then test the layout to ensure that it is working
on all the browsers and devices that you have designed it for. This should be done before you
launch the app to ensure that everything is working properly and that the design has come out
perfectly.
History of Web and Internet

 The World Wide Web (WWW) is an information space where documents and other web
resources are identified by Uniform Resource Locators (URLs), interlinked by hypertext links,
and accessible via the Internet.
 English scientist Tim Berners-Lee invented the World Wide Web in 1989.
 He wrote the first web browser in 1990 while employed at CERN in Switzerland.[2][3] The
browser was released outside CERN in 1991, first to other research institutions starting in
January 1991 and to the general public on the Internet in August 1991.
 In 1993, there are only about 50 websites world wide. A browser that allowed user to
take advantage of the web’s graphical capabilities was developed at the National center
for Super Computing application (NCSA). NCSA called the browser Mosaic.
 WWW provides a hypertext-hypermedia interface to information resources in the Internet. So,
WWW is a distributed hypermedia system.
 WWW is an application of Internet
 The World-Wide Web (WWW) is a service, an application of Internet.
 It is based on the Internet infrastructure. So the WWW is newer than the Internet.
The World Wide Web uses three protocols:

 HTML (Hypertext markup language) – HTML is used to describe the content of web pages
in the WWW.
 HTTP (Hypertext Transfer Protocol ) - Although other protocols can be used such as FTP,
this is the most common protocol. It was developed specifically for the World Wide Web and
favored for its simplicity and speed. This protocol requests the 'HTML' document from the
server and serves it to the browser.

Web and HTTP


First some jargon
 Web page consists of objects
 Object can be HTML file, JPEG image, Java
applet, audio file,…
 Web page consists of base HTML-file which
includes several referenced objects
 Each object is addressable by a URL
 Example URL:

www.someschool.edu/someDept/pic.gif

host name path name

2: Application Layer 21
HTTP overview

HTTP: hypertext
transfer protocol
 Web’s application layer PC running
protocol Explorer

 client/server model
 client: browser that
requests, receives, Server
“displays” Web objects running
Apache Web
 server: Web server
server
sends objects in
response to requests
Mac running
Navigator

2: Application Layer 22

HTTP overview (continued)


Uses TCP: HTTP is “stateless”
 client initiates TCP  server maintains no
connection (creates socket) information about
to server, port 80 past client requests
 server accepts TCP
connection from client aside
Protocols that maintain
 HTTP messages (application- “state” are complex!
layer protocol messages)  past history (state) must
exchanged between browser be maintained
(HTTP client) and Web
 if server/client crashes,
server (HTTP server)
their views of “state” may
 TCP connection closed
be inconsistent, must be
reconciled

2: Application Layer 23
HTTP connections
Nonpersistent HTTP Persistent HTTP
 At most one object is  Multiple objects can
sent over a TCP be sent over single
connection. TCP connection
between client and
server.

2: Application Layer 24

HTTP request message

 two types of HTTP messages: request, response


 HTTP request message:
 ASCII (human-readable format)

request line
(GET, POST, GET /somedir/page.html HTTP/1.1
HEAD commands) Host: www.someschool.edu
User-agent: Mozilla/4.0
header Connection: close
lines Accept-language:fr

Carriage return,
line feed (extra carriage return, line feed)
indicates end
of message
2: Application Layer 29
HTTP response message
status line
(protocol
status code HTTP/1.1 200 OK
status phrase) Connection close
Date: Thu, 06 Aug 1998 12:00:15 GMT
Server: Apache/1.3.0 (Unix)
header
Last-Modified: Mon, 22 Jun 1998 …...
lines
Content-Length: 6821
Content-Type: text/html

data, e.g., data data data data data ...


requested
HTML file

2: Application Layer 33
HTTP response status codes
In first line in server->client response message.
A few sample codes:
200 OK
 request succeeded, requested object later in this message
301 Moved Permanently
 requested object moved, new location specified later in
this message (Location:)
400 Bad Request
 request message not understood by server
404 Not Found
 requested document not found on this server
505 HTTP Version Not Supported
2: Application Layer 34

 URLS (Uniform resource locator) - The last part of the puzzle required to allow the web to
work is a URL. This is the address which indicates where any given document lives on the web.
It can be defined as <protocol>://<node>/<location> .

A brief history of the Internet: Internet is made up of thousand and thousands of interconnected
networks. Although it has become extremely popular in the last decade, it came into being only in
1969.

ARPANET: In the mid 1960s, the Advanced Research Projects Agency (ARPA) in the US Department
of Defence (DoD) wanted to find a way to connect computers so that their funded researchers could
share their findings. In 1967, ARPA proposed its idea for ARPANET, a small network for connecting
computers.
Birth of Internet and TCP/IP
 In 1972, Vint Cerf and Bob Kahn, who were part of core ARPANET group, started Internetting
Project with the aim to connect different networks together. Diverse interfaces, different packet
sizes, diverse transmission rates presented many difficulties. Kahn Cerf proposed the idea of
gateway as an intermediate hardware to transfer data from one network to another.

 In 1973, they presented a landmark paper outlining the protocols for end-to-end
communication. This paper on TCP/IP included concepts like datagram, gateway, and
encapsulation. At this time, responsibility of ARPANET was handed to Defence
Communication Agency (DCA).

 Came 1977 and communication between networks was made possible. Internet consisting of
three different networks, namely, ARPANET, packet radio, and packet satellite was now
possible.
 In 1978 noticing the popularity of BSD (Berkley Software Distribution) UNIX, which included
network capabilities, ARPA signed a contract with Berkley under which TCP/IP software was
incorporated in the operating system itself.

 In 1983 original ARPANET protocols were abolished and TCP/IP was made de facto standard
for Internet.
Time Line
 1969 Four-node ARPA established
 1972 Internetting Project begins
 1973 Development of TCP/IP suite begins.
 1977 An Internet tested using TCP/IP to TCP/IP
 1978 UNIX distributed to universities
 1983 TCP/IP became the official protocol for ARPANET.

 Internet is a globally connected network system that uses TCP/IP model to transmit data via
various types of media.

 Internet is a network of network of global exchanges-including private, public, business,


academic and government networks-connected by guided media, wireless and fiber-optics
technologies.

 Internet is the most cost-effective communications method in the world.

Internet Infrastructure
The Internet backbone is made up of many large networks, which interconnect with each other. These large
networks are known as Network Service Providers or NSPs. These networks peer with each other to exchange
packet traffic. Each NSP is required to connect to Network Access Points or NAPs. At the NAPs, packet traffic
may jump from one NSP's backbone to another NSP's backbone. NSPs also interconnect at Metropolitan Area
Exchanges or MAEs. MAEs serve the same purpose as the NAPs but are privately owned. NAPs were the
original Internet interconnects points. Both NAPs and MAEs are referred to as Internet Exchange Points or IXs.
NSPs also sell bandwidth to smaller networks, such as ISPs and smaller bandwidth providers. Below is a picture
showing this hierarchical infrastructure.

TCP/IP LAYERS AND PROTOCOLS


 The TCP/IP model is made up of four layers: interface layer, network, transport, and
application.
 The first layer of TCP/IP (Application layer) is similar to the first three layers (Application,
presentation and Session layer) of the OSI model.
 The services of transport layers of both the models are similar. Further, the services of network
layers in both models are also similar, while some time network layer is also known as Internet
layer.
 The last layer of TCP/IP is interface layer, which includes the services of data link layer and
physical layer of OSI model. In OSI model, whereas the layers of TCP/IP protocol suite contain
relatively independent protocols.

Figure: TCP/IP Protocol Suite

Layers of TCP/IP Protocol Suite:


As we know TCP/IP contains four layers and each layer has its specific functions, in the following
section lets find out the functions of each layer of TCP/IP.
Interface layer or (Physical + Data Link Layer): The physical layer deals with the hardware level
like, transmission media, connections and the voltage for digital signals. The data link layer deals with
media access and control strategies, frame format etc.
Internet Layer or Network Layer: The Internet layer is an important layer in the protocol suite. At
this layer, TCP/IP supports Internetworking Protocol (IP). IP is a host-to-host protocol. This layer is
responsible for the format of datagram’s as defined by IP, and routing a datagram or packet to the next
hop, but is not responsible for the accurate and timely delivery of datagram’s to the destination in
proper sequence. IP allows raw transmission functions allowing user to add functionalities necessary
for given application. Ensuring maximum efficiency, TCP/IP supports four other protocols: ARP,
RARP, ICMP and IGMP in this layer.
 Address Resolution Protocol (ARP): On a LAN, each machine is identified with a unique
physical address imprinted on the network interface card. ARP is used to find the physical
address of a machine when its IP address is known.
 Reverse Address Resolution Protocol (RARP): It is used to find the IP address of a machine
when its physical address is known. It is used when a diskless computer is booted or a computer
is connected to the network for the first time.
 Internet Control Message Protocol (ICMP): IP is unreliable are best effort delivery. In case
of failures ICMP is used to send notifications to the sender about packet problems. It sends
error and query messages.
 Internet Group Message Protocol (IGMP): It is used for multicasting, which is transmission
of a single message to a group of recipients.
Transport Layer: At this layer, TCP/IP supports two protocols: TCP, UDP, IP is host-to-host
protocol, which can deliver the packet from one physical device to another physical device. TCP, UDP,
are transport level protocols, responsible for delivering a packet from one process on a device to
another process on the other device.
User Datagram Protocol (UDP): It is simpler of the two protocols. It does not provide reliability. It is,
therefore faster, and using for applications in which delay is intolerable (in case of audio and video).
Transmission Control Protocol (TCP): TCP is reliable, connection oriented protocol. By connection
oriented, we mean that a connection must be established between both ends before either can transmit
data. It ensures that communication is error-free and in sequence.
Application Layer: As said earlier, it is closer to combined session, presentation, and application layer
of OSI model. It allows the user to run various applications on Internet. These applications are File
Transfer Protocol (FTP), remote login (TELNET), email (SMTP), WWW (HTTP). The session layer of
OSI model is almost dropped in TCP/IP.
Writing Web Projects
A. Write a project mission statement: Write the specific mission statement that you want to do.
B. Identify Objectives:
i. Specific
ii. Measurable
iii. Attainable
iv. Realistic
v. Time limited
C. Identify your target users: The matter of a website will be determined by the users whom you
want to visit the site. This is totally depend upon:
i. Market research
ii. Focus group
iii. Understanding intranet audiences
D. Determine the scope: By supporting documents and client’s approval.
E. Budget:
i. Assumption for budgets.
ii. Budget categories.
iii. Determine hidden costs and tools.
F. Planning issues:
i. Discuss client’s existing information system.
ii. Project team and developing infrastructure.
iii. Where the website will place.

Some Important Terminologies

Protocols Governing Web


Protocol: A protocol is a set of rules that is used to communicate applications to each
other.
OR
A protocol is the interface required for communicating the different applications.

Classification:
a. HTTP
b. TCP/IP
c. FTP
d. E-MAIL
e. TELNET
FTP: the file transfer protocol

FTP file transfer


FTP FTP
user client server
interface
user
at host remote file
local file system
system

 transfer file to/from remote host


 client/server model
client: side that initiates transfer (either to/from

remote)
 server: remote host
 ftp: RFC 959
 ftp server: port 21

2: Application Layer 46

FTP: separate control, data connections


TCP control connection
 FTP client contacts FTP server port 21
at port 21, TCP is transport
protocol TCP data connection
 client authorized over control FTP port 20 FTP
connection client server
 client browses remote
 server opens another TCP
directory by sending commands
data connection to transfer
over control connection.
another file.
 when server receives file
 control connection: “out of
transfer command, server
band”
opens 2nd TCP connection (for
file) to client  FTP server maintains “state”:
current directory, earlier
 after transferring one file,
authentication
server closes data connection.
2: Application Layer 47
E-mail

Electronic Mail outgoing


message queue
user mailbox
user
Three major components: agent
 user agents mail
user
server
 mail servers agent
 simple mail transfer SMTP mail
protocol: SMTP server user
SMTP agent
User Agent
 a.k.a. “mail reader” SMTP
mail user
 composing, editing, reading agent
server
mail messages
 e.g., Eudora, Outlook, elm, user
Mozilla Thunderbird agent
user
 outgoing, incoming messages agent
stored on server
2: Application Layer 50

Electronic Mail: mail servers


user
Mail Servers agent
 mailbox contains incoming mail
user
messages for user server
agent
 message queue of outgoing
SMTP mail
(to be sent) mail messages
server user
 SMTP protocol between mail
servers to send email SMTP agent

messages SMTP
 client: sending mail mail user
agent
server server
 “server”: receiving mail
user
server agent
user
agent

2: Application Layer 51
Electronic Mail: SMTP [RFC 2821]

 uses TCP to reliably transfer email message from client


to server, port 25
 direct transfer: sending server to receiving server
 three phases of transfer
 handshaking (greeting)
 transfer of messages
 closure
 command/response interaction
 commands: ASCII text
 response: status code and phrase

 messages must be in 7-bit ASCII

2: Application Layer 52

Scenario: Alice sends message to Bob


1) Alice uses UA to compose 4) SMTP client sends Alice’s
message and “to” message over the TCP
[email protected] connection
2) Alice’s UA sends message 5) Bob’s mail server places the
to her mail server; message message in Bob’s mailbox
placed in message queue 6) Bob invokes his user agent
3) Client side of SMTP opens to read message
TCP connection with Bob’s
mail server

1 mail
mail
server user
user server
2 agent
agent 3 6
4 5

2: Application Layer 53
TELNET

 TELNET stands for TErminal NETwork.


 Telnet is both a TCP/IP application and aprotocol for connecting a local computer to a remote computer.
 Telnet is a program that allows an Internet host computer to become a terminal of another host on the
Internet.
 Telnet is the Internet remote login service.
 Telnet protocol specifies exactly how a remote login interacts. The standard specifies how to client
contacts the server and how the server encodes output for transmission to the client.
 To use the Telnet service, one must invoke the local application program and specify a remote machine.
 The local program becomes a client, which forms a connection to a server on the remote computer. The
client passes keystrokes and mouse movements to the remote machine and displays output from the
remote machine on the user’s display screen.
 Telnet provides direct access to various services on Internet. Some of these services are available on
your host, but Telnet is especially useful when these services are not available on your host.
 For example, if you want to use graphical interfaces designed by other users then Telnet, allows you to
access their hosts and use their new interfaces. Similarly, whenever someone creates a useful service on
his host, Telnet allows you to access this valuable information resource. This tools Is especially useful
for accessing public services such as library card catalogues, the kind of databases available on the
machine etc. You can also log into any catalogue service of a library and use it.

Website: A website is simply a collection of interlinked web pages.


Classification:
A. Corporate Website
B. Individual website
A. Corporate Website:
 In this, there is certain no. of persons, who develop their website for a particular organization.
 The corporate website are formed when group of people have common interest and objective.
 The purpose of this website is to convey the information of organization to all over the world.
B. Individual website: It is just like profile management system. In this type of website an individual
wants to develop website for h-projection, career growth etc.

Connecting to Internet
Every computer connected to the Internet has a unique address. Let's say your IP address is 1.2.3.4 and
you want to send a message to the computer with the IP address 5.6.7.8. The message you want to send
is "Hello computer 5.6.7.8” . Let's say you've dialed into your ISP from home and the message must be
transmitted over the phone line. Therefore the message must be translated from alphabetic text into
electronic signals, transmitted over the Internet, and then translated back into alphabetic text. How is
this accomplished? Through the use of a protocol stack. Every computer needs one to communicate on
the Internet and it is usually built into the computer's operating system (i.e. Windows, Unix, etc.). The
protocol stack used on the Internet is refered to as the TCP/IP protocol stack.
If we were to follow the path that the message "Hello computer 5.6.7.8" took from our computer to the
computer with IP address 5.6.7.8, it would happen something like this:
1. The message would start at the top of the protocol stack on your computer and work it's way
downward.
2. If the message to be sent is long, each stack layer that the message passes through may break
the message up into smaller chunks of data. This is because data sent over the Internet (and
most computer networks) are sent in
3. manageable chunks. On the Internet, these chunks of data are known as packets.
4. The packets would go through the Application Layer and continue to the TCP layer. Each
packet is assigned a port number, which is used by program on the destination computer to
receive the message because it will be listening on a specific port.
5. After going through the TCP layer, the packets proceed to the IP layer. This is where each
packet receives it's destination address, 5.6.7.8.
6. Now that our message packets have a port number and an IP address, they are ready to be sent
over the Internet. The hardware layer takes care of turning our packets containing the alphabetic
text of our message into electronic signals and transmitting them over the phone line.
7. On the other end of the phone line your ISP has a direct connection to the Internet. The ISPs
router examines the destination address in each packet and determines where to send it. Often,
the packet's next stop is another router. More on routers and Internet infrastructure later.
8. Eventually, the packets reach computer 5.6.7.8. Here, the packets start at the bottom of the
destination computer's TCP/IP stack and work upwards.
9. As the packets go upwards through the stack, all routing data that the sending computer's stack
added (such as IP address and port number) is stripped from the packets.
10. When the data reaches the top of the stack, the packets have been re-assembled into their
original form, "Hello computer 5.6.7.8!"

Introduction to Internet services and tools


Services:

DNS: Domain Name System

People: many identifiers: Domain Name System:


 SSN, name, passport #  distributed database
Internet hosts, routers: implemented in hierarchy of
many name servers
 IP address (32 bit) -
 application-layer protocol
used for addressing
host, routers, name servers to
datagrams
communicate to resolve names
 “name”, e.g., (address/name translation)
ww.yahoo.com - used by
 note: core Internet
humans
function, implemented as
Q: map between IP application-layer protocol
addresses and name ?  complexity at network’s
“edge”

2: Application Layer 62
DNS
DNS services Why not centralize DNS?
 hostname to IP  single point of failure
address translation  traffic volume
 host aliasing  distant centralized
 Canonical, alias names database
 mail server aliasing  maintenance
 load distribution
 replicated Web doesn’t scale!
servers: set of IP
addresses for one
canonical name

2: Application Layer 63

Distributed, Hierarchical Database


Root DNS Servers

com DNS servers org DNS servers edu DNS servers

pbs.org poly.edu umass.edu


yahoo.com amazon.com
DNS servers DNS serversDNS servers
DNS servers DNS servers

Client wants IP for www.amazon.com; 1st approx:


 client queries a root server to find com DNS server
 client queries com DNS server to get amazon.com
DNS server
 client queries amazon.com DNS server to get IP
address for www.amazon.com
2: Application Layer 64

SMTP and Electronic Mail


One of the very useful things about Internet is that it allows you almost instantly exchange of electronic
message (e-mail) across the worlds. E-mail is a popular way of communication on the electronic
frontier. You can E-mail to your friend or a researcher or anybody for getting a copy of a selected
paper. Electronic mail system provides services that allowed complex communication and interaction.
E-mail provide the following facilities:
 Composing and sending/receiving a message.
 Storing/forwarding/deleting/replying to a message.
 Sending a single message to more than one person.
 Sending text, voice, graphics and video.
 Sending a message that interacts with other computer programs.
Another commonly used Internet service is electronic mail. E-mail uses an application level protocol
called Simple Mail Transfer Protocol or SMTP. SMTP is also a text-based protocol, but unlike
HTTP, SMTP is connection oriented. SMTP is also more complicated than HTTP. There are two
software tools available on the Internet.

Electronic Mail outgoing


message queue
user mailbox
user
Three major components: agent
 user agents mail
user
server
 mail servers agent
 simple mail transfer SMTP mail
protocol: SMTP server user
SMTP agent
User Agent
 a.k.a. “mail reader” SMTP
mail user
 composing, editing, reading agent
server
mail messages
 e.g., Eudora, Outlook, elm, user
Mozilla Thunderbird agent
user
 outgoing, incoming messages agent
stored on server
2: Application Layer 50
Electronic Mail: mail servers
user
Mail Servers agent
 mailbox contains incoming mail
user
messages for user server
agent
 message queue of outgoing
SMTP mail
(to be sent) mail messages
server user
 SMTP protocol between mail
servers to send email SMTP agent

messages SMTP
 client: sending mail mail user
agent
server server
 “server”: receiving mail
user
server agent
user
agent

2: Application Layer 51

Electronic Mail: SMTP [RFC 2821]

 uses TCP to reliably transfer email message from client


to server, port 25
 direct transfer: sending server to receiving server
 three phases of transfer
 handshaking (greeting)
 transfer of messages
 closure
 command/response interaction
 commands: ASCII text
 response: status code and phrase

 messages must be in 7-bit ASCII

2: Application Layer 52
Scenario: Alice sends message to Bob
1) Alice uses UA to compose 4) SMTP client sends Alice’s
message and “to” message over the TCP
[email protected] connection
2) Alice’s UA sends message 5) Bob’s mail server places the
to her mail server; message message in Bob’s mailbox
placed in message queue 6) Bob invokes his user agent
3) Client side of SMTP opens to read message
TCP connection with Bob’s
mail server

1 mail
mail
server user
user server
2 agent
agent 3 6
4 5

2: Application Layer 53

Http and World Wide Web:


One of the most commonly used services on the Internet is the World Wide Web (WWW). The
application protocol that makes the web work is Hypertext Transfer Protocol or HTTP. Do not
confuse this with the Hypertext Markup Language (HTML). HTML is the language used to write web
pages. HTTP is the protocol that web browsers and web servers use to communicate with each other
over the Internet. It is an application level protocol because it sits on top of the TCP layer in the
protocol stack and is used by specific applications to talk to one another. In this case the applications
are web browsers and web servers. HTTP is a connectionless text based protocol. Clients (web
browsers) send requests to web servers for web elements such as web pages and images. After the
request is serviced by a server, the connection between client and server across the Internet is
disconnected. A new connection must be made for each request. Most protocols are connection
oriented. This means that the two computers communicating with each other keep the connection open
over the Internet. HTTP does not however. Before an HTTP request can be made by a client, a new
connection must be made to the server.

Usenet and Newsgroups:


In Internet there exists another way to meet people and share information. One such way is through
Usenet newsgroups. These are special groups set up by people who want to share common interests
ranging from current topics to cultural heritages. These are currently thousands of Usenet newsgroups.
The Usenet can be considered as another global network of computers and people, which is interwined
with the Internet. However, Usenet does not operate interactively like the Internet, instead Usenet
machines store the messages sent by users. Unlike mail from mailing lists, the news articles do not
automatically fill your electronic mailbox. For accessing the information on newsnet, one needs a
special type of program called a newsreader. This program help in retrieving only the news you want
from Usenet storage site and display it on your terminal. Usenet is like living thing, New newsgroups
gets added, the groups which have too much traffic get broken up into smaller specialized groups, the
groups even can dissolve themselves. However, all of this occurs based on some commonly accepted
rules and by voting. For Usenet, there is no enforcement body; it entirely depends on the cooperation of
its computers owners and users.

The newsgroups are really meant fro interaction of people who share your interests. You can post your
own questions as well as your answers to the questions of others, on the Usenet. One thing, which is
worth mentioning here, is that when one is interacting wit people on Internet certain mannerism should
be adopted. These rules are sometimes called “netiquette”. In a face-to-face conversation you can
always see a person’s facial gestures and hand movements and can ascertain whether he is teasing or is
being sarcastic or sometimes even lying. However, in on-line interaction one cannot see the person one
is interacting with. The rules of netiquette may help to compensate some of these limitations of this on-
line environment.
FTP:

FTP: the file transfer protocol

FTP file transfer


FTP FTP
user client server
interface
user
at host remote file
local file system
system

 transfer file to/from remote host


 client/server model
client: side that initiates transfer (either to/from

remote)
 server: remote host
 ftp: RFC 959
 ftp server: port 21

2: Application Layer 46
FTP: separate control, data connections
TCP control connection
 FTP client contacts FTP server port 21
at port 21, TCP is transport
protocol TCP data connection
 client authorized over control FTP port 20 FTP
connection client server
 client browses remote
 server opens another TCP
directory by sending commands
data connection to transfer
over control connection.
another file.
 when server receives file
 control connection: “out of
transfer command, server
band”
opens 2nd TCP connection (for
file) to client  FTP server maintains “state”:
current directory, earlier
 after transferring one file,
authentication
server closes data connection.
2: Application Layer 47

FTP only understands two basic file formats. It classifies each file either as a text file or a binary file. A
text file contains a sequence of characters collected into lines. Although computers used ASCII
encoding for text files, FTP includes commands to translate between ASCII and other character
encoding. FTP uses the classification
binary file for all nontext files. The user must specify binary for any file that contains:
o A computer program
o Audio data
o A graphic or video image
o A spreadsheet
o A document from a word processor
o A compressed file
FTP service compress files to reduce the total amount of disk space the files require. Before
transferring a file user must tell FTP that the file contains ASCII text or nontext file. FTP assumes to
perform ASCII transfers unless the user enters the binary command.
Telnet
TELNET stands for TErminal NETwork. Telnet is both a TCP/IP application and a protocol for
connecting a local computer to a remote computer. Telnet is a program that allows an Internet host
computer to become a terminal of another host on the Internet. Telnet is the Internet remote login
service. Telnet protocol specifies exactly how a remote login interacts. The standard specifies how to
client contacts the server and how the server encodes output for transmission to the client. To use the
Telnet service, one must invoke the local application program and specify a remote machine. The local
program becomes a client, which forms a connection to a server on the remote computer. The client
passes keystrokes and mouse movements to the remote machine and displays output from the remote
machine on the user’s display screen. Telnet provides direct access to various services on Internet.
Some of these services are available on your host, but Telnet is especially useful when these services
are not available on your host.

The working of TELNET


1. The commands and characters are sent to the operating system on the common server computer.
2. The local operating system sends these commands and characters to a TELNET client program,
which is located on the same local computer.
3. The TELNET client transforms the characters entered by the user to an agreed format known as
Network Virtual Terminal (NVT) characters and sends them to the TCP/IP protocol stack of the
server computer. NVT is the common device between the client and server.
4. The commands and text are first broken into TCP and then IP packets and are sent across the
physical medium from the local client computer to the server.
5. At the server computer’s end, the TCP/IP software collects all the IP packets, verifies their
correctness and reconstructs the original command and handover the commands or text to that
computer operating system.
6. The operating system of the server computer hands over these commands or text to the
TELNET server program, which is executing on that remote computer.
7. The TELNET server program on the remote server computer then transforms the commands or
text from the NVT format to the format understood by the remote computer. The TELNET
cannot directly handover the commands or text to the operating system so TELNET hands over
the commands/text to the Psuedo-terminal driver.
8. The Pseudo-terminal driver program then hands over the commands or text to the operating
system of the remote computer, which then invokes the application program on the remote
server.
The working of the TELNET is extremely simple. Suppose you are working as a faculty member of
MIET, Meerut. You have a typical account FACULTY-1 on the MIET, Department of Computer
Science and Engineering, which is one of the hosts of the Internet. You are selected for academic
exchange scholarship to USA. You will get a user account in U.S.A. However, all your colleagues
know only your MIET account. Thus, using Telnet you can always log on to your account in India for
mail your papers for using programs etc.

Search Engines:
 Search Engines are programs that search the web. Web is a big graph with the pages being the
nodes and hyperlinks being the arcs. Search engines collect all the hyperlinks on each page they
read, remove all the ones that have already been processed and save the rest.
 The Web is then searched breadth-first, i.e. each link on page is followed and all the hyperlinks
on all the pages pointed to are collected but they are not traced in the order obtained.
 Automated search is the service that is provided by Search engines. An automated search
service allows an individual to find information that resides on remote computers. Automated
search systems use computer programs to find web pages that contain information related to a
given topic.
 It allows to locate:
i. Web pages associated with a particular company or individual
ii. Web pages that contain information about a particular product.
iii. Web pages that contain information about a particular topic.
 The results of an automated search can be used immediately or stored in a file on disk to use it
later. The results of a search are returned in the form of a web page that has a link to each of the
items that was found. Automated search is helpful when a user wants to explore a new topic.
The automated search produces a list of candidate pages that may contain information. The user
reviews each page in the list to see whether the contents are related to topic or not. If so, the
user records the location or if not user moves on to the page in the list.
Web Browser
A Web browser is software program that allows you to easily display Web pages and navigate the Web.
The first graphical browser, Mosaic, was developed in Illinois at the National Center for
Supercomputing Applications (NCSA). Each browser displays Web-formatted documents a little
differently. As with all commercial software, every program has its own special features.

The two basic categories of Web browser are:


i. Text-only browsers: A text-only browser such as Lynx allows you to view Web
pages without showing art or page structure. Essentially, you look at ASCII text on a
screen. The advantage of a text-only browser is that it displays Web pages very fast.
There's no waiting for multimedia downloads.
ii. Graphical browsers: To enjoy the multimedia aspect of the Web, you must use a
graphical browser such as Netscape Navigator or NCSA Mosaic. Graphical browsers
can show pictures, play sounds, and even run video clips. The drawback is that
multimedia files, particularly graphics, often take a long time to download.
Graphical browsers tend to be significantly slower than their text-only counterparts.
And this waiting time can be stretched even further with slow connections or heavy
online traffic. Many different browsers are available for exploring the Internet. The
two most popular browsers are Netscape Navigator and Microsoft Internet Explorer.
Both of these are graphical browsers, which means that they can display graphics as
well as text.

Introduction to client-server computing

 Client/server model is a distributed application structure that partitions tasks or workloads


between the providers of a resource or services called server and service requesters called
clients.
 Examples of computer applications that uses the client/server model are Email, Network
Printing and WWW.

What Is A Client/Server?

Client
A client is a single-user workstation that provides presentation services, database services and
connectivity along with an interface for user interaction to acquire business needs.

Server
A server is one or more multi-user processors with a higher capacity of shared memory which provides
connectivity and the database services along with interfaces relevant to the business procedures.

Client/Server computing provides an environment that enhances business procedures by appropriately


synchronizing the application processing between the client and the server.
Figure :Client/Server Architecture

The protocol relies on the basis of request serving; request for services by clients; response of
processed results by the server. The communication between the two aspects is gained through
InterProcess communication (IPC) which facilitates the distributed placement of the client and server
procedures.

The Client/Server model is basically platform independent and blends with “cooperating processing” or
“peer-to-peer” model. The platform provides the opportunity for users to access the business
functionality thereby exposing into risky situations since its transparent to the underlying technology
aswell as to the user.

Characteristics of the Client and Server:


The clients and the servers are the logical entities that work together over a network to accomplish a
task.
Service: The client/server is basically a relationship between processes running on distributed devices,
server process considered as a supplier of services where the client process is a consumer of services.
Briefly, this methodology provides a separation of functionalities subject to offered services.

Resource sharing: A server is eligible of handling clients simultaneously, controlling the service
access for the resources.

Asymmetrical protocols: Client/server is considered as a many-to-one relationship which is initiated


by clients through request of service while the server passively awaits. Sometimes a client may pass a
reference to a callback object when it requests a service. This enforces the server call back the client,
making the server a client itself.
Transparency of location: The server process can reside in a client or any machine across a network.
In such situations Client/Server software is responsible for implying the server location by redirecting
service calls. Therefore a program can be a client/server/or both.
Inter- Communication via messages: Interaction between clients and servers is obtained through a
message-passing mechanism mainly to deliver service requests and responses.
Encapsulation of services: A server is specialized in satisfying client requests varyingly and can be
upgraded without affecting its external environment (clients, shared resources) as long as the message
broadcasting interface remains the same.
Scalability: Client/Server systems can be scaled horizontally or vertically. Horizontal scaling implies
the addition or removal of client workstations with a minor impact in performance. Migration to more
efficient servers or dividing the work load over numerous servers is considered as vertical scaling.
Integrity: Since the server code and server data is managed centrally, maintenance cost is less and
results in shared data consistency and undependability of clients.

Advantages
Improved Data Sharing: Data is retained by usual business processes and manipulated on a server is
available for designated users (clients) over an authorized access. The use of Structured Query
Language (SQL) supports open access from all client aspects and also transparency in network services
depict that similar data is being shared among users.
Integration of Services: Every client is given the opportunity to access corporate information via the
desktop interface eliminating the necessity to log into a terminal mode or another processor. Desktop
tools like spreadsheet, power point presentations etc can be used to deal with corporate data with the
help of database and application servers resident on the network to produce meaningful information.
Shared Resources amongst Different Platforms: Applications used for client/server model is built
regardless of the hardware platform or technical background of the entitled software (Operating System
S/W) providing an open computing environment, enforcing users to obtain the services of clients and
servers (database, application, communication servers).
Inter-Operation of Data: All development tools used for client/server applications access the back-
end database server through SQL, an industry-standard data definition and access language, helpful for
consistent management of corporate data. Advanced database products enable user/application to gain a
merged view of corporate data dispersed over several platforms. Rather than a single target platform
this ensures database integrity with the ability to perform updates on multiple locations enforcing
quality recital and recovery.

Data Processing capability despite the location: We are in an era which undergoes a transformation
of machine-centered systems to user-centered systems. Machine-centered systems like mainframe,
mini-micro applications had unique access platforms and functionality keys, navigation options,
performance and security were all visible. Through client/server users can directly log into a system
despite of the location or technology of the processors.
Easy maintenance: Since client/server architecture is a distributed model representing dispersed
responsibilities among independent computers integrated across a network, it’s an advantage in terms
of maintenance. It’s easy to replace, repair, upgrade and relocate a server while clients remain
unaffected. This unawareness of change is called as encapsulation.

Security: Servers have better control access and resources to ensure that only authorized clients can
access or manipulate data and server-updates are administered effectively.

You might also like