Architecture of the World Wide
Web, Volume One
W3C Recommendation 15 December 2004
Tim Berners-Lee (co-Chair, W3C), Tim Bray (Antarctica
Systems), Dan Connolly (W3C), Paul Cotton (Microsoft
Corporation), Roy Fielding (Day Software), Mario Jeckle
(Daimler Chrysler), Chris Lilley (W3C), Noah Mendelsohn
(IBM), David Orchard (BEA Systems), Norman Walsh (Sun
Microsystems), and Stuart Williams (co-Chair, HewlettPackard).
Presented by:
Chuck Cartledge
Carlton Northern
Presentation Organization
• A review of the paper taken from
http://www.w3.org/TR/webarch/
• Putting the paper into a context
• The gore of the paper
• The paper’s conclusion
• “To everything there is a time and a season” and
now it is time questions.
• Practices and ideas applicable to other contexts
CS-791/891 Web Syndication Formats, ODU, Sping 2008
2
Where/What are the Other
Volumes?
• Not sure, perhaps this is similar to “Kill Bill,
Volume 1” where the next volume came out a
few months later. It has been a few years so
maybe the Web architecture is still evolving??
Then again there is Mel Brookes movie of a
similar name, or Sir Walter Raleigh’s book
completed just before his execution.
• The URI http://www.w3.org/TR/ has many
reports that have the word architecture in the
title, but none that address the Web in toto.
CS-791/891 Web Syndication Formats, ODU, Sping 2008
3
Organization of the Paper
• Introduction
– Who is the intended audience
– Brings forth the ideas of:
• Principle
• Constraint
• Good Practice
• Identification
– URIs with all their trials and
trepidations
– Uniqueness, collisions,
persistence, commitments
• Interaction
–
–
–
–
Access to a URI
Negotiation
Inconsistencies
Safe and unsafe actions
•
•
•
•
•
Data Formats
– A discussion about the selection of
data formats
– Problems inherent with a multiplicity
data formats
– Attempts at Universal format
General Architectural Principles
– Generally good things to keep in mind
when building something that will be
widely used
Glossary
– Interesting and useful words
References
– How many things of note are written
with out references (aside from
Einstein’s stuff)
Acknowledgements
– Everyone gets their day in the sun
CS-791/891 Web Syndication Formats, ODU, Sping 2008
4
What are: Principles, Constraints and
Good Practices?
• Principle – a fundamental rule that
applies to a large number of
situations and variables
• Constraint – many choices in
design are somewhat arbitrary (‘:’
vice ‘*’, ‘p’ vice ‘paragraph’) and
the results would probably have
been the same. Other constraints
may be imposed by technical,
policy or design decisions.
• Good practice – something that
increases the value of the Web.
CS-791/891 Web Syndication Formats, ODU, Sping 2008
5
Now into the gory details
(Sometimes you don’t want to know how its
made, you just want to enjoy it.)
CS-791/891 Web Syndication Formats, ODU, Sping 2008
6
Introduction
• The paper uses a
scenario of Nadia
planning a trip to
Oaxaca, Mexico and
sharing information
with Dirk
• The story follows the
URI that Nadia gives
to Dirk, how each of
their agents
(browsers) interprets
the URI, how they
interact with the
server
CS-791/891 Web Syndication Formats, ODU, Sping 2008
7
An Overview of How Scenario Bits and
Pieces Fit Together
What is this? How are the various
parts used? Is it unique? How long
is it viable?
What is a resource? How do I get
the one I want? What is the format
of what I get?
How is the resource presented to
me? How do I communicate which
version(s) of the resource I can
accept?
CS-791/891 Web Syndication Formats, ODU, Sping 2008
8
Story Line Specifics
• URI identification: (http://weather.example.com/oaxaca)
• What is meant by each part of the HTTP URI
–
–
–
–
http: - HTTP scheme identifier
// - token separator
weather,example.com – host
oaxaca – absolute path to a resource
• The interaction of the agents upon reception of this URI
• How is the format of the data being returned determined
• And, along the way: Principles, Constraints and Good
Practices are identified
CS-791/891 Web Syndication Formats, ODU, Sping 2008
9
Things about URIs
• A URI is an agreement about how
the I’net community allocates
names and associates them with a
type of resource
• One, or more URIs can be aliases
for a different URI
• URIs are “owned” by a social entity
(someone or something under
someone’s control) who agrees to
live by the URI agreement
• Separate URIs that are character
by character the same, point to the
same resource
• Separate URIs that are not
character by character the same,
may point to the same thing (alias)
CS-791/891 Web Syndication Formats, ODU, Sping 2008
10
Sample URIs
• ESGR – Employer Support
of the Guard and Reserve,
a volunteer advocacy group
for mediation between
employers and Guard and
Reserve personnel http://www.esgr.com/
• www.esgr.com =
199.231.147.34
• www.esgr.net =
199.231.147.34
• www.esgr.mil =
131.84.1.94
– http://whois.domaintools
.com/esgr.mil
CS-791/891 Web Syndication Formats, ODU, Sping 2008
11
Yet more Things about URIs
• You shouldn’t attempt to read too much
into a URI
– Just because a URI ends in .html doesn’t
mean that a text/html resource will be
returned
– Just because a URI ends with oaxaca doesn’t
mean that it will have anything to do with
oaxaca
• The only thing reliable is the identified
scheme
CS-791/891 Web Syndication Formats, ODU, Sping 2008
12
URI Persistence
• What is URI persistence?
– Character by character sameness
pointing to the same resource
– Implies that the resource in static and
fixed. Using the same URI should
always result in the same resource.
• Who is responsible for URI
persistence?
– The owner
• Who is responsible for URI changes?
– The owner
• To whom is the owner responsible?
– The owner’s interested parties
– What does that mean?
CS-791/891 Web Syndication Formats, ODU, Sping 2008
13
Identification of Resources
• To increase the benefit
of the Web, URIs
should be used on
consistently and each
resource should have a
unique URI
• Resources can be any
of a number of things:
pages, images, product
catalogs, etc. Anything
that can be available
on the Web is by
definition a resource.
CS-791/891 Web Syndication Formats, ODU, Sping 2008
14
Interaction Starts
•
•
•
•
•
•
•
A URI in and of itself is next to useless.
The URI must be dereferenced.
Derefencing is the converting the URI
into the representation of a resource (i.e.,
retrieving the specified resource)
The precise steps needed dereference a
URI are dependent on the URI’s scheme.
Dereferencing can be cheap or
expensive.
Data representation describes the data
that resulted from the dereferencing of
the URI.
Data representation allows the same
type of data to be processed by a new
and improved scheme.
URI dereferencing and data
representation are orthogonal
CS-791/891 Web Syndication Formats, ODU, Sping 2008
15
Interaction Continues
• The principle of orthogonal
specifications allows for the
negotiation of resource content
presentation
• Requesting agent and server
can negotiate “best” data
presentation. Things that
determine “best” can include:
– Size of data to be downloaded
(affects download time)
– Format of data (possible not all
data formats are supported)
– Basically “best” is defined by the
agent
CS-791/891 Web Syndication Formats, ODU, Sping 2008
16
Difficulties with any Negotiations
•
•
After an agent and a server reach an
agreement
Three situations can occur:
– Agent and server have the same
definition of a data representation
– Agent and server have different
definition for a data representation
– Neither agent or server nor have a
definition for a data representation
•
These situations are interpreted thusly:
– Consistent semantics – no problem
– Server management problem – can not
present data in a format different than
agreed upon
– Agent has to report a problem and let
someone/something else deal with the
situation
CS-791/891 Web Syndication Formats, ODU, Sping 2008
17
An Abstract View of the Processes to this Point
1.
2.
3.
4.
5.
6.
The User interacts with
a device.
The device’s User Agent
formats a request for
the server-side
application.
Server-side determines
how to respond to the
UA’s request for data.
Server-side builds the
appropriate response.
The UA receives the
response and forwards
it to the appropriate
render.
The User perceives the
results of the
interaction.
Delivery Context Overview for Device Independence
http://www.w3.org/TR/2005/NOTE-di-dco-20050118/diff.html
CS-791/891 Web Syndication Formats, ODU, Sping 2008
18
An Example of Data that is Passed
in the Background
• http://www.isthe.com/chongo/tech/comp/cgi/whoami.html
CS-791/891 Web Syndication Formats, ODU, Sping 2008
19
Data Formats
• Data formats embody an agreement on the correct
interpretation of representation data, i.e. HTML,
XHTML, RDF/XML, CSS, PNG.
• First data format on the web was HTML. Many have
followed after HTML and many more are yet to come.
• There is no restriction of data formats on the Web.
Any data format can be used between two or more
parties if there is a shared understanding about its
syntax and semantics.
• Characteristics of a good data format for the web are
those that are extensible, composable, easy-to-use,
and should adhere to the principle of separation of
content, presentation and interaction.
CS-791/891 Web Syndication Formats, ODU, Sping 2008
20
Binary and Textual Data
Formats
• A binary data format is data which is encoded for
direct use by a computer processor.
• A textual data format is data which is encoded in
a sequence of characters in human readable
form.
• All data can be represented in either binary or
textual data format, however, audio and video
are usually represented in binary.
CS-791/891 Web Syndication Formats, ODU, Sping 2008
21
Binary vs Text
• Binary has the benefit of being compact,
and fast because it can be loaded directly
into memory.
• Text has the benefit of being portable,
interoperable, and easily read, understood
and interacted with by human beings.
CS-791/891 Web Syndication Formats, ODU, Sping 2008
22
The Perfect Language Design
Case
• “In a perfect world, language designers
would invent languages that perfectly met
the requirements presented to them, the
requirements would be a perfect model of
the world, they would never change over
time, and all implementations would be
perfectly interoperable because the
specifications would have no variability.”
• Source http://www.w3.org/TR/webarch/#ext-version
CS-791/891 Web Syndication Formats, ODU, Sping 2008
23
Versioning and Extensibility
• Software versioning is the process of
assigning either unique version names or
unique version numbers to unique states
of computer software.¹
• Extensibility is a system design principle
where the implementation takes into
consideration future growth.²
• ¹ http://en.wikipedia.org/wiki/Versioning
• ² http://en.wikipedia.org/wiki/Extensibility
CS-791/891 Web Syndication Formats, ODU, Sping 2008
24
Versioning
• On the Web, there is usually a long
transition period where multiple versions of
a format, protocol, or agent are in
simultaneously in use, i.e. IPv4 and IPv6.
• Good practice: a data format specification
SHOULD provide for version information.
CS-791/891 Web Syndication Formats, ODU, Sping 2008
25
Extensibility
• A good balance between extensibility,
simplicity, and variability needs to be
achieved when designing a language or
protocol.
• A language that doesn’t allow for extension
may be extended in ad-hoc ways that could
produce unintended results. A language that
is too extendable may introduce too much
variability and result in decreased
interoperability.
CS-791/891 Web Syndication Formats, ODU, Sping 2008
26
Extensibility
• Good practices:
– A specification SHOULD provide mechanisms
that allow any party to create extensions.
– Extensibility MUST NOT interfere with
conformance to the original specification.
– A specification SHOULD specify agent
behavior in the face of unrecognized
extensions.
• “Must ignore” means that unrecognized content be
ignored.
• “Must understand” means that unrecognized content
cause an error condition.
CS-791/891 Web Syndication Formats, ODU, Sping 2008
27
Composition of Data Formats
• Data formats on the web have relationships to
each other in that they can be mixed and nested
arbitrarily to one another.
• Example: an HTML page contains a JPEG that
contains an embedded text comment with a
hyperlink to the copyright holder.
http://www.flickr.com/photos/atreyuvsfalcor/1488
463746/in/set-72157602270046786/
CS-791/891 Web Syndication Formats, ODU, Sping 2008
28
Separation of Content,
Presentation, and Interaction
• Same concept as Model, View, Controller.
• This is especially important on the web
because of the heterogeneity of client
devices, i.e. desktop computers, hand-held
devices, cell phones, speech synthesizers for
visually impaired.
• Good practice: A specification SHOULD allow
authors to separate content from both
presentation and interaction concerns.
• Requires that the client or server recombine
them. CS-791/891 Web Syndication Formats, ODU, Sping 2008
29
Demonstration of “Server does all”
Recombine
• Normal www.google.com/ig
• iPhone www.google.com/ig/i
CS-791/891 Web Syndication Formats, ODU, Sping 2008
30
Hypertext
• One of the most important characteristics of the
web is it’s use of embedded referencing to other
resources via URIs, known as hypertext linking.
• Good practices:
– A specification SHOULD provide ways to identify links
to other resources, including to secondary resources
(via fragment identifiers).
– A specification SHOULD allow Web-wide linking, not
just internal document linking.
– A specification SHOULD allow content authors to use
URIs without constraining them to a limited set of URI
schemes.
– A data format SHOULD incorporate hypertext links if
hypertext is the expected user interface paradigm.
CS-791/891 Web Syndication Formats, ODU, Sping 2008
31
XML-Based Data Formats
• A data format is “XML-based” if they conform to the syntax
rules defined in the XML specification.
• Design constraints that would suggest the use of XML include:
– Requirement for a hierarchical structure.
– Need for a wide range of tools on a variety of platforms.
– Need for data that can outlive the applications that currently
process it.
– Ability to support internationalization in a self-describing way that
makes confusion over coding options unlikely.
– Early detection of encoding errors with no requirement to "work
around" such errors.
– A high proportion of human-readable textual content.
– Potential composition of the data format with other XML-encoded
formats.
– Desire for data easily parsed by both humans and machines.
– Desire for vocabularies that can be invented in a distributed
manner and combined flexibly.
CS-791/891 Web Syndication Formats, ODU, Sping 2008
32
General Architecture Principles
•
•
•
•
Orthogonal Specifications
Extensibility
Error Handling
Protocol-based Interoperability
CS-791/891 Web Syndication Formats, ODU, Sping 2008
33
Orthogonal Specifications
• The three bases of Web architecture identification,
interaction, and representation are orthogonal in that
their technologies may evolve independently.
• For example, if the HTML specification changes it
will not effect the specification for SOAP.
• Problems arise when two orthogonal concepts are
defined in the same specification. The same can be
said when two orthogonal specifications define the
same concept.
CS-791/891 Web Syndication Formats, ODU, Sping 2008
34
Extensibility
• Extensibility is used throughout the Web to deal with
the unknown.
• IPv4 purposely left unused bits in the header for
“future use”. Without these, the protocol wouldn’t be
able to deal with change and would require frequent
costly version changes.
• Extended languages are one way promote
extensibility. A language that is allowed to have
additional vocabulary that is subject to the same
interpretation as the base language is considered to
be an extended language.
• Applications that use extensible languages define
default behavior for dealing with unknown
extensions.
CS-791/891 Web Syndication Formats, ODU, Sping 2008
35
Error Handling
• Errors are an inevitability of the Web.
• Errors range from the well-known (404 – not found) to
the unknown (no error information at all).
• Error correction - the condition that an error was
resolved without any harm or consequence to the
system. The user is usually not notified of this
occurrence.
• Error recovery - the condition that an error has
happened, it is known by the system, it is not repaired,
and the system keeps running. The user should be
notified in some way that this has happened.
• Predictable errors should be identified as such.
• As much information as needed to address an error
should be provided.
CS-791/891 Web Syndication Formats, ODU, Sping 2008
36
Protocol-Based Interoperability
• Important interfaces in the web are defined
in terms of protocols. These protocols
define the syntax, semantics and
constraints used in interactions.
• Protocols and their resulting specifications
allow for users to access the underlying
workings of the technologies with which
they are using and help them gain
expertise.
CS-791/891 Web Syndication Formats, ODU, Sping 2008
37
Conclusion
• This paper is titled Volume One, implying that
there may be more to come. A possible Volume
Two may cover the Semantic Web?
• A general sense is that the paper was written
after the fact with the benefit of hind sight about
a system that appears to work reasonably well.
And perhaps, a justification of sometimes
capricious decisions.
• Therefore the way things are may be the best
that there could be because if things were
different then we wouldn’t be discussing the
things in this paper.
CS-791/891 Web Syndication Formats, ODU, Sping 2008
38
Discussion Questions
• Does the report present an even-handed
explanation about the initial period of Web
architecture development?
• How long should a URI be persistent and
why?
• What kind of difficulties would be involved
in fielding a new URI scheme?
• What are some typical problems using
ASCII only URIs?
CS-791/891 Web Syndication Formats, ODU, Sping 2008
39
The End.
Loch Maree, Scotland
http://travel.webshots.com/photo/2371809990101674387hCiysR
CS-791/891 Web Syndication Formats, ODU, Sping 2008
40
Principles, Constraints and
Good Practices
• Information on the following slides is taken
from:
http://www.w3.org/TR/webarch/summary.html
CS-791/891 Web Syndication Formats, ODU, Sping 2008
41
Principles
• An architectural principle is a fundamental rule
that applies to a large number of situations and
variables
– Global naming leads to global network effects.
– An application developer or specification author
SHOULD NOT require networked retrieval of
representations each time they are referenced.
– Orthogonal abstractions benefit from orthogonal
specifications.
– Agents that recover from error by making a choice
without the user's consent are not acting on the user's
behalf.
CS-791/891 Web Syndication Formats, ODU, Sping 2008
42
Constraints
• Many choices in design are somewhat arbitrary
(‘:’ vice ‘*’, ‘p’ vice ‘paragraph’) and the results
would probably have been the same. Other
constraints may be imposed by technical, policy
or design decisions.
– Assign distinct URIs to distinct resources.
– Agents MUST NOT ignore message metadata without
the consent of the user.
– Do not allow both QNames and URIs in attribute
values or element content where they are
indistinguishable.
CS-791/891 Web Syndication Formats, ODU, Sping 2008
43
Good Practices (part one of six)
• Good practice increases the value of the Web.
– To benefit from and increase the value of the World
Wide Web, agents should provide URIs as identifiers
for resources.
– A URI owner SHOULD NOT associate arbitrarily
different URIs with the same resource.
– An agent that receives a URI SHOULD refer to the
associated resource using the same URI, characterby-character.
– A specification SHOULD reuse an existing URI
scheme (rather than create a new one) when it
provides the desired properties of identifiers and their
relation to resources.
CS-791/891 Web Syndication Formats, ODU, Sping 2008
44
Good Practices (part two of six)
• Good practice increases the value of the Web.
– Agents making use of URIs SHOULD NOT attempt to
infer properties of the referenced resource.
– New protocols created for the Web SHOULD transmit
representations as octet streams typed by Internet
media types.
– Server managers SHOULD allow representation
creators to control the metadata associated with their
representations.
– A URI owner SHOULD provide representations of the
resource it identifies
CS-791/891 Web Syndication Formats, ODU, Sping 2008
45
Good Practices (part three of six)
• Good practice increases the value of the Web.
– A URI owner SHOULD provide representations of the
identified resource consistently and predictably.
– A data format specification SHOULD provide for
version information.
– An XML format specification SHOULD include
information about change policies for XML
namespaces.
– A specification SHOULD provide mechanisms that
allow any party to create extensions.
CS-791/891 Web Syndication Formats, ODU, Sping 2008
46
Good Practices (part four of six)
• Good practice increases the value of the Web.
– Extensibility MUST NOT interfere with conformance to
the original specification.
– A specification SHOULD specify agent behavior in the
face of unrecognized extensions.
– A specification SHOULD allow authors to separate
content from both presentation and interaction
concerns.
– A specification SHOULD provide ways to identify links
to other resources, including to secondary resources
(via fragment identifiers).
– A specification SHOULD allow Web-wide linking, not
just internal document linking.
CS-791/891 Web Syndication Formats, ODU, Sping 2008
47
Good Practices (part five of six)
• Good practice increases the value of the Web.
– A specification SHOULD allow content authors to use
URIs without constraining them to a limited set of URI
schemes.
– A data format SHOULD incorporate hypertext links if
hypertext is the expected user interface paradigm.
– A specification that establishes an XML vocabulary
SHOULD place all element names and global
attribute names in a namespace.
– The owner of an XML namespace name SHOULD
make available material intended for people to read
and material optimized for software agents in order to
meet the needs of those who will use the namespace
vocabulary.
CS-791/891 Web Syndication Formats, ODU, Sping 2008
48
Good Practices (part six of six)
• Good practice increases the value of the Web.
– The owner of an XML namespace name SHOULD
make available material intended for people to read
and material optimized for software agents in order to
meet the needs of those who will use the namespace
vocabulary.
– A specification in which QNames serve as resource
identifiers MUST provide a mapping to URIs.
– In general, a representation provider SHOULD NOT
assign Internet media types beginning with "text/" to
XML representations.
– In general, a representation provider SHOULD NOT
specify the character encoding for XML data in
protocol headers since the data is self-describing.
CS-791/891 Web Syndication Formats, ODU, Sping 2008
49
Descargar

Architecture of the World Wide Web, Volume One W3C