Transcript Chapter 1

BIL 374 Internet Technologies
Dr. Ahmet Cengizhan Dirican
1. Fundamentals
Internet History
Internet Technologies
Dr. Ahmet Cengizhan Dirican
1-2
Internet History
• Origins
• ARPAnet - late 1960s and early 1970s
• Network reliability
• For ARPA-funded research organizations
• BITnet, CSnet - late 1970s & early 1980s
• email and file transfer for other institutions
• NSFnet - 1986
• Originally for non-DOD funded places
• Initially connected five supercomputer centers
• By 1990, it had replaced ARPAnet for non-military uses
• Soon became the network for all (by the early 1990s)
• NSFnet eventually became known as the Internet
Internet Technologies
Dr. Ahmet Cengizhan Dirican
1-3
What is Internet?
• What the Internet is:
• A world-wide network of computer networks
• At the lowest level, since 1982, all connections use TCP/IP
• TCP/IP (Transmission Control Protocol/Internet Protocol )
hides the differences among devices connected to the
Internet .
• TCP/IP can be used directly to allow a program on one
computer to communicate with a program on another
computer via the Internet.
• In most cases, a higher-level protocol runs on top of TCP/IP.
Nevertheless, it’s important to know that TCP/IP provides the
low-level interface that allows most computers (and other
devices) connected to the Internet to appear exactly the
same.
Internet Technologies
Dr. Ahmet Cengizhan Dirican
1-4
International Internet Backbone (2009)
Internet Technologies
Dr. Ahmet Cengizhan Dirican
1-5
Global Internet Traffic Map (2010)
Internet Technologies
Dr. Ahmet Cengizhan Dirican
1-6
Partial Map of The Internet (2005)
• Each line is
drawn between
two nodes,
representing two
IP addresses.
• This is a small
look at the map
of the Internet in
2005.
Internet Technologies
Dr. Ahmet Cengizhan Dirican
1-7
Internet in Turkey
• Turkey has had public Internet access since 1993.
• The first available connections were dial-up.
• Cable Internet has been available since 1998 and ADSL
since 2003.
• Now Turk Telecom ADSL24 is popular (1-16 Mbit/s).
• Internet Acces Dates of Some Intitutions in Turkey.
•
•
•
•
•
•
•
ODTÜ: 1993
Ege Üniversitesi: 1994
Bilkent: 1995
Boğaziçi Üniversitesi: 1995
İTÜ: 1996
Turnet / Ulaknet (Ulakbim): 1996
TTNet: Şubat 1998
Internet Technologies
Dr. Ahmet Cengizhan Dirican
1-8
Internet Protocols
Internet Technologies
Dr. Ahmet Cengizhan Dirican
1-9
Internet Protocols
• Internet Protocol (IP) Addresses
• Every node has a unique numeric address
• Form: 32-bit binary number
• New standard, IPv6, has 128 bits (1998)
• Organizations are assigned groups of IPs for their computers
• Problem: By the mid-1980s, several different protocols had
been invented and were being used on the Internet, all with
different user interfaces (Telnet, FTP, Usenet, mailto)
Users were required to learn all the different interfaces to
gain all the advantages of the Internet.
Than, a better approach was developed the World Wide
Web.
Internet Technologies
Dr. Ahmet Cengizhan Dirican
1-10
Domain Names (1/2)
• Form: host-name.domain-names
• First domain is the smallest; last is the largest
• Last domain specifies the type of organization
• Fully qualified domain name - the host name and all of the
domain names
• DNS servers - convert fully qualified domain names which
are given by users, to Ips
• Name servers serve a collection of machines on the Internet
and are operated by organizations that are responsible for
the part of the Internet to which those machines are
connected.
Internet Technologies
Dr. Ahmet Cengizhan Dirican
1-11
Domain Names Servers
Internet Technologies
Dr. Ahmet Cengizhan Dirican
1-12
The World-Wide Web
Internet Technologies
Dr. Ahmet Cengizhan Dirican
1-13
The World-Wide Web
• A possible solution to the proliferation of different
protocols being used on the Internet; a new protocol
for the internet, as well a system of document
access to use it..
• Origins
• Tim Berners-Lee at CERN proposed the Web in
1989
• Purpose: to allow scientists to have access to
many databases of scientific work through
their own computers
Internet Technologies
Dr. Ahmet Cengizhan Dirican
1-14
The World-Wide Web
• The proposed new system was designed to allow a
user anywhere on the Internet
• to search for and
• retrieve documents
• from databases on any number of different
document-serving computers connected to the
Internet.
• Document form: hypertext
• Pages? Documents? Resources?
• We’ll call them documents
• Hypermedia – more than just text – links,
images, sound,
etc.
Internet Technologies
Dr. Ahmet Cengizhan Dirican
1-15
The World-Wide Web
• In an abstract sense,
• the Web is a vast collection of
documents,
• some of which are connected by links.
• These documents
• are accessed by Web browsers,
• and are provided by Web servers.
Internet Technologies
Dr. Ahmet Cengizhan Dirican
1-16
The World-Wide Web
• Web or Internet?
• The Internet is a collection of computers /
networks and other devices connected by
equipment that allows them to communicate with
each other.
• The Web is a collection of software and protocols
that has been installed on most, if not all, of the
computers on the Internet.
• The Web uses one of the protocols, http, that runs
on the Internet--there are several others (telnet,
mailto, etc.)
• The Web constitutes an important part of the
internet, though, the Internet can continue to
Internet Technologies
Dr. Ahmet
Cengizhan Dirican
1-17
function and be
usefull
without the Web.
Web Browsers (Clients) and Web
Servers
Internet Technologies
Dr. Ahmet Cengizhan Dirican
1-18
Client and Server
• Clients and Servers are programs that communicate with
each other over any network and the Internet.
• A Server runs continuously, waiting to be contacted by a
Client
• Each Server provides certain services
• Services include providing web pages for Web servers
• A Client will send a message to a Server requesting the
service provided by that server
• The client will usually provide some information,
parameters, with the request
Internet Technologies
Dr. Ahmet Cengizhan Dirican
1-19
Web Browsers
• Browsers are clients - always initiate, servers react
(although sometimes servers require responses)
• Mosaic - NCSA (Univ. of Illinois), in early 1993
• First to use a GUI, led to explosion of Web use
• Initially for X-Windows, under UNIX, but was ported to
other platforms by late 1993
• Most requests are for existing documents, using HyperText
Transfer Protocol (HTTP)
• But some requests are for program execution, with
the output being returned as a document
Internet Technologies
Dr. Ahmet Cengizhan Dirican
1-20
Web Servers
• Provide responses to browser requests, either
• existing documents or
• dynamically built documents
• Browser-server connection is now maintained
through more than one request-response cycle.
• All communications between browsers and servers
use Hypertext Transfer Protocol (HTTP)
Internet Technologies
Dr. Ahmet Cengizhan Dirican
1-21
Web Server Operation
• Web servers run as background processes in
the operating system
– Monitor a communications port on the host,
accepting HTTP messages when they appear
• All current Web servers came from either
1.The original from CERN
2.The second one, from NCSA
Internet Technologies
Dr. Ahmet Cengizhan Dirican
1-22
Web Server Operation Details
• Web servers have two main directories:
1.Document root (servable documents)
2.Server root (server system software)
• Document root is accessed indirectly by clients
– Its actual location is set by the server configuration file
– Requests are mapped to the actual location
• Virtual document trees
• Virtual hosts
• Proxy servers
• Web servers now support other Internet protocols
Internet Technologies
Dr. Ahmet Cengizhan Dirican
1-23
Web Server Operation : Apache
• Apache (open source, portable, fast, reliable)
• Operation is maintained through a configuration file.
–Directives (operation control):
ServerName
ServerRoot
ServerAdmin,
DocumentRoot
Alias
Redirect
DirectoryIndex
UserDir
Internet Technologies
Dr. Ahmet Cengizhan Dirican
1-24
Web Server Operation : IIS
- The Web Server solution of Microsoft.
- The second most popular web server.
- Operation is maintained through a program with a GUI interface.
- Designed and available to work only within the Windows.
- Although this limits the deployment platforms for IIS-based Web
services, it also provides a number of benefits, including
- greater cooperation with the host operating system
- easier management and control through a variety of
standard OS tools and utilities.
Internet Technologies
Dr. Ahmet Cengizhan Dirican
1-25
Uniform Resource Locators (URLs)
Internet Technologies
Dr. Ahmet Cengizhan Dirican
1-26
URLs
• Uniform (or universal) resource locators (URLs) are used to identify
documents (resources) on the Internet.
• There are many different kinds of resources, identified by different forms
of URLs.
• General form:
scheme:object-address
• The scheme is often a communications protocol, such as telnet or ftp
• For the http protocol, the object-address is: fully qualified domain
name/doc path
• //fully-qualified-domain-name/path-to-document
• For the file protocol, only the doc path is needed
• file://path-to-document
Internet Technologies
Dr. Ahmet Cengizhan Dirican
1-27
URLs
• Host name may include a port number, as in zeppo:80 (80
is the default, so this is silly)
• URLs cannot include spaces or any of a collection of other
special characters (semicolons, colons, ...)
• The doc path may be abbreviated as a partial path
• The rest is furnished by the server configuration
• If the doc path ends with a slash, it means it is a directory
• file: http://www.w3schools.com/html/html_xhtml.asp
• Directory: http://www.hostway.com/web-resources/
Internet Technologies
Dr. Ahmet Cengizhan Dirican
1-28
Multipurpose Internet Mail Extentions
(MIME)
Internet Technologies
Dr. Ahmet Cengizhan Dirican
1-29
Multipurpose Internet Mail Extensions (MIME)
• Originally developed for email
• Used to specify to the browser the form of a file returned by
the server (attached by the server to the beginning of the
document)
• Type specifications
• Form:
type/subtype
• Examples: text/plain, text/html, image/gif, image/jpeg
Internet Technologies
Dr. Ahmet Cengizhan Dirican
1-30
Multipurpose Internet Mail Extensions (MIME)
• Server gets type from the requested file name’s suffix
(.html implies text/html)
• Browser gets the type explicitly from the server
• Experimental types
• Subtype begins with x-
•
e.g., video/x-msvideo
• Experimental types require the server to send a helper
application or plug-in so the browser can deal with the
file
Internet Technologies
Dr. Ahmet Cengizhan Dirican
1-31
HyperText Transfer Protocol (HTTP)
Internet Technologies
Dr. Ahmet Cengizhan Dirican
1-32
The HyperText Transfer Protocol
• HTTP is an Applicaiton Layer Protocol for disributed,
collobrative, hypermedia information systems.
• The protocol used by ALL Web communications
• Request Phase
• Form:
HTTP method domain part of URL HTTP ver.
Header fields
blank line
Message body
• An example of the first line of a request:
GET /degrees.html HTTP/1.1
Internet Technologies
Dr. Ahmet Cengizhan Dirican
1-33
The HyperText Transfer Protocol: Methods
• GET - Fetch a document
• POST - Execute the document, using the data in body
• HEAD - Fetch just the header of the document
• PUT - Store a new document on the server
• DELETE - Remove a document from the server
Internet Technologies
Dr. Ahmet Cengizhan Dirican
1-34
HTTP Headers
• Four categories of header fields:
General, request, response, & entity
• Common request fields:
Accept: text/plain
Accept: text/*
If-Modified_since: date
• Common response fields:
Content-length: 488
Content-type: text/html
- Can communicate with HTTP without
a browser
> telnet blanca.uccs.edu http
GET /respond.html HTTP/1.1
Host: blanca.uccs.edu
Internet Technologies
Dr. Ahmet Cengizhan Dirican
1-35
HTTP Response
•
Form:
Status code is a three-digit number; first
digit specifies the general status
Status line
•
Response header fields
1 => Informational
blank line
2 => Success
Response body
3 => Redirection
Status line format:
4 => Client error
5 => Server error
HTTP version status code explanation
•
Example:
HTTP/1.1 200 OK
The header field, Content-type, is required
(Current version is 1.1)
Internet Technologies
Dr. Ahmet Cengizhan Dirican
1-36
Security
Internet Technologies
Dr. Ahmet Cengizhan Dirican
1-37
Computer and Security
• The objective of computer security includes protection of
information and property from theft, corruption, or natural
disaster, while allowing the information and property to
remain accessible and productive to its intended users.
• The term computer system security means the collective
processes and mechanisms by which sensitive and valuable
information and services are protected from publication,
tampering or collapse by unauthorized activities or
untrustworthy individuals and unplanned events
respectively.
• Internet and the Web are fertile grounds for security
problems.
• Client – Server communication
• The larger/complexer the system, the bigger the problems
Internet Technologies
Dr. Ahmet Cengizhan Dirican
1-38
Web Security (1/2)
• One aspect of Web security is the matter of getting one’s
data from the browser to the server and having the server
deliver data back to the browser without anyone or any
device intercepting or corrupting those data along the way.
• Example: Transmitting the credit card number
• Privacy—it must not be possible for the credit card number to be
stolen on its way to the company’s server.
• Integrity—it must not be possible for the credit card number to be
modified on its way to the company’s server.
• Authentication—it must be possible for both the purchaser and the
seller to be certain of each other’s identity.
• Nonrepudiation—it must be possible to prove legally that the
message was actually sent and received.
• Solution: Encryption
Internet Technologies
Dr. Ahmet Cengizhan Dirican
1-39
Web Security (2/2)
• Other problem: the intentional and malicious destruction of
data on computers attached to the Internet.
• DoS Attacks
• Viruses : the ILOVEYOU virus, and the CodeRed
• Worms: the Blaster worm
• Solution: Antivirus softwares, Firewalls, Using captcha
(Completely Automated Public Turing test to tell Computers
and Humans Apart), Conscious Users
Internet Technologies
Dr. Ahmet Cengizhan Dirican
1-40
XHTML
Plug-ins
Filters
XML
Javascript
Java, Perl, Ruby, PHP
The Web Programmer’s Toolbox
• Document languages and programming languages that are the
building blocks of the web and web programming.
Internet Technologies
Dr. Ahmet Cengizhan Dirican
1-41
Client-side or Server-side
• Web programs and scripts are divided into two
categories—client side and server side
• —according to where they are interpreted or
executed.
• XHTML and XML are client-side languages;
• PHP and ASP are server-side languages;
• JavaScript is most often a client-side language,
although it can be used for both.
Internet Technologies
Dr. Ahmet Cengizhan Dirican
1-42
HTML
• HTML is a language for describing web pages.
• stands for Hyper Text Markup Language
• is not a programming language, it is a markup language
• A markup language is a set of markup tags
• HTML uses markup tags to describe web pages
• HTML markup tags are usually called HTML tags
• HTML tags are keywords surrounded by angle brackets like
<html>
• HTML tags normally come in pairs like <b> and </b>
Internet Technologies
Dr. Ahmet Cengizhan Dirican
1-43
Why XHTML
• Many pages on the internet contain "bad" HTML
• XML is a markup language where documents must be
marked up correctly and "well-formed".
• Today's market consists of different browser technologies.
Some browsers run on computers, and some browsers run
on mobile phones or other small devices. Smaller devices
often lack the resources or power to interpret a "bad" markup
language.
• Therefore - by combining the strengths of HTML and XML,
XHTML was developed. XHTML is HTML redesigned as
XML.
Internet Technologies
Dr. Ahmet Cengizhan Dirican
1-44
XHTML
• XHTML stands for EXtensible HyperText Markup
Language
• XHTML is almost identical to HTML 4.01
• XHTML is a stricter and cleaner version of HTML
4.01
• XHTML is HTML defined as an XML application
• XHTML is supported by all major browsers.
Internet Technologies
Dr. Ahmet Cengizhan Dirican
1-45
Creating XHTML documents
• XHTML editors - make document creation easier
• Shortcuts to typing tag names, spell-checker,
• WYSIWYG (Wizzy-Wig)) XHTML editors
• What You See is What You Get
• Need not know XHTML to create XHTML documents
Internet Technologies
Dr. Ahmet Cengizhan Dirican
1-46
Plugins and Filters for XHTML
• Plugins
• Integrated into tools like word processors, effectively
converting them to WYSIWYG XHTML editors
• Filters
• Convert documents in other formats to XHTML
Internet Technologies
Dr. Ahmet Cengizhan Dirican
1-47
Plugins and Filters: Advantages and Disadvantages
• Advantages of both filters and plug-ins:
• Existing documents produced with other tools can be
converted to XHTML documents
• Use a tool you already know to produce XHTML
• Disadvantages of both filters and plug-ins:
• XHTML output of both is not perfect - must be fine tuned
• XHTML may be non-standard
• You have two versions of the document, which are difficult
to synchronize
Internet Technologies
Dr. Ahmet Cengizhan Dirican
1-48
CSS
• Cascadin Style Sheets
• Provides the means to control and change
presentation of HTML documents.
• Not technically HTML, but can be embedded in
HTML documents.
• More capable than HTML in enrching the
document view.
• Style sheets allow you to impose a standard style
on a whole document, or even a whole collection
of documents.
Internet Technologies
Dr. Ahmet Cengizhan Dirican
1-49
XML
• XML (Extensible Markup Language)
• Derived from Standard Generalized Markup Language (SGML)
• Open technology for electronic data exchange and storage
• Create other markup languages to describe data in structured
manner
• XML documents
•
•
•
•
•
Contain only data, not formatting instructions
Highly portable
XML parser
Support Document Object Model or Simple API XML
Document Type Definition (DTD, schema)
• XML document can reference another that defines proper structure
• XML-based markup languages
• XML vocabularies
Internet Technologies
Dr. Ahmet Cengizhan Dirican
1-50
JavaScript
• A client-side HTML-embedded scripting
language
• Only related to Java through syntax
• Dynamically typed and not object-oriented
• Provides a way to access elements of HTML
documents and dynamically change them
Internet Technologies
Dr. Ahmet Cengizhan Dirican
1-51
VBScript
– Subset of Microsoft Visual Basic
– Specific to Internet Explorer
– JavaScript has replaced VBScript as standard
– Most commonly used alongside ASP
• Active Server Pages
• VBScript is case-insensitive
• Not necessary to declare a data type
• Limited use in modern web programming.
Internet Technologies
Dr. Ahmet Cengizhan Dirican
1-52
CGI (1/2)
• The Common Gateway Interface (CGI) is a protocol
describing a standard way of providing server-side active
web content.
• Standard interface through which users interact with
applications on Web servers
• Provides way for clients to interact with applications on Web
server
• CGI script
• Can be written in many different languages, including Perl
• Data from forms will be encoded in a request sent do the
server
• This data can be used by a CGI program.
Internet Technologies
Dr. Ahmet Cengizhan Dirican
1-53
CGI (2/2)
Data path of a typical CGI-based application.
Internet Technologies
Dr. Ahmet Cengizhan Dirican
1-54
Perl
• Provides server-side computation for HTML documents,
through CGI (Communication Gateway Interface)
• Perl is good for CGI programming because:
• Direct access to operating systems functions
• Powerful character string pattern-matching operations
• Access to database systems
• Perl is highly platform independent, and has been ported to
all common platforms
• Perl is not just for CGI
Internet Technologies
Dr. Ahmet Cengizhan Dirican
1-55
ASP
• ASP is a server-side scripting technology developed by
Microsoft.
• With ASP you can create dynamic web pages by putting
script code inside your HTML pages.
• The code is executed by the web server before the page is
returned to the browser.
• Both VBScript and JavaScript can be used.
• ASP is a standard component in Windows 95,98, 2000, and
XP but not Vista, 7 and 8. Nevertheless, it can be activated
on all computers running Windows.
• ASP code is contained between the tags <% and %>
Internet Technologies
Dr. Ahmet Cengizhan Dirican
1-56
PHP
•
•
•
•
Originally called “Personal Home Page Tools”
A server-side scripting language and alternative to CGI
Similar to Perl and C
Great for form processing and database access through the
Web
• Open-source:Anyone may view, modify and redistribute
source code and supported freely by community
• PHP supports many databases, such as MySQL, Informix,
Oracle, Sybase, Solid, PostgreSQL, Generic ODBC, etc.
• PHP code is contained between the tags <?php and ?>
Internet Technologies
Dr. Ahmet Cengizhan Dirican
1-57
Java (Applets, Servlets, JSP, JFS)
• General purpose object-oriented programming language
• Based on C++, but simpler and safer
• Web solutions:
• Client side: applets
• Serve side: servlets, JSP
Internet Technologies
Dr. Ahmet Cengizhan Dirican
1-58
Java: Servlets
• A servlet is a compiled Java class, an object of which is
executed on the server system when requested by the
XHTML document being displayed by the browser.
• A servlet produces an XHTML document as a response,
• some parts of which are static and are generated by
simple output statements,
• while other parts are created dynamically when the
servlet is called.
• A servlet is a Java class designed to be run in the context of
a special servlet container
Internet Technologies
Dr. Ahmet Cengizhan Dirican
1-59
Java: Servlet Sample
Internet Technologies
Dr. Ahmet Cengizhan Dirican
1-60
Java: JSP
• JSP is a server-side technology much like ASP, developed
by Sun.
• JSP takes an opposite approach to that of servlets:
• Instead of embedding XHTML in Java code that provides
dynamic documents, code of some form is embedded in XHTML
documents to provide the dynamic parts ofa document.
• With JSP you can create dynamic web pages by putting
Java code inside your HTML pages. The code is executed
by the web server before the page is returned to the
browser.
• Since JSP uses Java, the technology is not restricted to any
server-specific platform.
• A Java Server Page is first converted to a servlet which is
then operates as previously described
Internet Technologies
Dr. Ahmet Cengizhan Dirican
1-61
ASP.NET (1/2)
• NET is a collection of technologies
• Run time environment, Library, Programming
languages
• Independent from a specific programming
language
• Promotes software reuse
• Include tools for porting, adapting existing
software components
• Web services
Internet Technologies
Dr. Ahmet Cengizhan Dirican
1-62
ASP.NET (2/2)
• ASP.NET documents extend the System.Web.UI.Page class
• Server-side technology that dynamically builds
documents in response to client requests
• Can be used on a server to create Web applications
• Supports over 25 programming languages
• Object-oriented programming
Internet Technologies
Dr. Ahmet Cengizhan Dirican
1-63
Ajax
•
•
•
•
AJAX = Asynchronous JavaScript and XML.
Ajax is not an API or a programming language
Ajax aims to provide more responsive web applications
In normal request/response HTTP cycles, the browser locks
waiting for the response and an entire page must be
displayed
• With Ajax, asynchronous requests may be made and
responses are used to update part of a page
• User can continue to interact with a page while the
request is in progress
• Less data needs to be transmitted
• Page update is quicker because only a part of a page is
modified
Internet Technologies
Dr. Ahmet Cengizhan Dirican
1-64
Flash
• Adobe Flash was created in 1996 as a way to display rich
media on a webpage. In the mid-90s, most websites were a
collection of static pages that displayed only text and
images.
• People were able to create moving animations and clickable
interactive graphics that went beyond the capabilities of
standard HTML and CSS.
• Quickly create rich interactive graphics using a timelinebased software tool.
• These documents are served by Web server to browsers,
which use the flash player plug-in to display the documents.
• It’s a a cross-browser compatible tool that works the same
on Internet Explore, Firefox, Mozilla, Opera and Chrome.
Internet Technologies
Dr. Ahmet Cengizhan Dirican
1-65