Amazon.com Mashups, Francis Shanahan, ( Chap 1 and Chap 6)
Essential Actionscript 3.0, Colin Moock
Ajax Bible, Steven Holzner
A Web 2.0 Primer Pragmatic Ajax, Justin Gehland
Impact of World Wide Web
History of Computers, Evolution from Dynosaurs to human analogy
Tim Berners Lee, 1990
Sun Microsystems and Java
Open Source, Commercial Software
Dot Com burst
Uses of Web
Photo, video, audio, Maps
Online Education and Examination
Medical and Health
Applications: Calender, Accounting, etc
What is Web 2.0 ?
What is Web 1.0?
Website were well insulated entities that executed entirely within the browser and well within their own sphere of influence.
Users were important but no one would dare venture so far as to suggest that users specify what they wanted.
Web 2.0 like art, has no real definition.
The term folksonomy refers to the process whereby a group of people collaborate to organize information using an impromptu vocabulary.
A common example in the corporate world is team building excercises, whereby a group of individuals rearrange flash cards on the floor or stickers on a white board. By getting a large group of people’s input, you have a higher probability of getting an appropriate classification of the information in question.
How do Folksonomies apply to web 2.0?
In the web 2.0, there is a huge amount of information and it’s updated constantly.
It would be naïve to think that any one company could categorize that information so accurately that classification would make sense to everyone.
Who better to categorize data than the people closest to it?
For example Amazon allows users to tag products with key words. Over time, this will evolve into its own folksonomy where the users are adding value for other users simply by using amazon site.
Software as a Service
Web 2.0 is about exposing a rich functionality set and much more data.
The data is generally accessible to both humans and machines, leading to more automation and derived applications than ever before.
The Web 2.0 world, companies are seeing more and more value in offering functionality in reusable and interoperable channels such as web services.
These channels are then handed over to the user for them to do with as they see fit.
Web 2.0 puts more trust in the user than ever before.
Data is the King
Rich Browser Experience
Multiple Delivery channels
Rise of the Individual Developer
Amazon and Web 2.0
Network applications: some jargon
Process: program running within a host.
within same host, two processes communicate using interprocess communication (defined by OS).
processes running in different hosts communicate with an application-layer protocol
user agent: interfaces with user “above” and network “below”.
implements user interface & application-level protocol
define messages exchanged by apps and actions taken
use communication services provided by lower layer protocols (TCP, UDP)
application transport network data link physical application transport network data link physical application transport network data link physical
App-layer protocol defines
Types of messages exchanged, eg, request & response messages
Syntax of message types: what fields in messages & how fields are delineated
Semantics of the fields, ie, meaning of information in fields
Rules for when and how processes send & respond to messages
defined in RFCs
allows for interoperability
eg, HTTP, SMTP
Typical network app has two pieces: client and server
initiates contact with server (“speaks first”)
typically requests service from server,
Web: client implemented in browser; e-mail: in mail reader
provides requested service to client
e.g., Web server sends requested Web page, mail server delivers e-mail
application transport network data link physical application transport network data link physical request reply
Processes communicating across network
process sends/receives messages to/from its socket
socket analogous to door
sending process shoves message out door
sending process assumes transport infrastructure on other side of door which brings message to socket at receiving process
Internet controlled by OS controlled by app developer
API: (1) choice of transport protocol; (2) ability to fix a few parameters (lots more on this later)
process TCP with buffers, variables socket host or server process TCP with buffers, variables socket host or server
For a process to receive messages, it must have an identifier
Every host has a unique 32-bit IP address
Q: does the IP address of the host on which the process runs suffice for identifying the process?
Answer: No, many processes can be running on same host
Identifier includes both the IP address and port numbers associated with the process on the host.
Example port numbers:
HTTP server: 80
Mail server: 25
More on this later
What transport service does an app need?
some apps (e.g., audio) can tolerate some loss
other apps (e.g., file transfer, telnet) require 100% reliable data transfer
some apps (e.g., Internet telephony, interactive games) require low delay to be “effective”
some apps (e.g., multimedia) require minimum amount of bandwidth to be “effective”
other apps (“elastic apps”) make use of whatever bandwidth they get
Transport service requirements of common apps Application file transfer e-mail Web documents real-time audio/video stored audio/video interactive games instant messaging Data loss no loss no loss no loss loss-tolerant loss-tolerant loss-tolerant no loss Bandwidth elastic elastic elastic audio: 5kbps-1Mbps video:10kbps-5Mbps same as above few kbps up elastic Time Sensitive no no no yes, 100’s msec yes, few secs yes, 100’s msec yes and no
Internet transport protocols services
connection-oriented: setup required between client and server processes
reliable transport between sending and receiving process
flow control: sender won’t overwhelm receiver
congestion control: throttle sender when network overloaded
does not provide: timing, minimum bandwidth guarantees
unreliable data transfer between sending and receiving process
does not provide: connection setup, reliability, flow control, congestion control, timing, or bandwidth guarantee
Q: why bother? Why is there a UDP?
Internet apps: application, transport protocols Application e-mail remote terminal access Web file transfer streaming multimedia Internet telephony Application layer protocol SMTP [RFC 2821] Telnet [RFC 854] HTTP [RFC 2616] FTP [RFC 959] proprietary (e.g. RealNetworks) proprietary (e.g., Dialpad) Underlying transport protocol TCP TCP TCP TCP TCP or UDP typically UDP
Domain Name System
Sending email to Ip address such as [email_address] complicates the matter:
Every time tana changes her machine, her email id has to change
Numbers complicate the matter
Hence ASCII names were introduced i.e., [email_address]
Since network only understands the numerical addresses, DNS was introduced to convert ASCII strings to network addresses.
In early days of ARPANET, there was simply a file, hosts.txt, that listed all the hosts and IP addresses. For a network of few hundred machines, this approach worked very well.
However, when thousands of PCs and computers were connected to net, a new approach was needed.
The DNS was invented to solve this problem
DNS is a hierarchical, domain based naming scheme and a distributed database system.
DNS is used for mapping host names and email destinations to IP addresses.
DNS: Domain Name System
People: many identifiers:
SSN, name, passport #
Internet hosts, routers:
IP address (32 bit) - used for addressing datagrams
“ name”, e.g., gaia.cs.umass.edu - used by humans
Q: map between IP addresses and name ?
. The DNS Name Space
. Resource Records
. Name Servers
Domain Name System:
distributed database implemented in hierarchy of many name servers
application-layer protocol host, routers, name servers to communicate to resolve names (address/name translation)
note: core Internet function, implemented as application-layer protocol
complexity at network’s “edge”
DNS Name Space
Managing a large and constantly changing set of names is a nontrivial task.
In postal system, name management is done by requiring letters to specify: country, state, city, street address, house number.
Thus there is no confusion between Marvin anderson on Main st. in white palms in NY and Marvin Anderson on Main St. in Austin Texas.
DNS works the same way.
The DNS Name Space
The internet is divided into over 200 top level domains.
Each domain covers many hosts.
Each domain is partitioned into sub domains and these are further partitioned etc.
A portion of the Internet domain name space.
DNS name servers
no server has all name-to-IP address mappings
local name servers:
each ISP, company has local (default) name server
host DNS query first goes to local name server
authoritative name server:
for a host: stores that host’s IP address, name
can perform name/address translation for that host’s name
Why not centralize DNS?
single point of failure
distant centralized database
DNS: Root name servers
contacted by local name server that can not resolve name
root name server:
contacts authoritative name server if name mapping not known
returns mapping to local name server
13 root name servers worldwide b USC-ISI Marina del Rey, CA l ICANN Marina del Rey, CA e NASA Mt View, CA f Internet Software C. Palo Alto, CA i NORDUnet Stockholm k RIPE London m WIDE Tokyo a NSI Herndon, VA c PSInet Herndon, VA d U Maryland College Park, MD g DISA Vienna, VA h ARL Aberdeen, MD j NSI (TBD) Herndon, VA
Part of the DNS name space showing the division into zones.
Name Servers (2)
Resolver on flits.cs.vu.nl wants to know the IP address of the host linda.cs.yale.edu
How a resolver looks up a remote name in eight steps.
Step1: flits.cs.vu.nl sends query to local name server cs.vu.nl
Step2: Local name server sends a UDP packet to the server edu-server.net
Step3: edu-server.net queries the name server yale.edu
Step4: yale.edu forwards the request to cs.yale.edu which has the authoritative resource records.
Step5-8: The resource record requested works its way back
This query method is also known as Recursive Query
Simple DNS example
host surf.eurecom.fr wants IP address of gaia.cs.umass.edu
1. contacts its local DNS server, dns.eurecom.fr
2. dns.eurecom.fr contacts root name server, if necessary
3. root name server contacts authoritative name server, dns.umass.edu, if necessary
requesting host surf.eurecom.fr gaia.cs.umass.edu root name server authorititive name server dns.umass.edu 1 2 3 4 5 6 local name server dns.eurecom.fr
Root name server:
may not know authoritative name server
may know intermediate name server: who to contact to find authoritative name server
requesting host surf.eurecom.fr gaia.cs.umass.edu root name server 1 2 3 4 5 6 authoritative name server dns.cs.umass.edu 7 8 local name server dns.eurecom.fr intermediate name server dns.umass.edu
DNS: iterated queries
puts burden of name resolution on contacted name server
contacted server replies with name of server to contact
“ I don’t know this name, but ask this server”
requesting host surf.eurecom.fr gaia.cs.umass.edu root name server 1 2 3 4 5 6 authoritative name server dns.cs.umass.edu 7 8 iterated query local name server dns.eurecom.fr intermediate name server dns.umass.edu
DNS: caching and updating records
once (any) name server learns mapping, it caches mapping
Every domain can have a set of resource records associated with it.
For single host, the most common resource record is its IP Address.
When a resolver gives a domain name to the DNS, it gets back the RRs associated with that name
name is domain (e.g. foo.com)
value is IP address of authoritative name server for this domain
name is hostname
value is IP address
name is alias name for some “cannonical” (the real) name
www.ibm.com is really
value is cannonical name
value is name of mailserver associated with name
RR is five tuple RR format: (Domain_name, Time_to_live, Class, Type, Value)
Domain name : tells the domain to which this record applies.
Time_to_live: field gives an indication of how stable the record is. Information that is highly stable is assigned large value such as 86400. Information that is highly volatile is assigned a smaller value as 60.
Class: field is always IN for internet information. For non-internet information, other codes can be used.
Type: field tells what kind of record this is.
The principal DNS resource records types.
Resource Records (2)
A portion of a possible DNS database for cs.vu.nl.
DNS protocol, messages
DNS protocol : query and reply messages, both with same message format
identification: 16 bit # for query, reply to query uses same #
query or reply
reply is authoritative
DNS protocol, messages Name, type fields for a query RRs in response to query records for authoritative servers additional “helpful” info that may be used
The World Wide Web
Static Web Documents
Dynamic Web Documents
HTTP – The HyperText Transfer Protocol
The Wireless Web
(a) A Web page (b) The page reached by clicking on Department of Animal Psychology .