Web Architecture Flashcards
How can resources be represented?
text (plain, html, csv), image, audio, video, application
How can resources be identified?
With URIs (Uniform Resource Identifiers)
How can resources be interacted with?
Using network protocols like HTML
What does the bow-tie model represent?
The shape of the web
Sections such as LSCC core, IN, OUT, and disconnected components
What is the web?
A distibuted information system that provides acess to resources
What is hypertext?
A way to link information in a non-linear interactive way - cannot be represented conveniently on paper
What are 2 disadvantages of hypertext?
Disorienting - easy to lose sense of direction
Cognitive overhead - additional effort to maintain several trails at once
What is hypermedia?
Non-textual media
What are nodes, links, anchors, and endpoints?
Node - a point in the network e.g. a webpage
Link - a connection between nodes
Anchor - the clickable element that links pages
Endpoint - the destination of a link
<a>anchor</a>
What are embedded links?
Links that are encapsulated in a node, and form part of the document content
What are first class links?
Where links are separated from nodes allowing multiple link overlays/linkbases (links over same node), creating different connections without changing the node
Link bases can be tailored to reader
Has 2 endpoints
What are bidirectional links?
Links that can be traversed backwards as well as forwards
What are N-ary links?
Links involving more than 2 nodes, allowing relationships between multiple entities
What are generic links?
Links where, by using locspecs, all occurences of a word can be linked to the same endpoint
What are functional links?
Links that represent predefined relationships
What are typed links?
Links that define the nature or relationship of the link, such as “friend,” “parent,” or “employee”
What is REST?
Representational State Transfer
A web architecture style that uses stateless communication to manipulate resource representation
What does REST aim to do (2)?
Minimises latency and network communication
Maximises independence and scalability of components
What are the 4 components of REST?
Origin servers - the ultimate place you get a resource from
Gateways - for integrating legacy servers
Proxies - to filter & cache
User agents
User agent & origin server are end points that communicate using HTTP
If using gateway, origin server & gateway don’t communicate in HTTP
What are the5 constraints of REST?
Client-server - separation of concerns (client: user interface, server: data storage)
Stateless - no context stored on server, session state kept on client
Caching - response data labelled as cacheable or non-cacheable
Uniform interface between components - identify what next possible actions could be
Layered - system components have no knowledge of components they don’t directly interact with
What are the 3 advantages of client-server constraint?
- Improves portability
- Improves scalability (as server simplified)
- Allows components to evolve separately
What are the 3 advantages and 1 disadvantage of stateless constraint?
Advantages:
* Improves visibililty (of requests)
* Improves reliability
* Improves scalability
Disadvantage:
* Increases per-action overhead
What are the 2 advantages and 1 disadvantage of caching constraint?
Advantages:
* Eliminates some actions
* Reduces latency
Disadvantage:
* Reduces reliability
What are the 2 advantages and 1 disadvantage of uniform interface constraint?
Advantages:
* Improves visibility (of interactions)
* Implementations decoupled from services they provide
Disadvantage:
* Reduces efficiency
What are the 2 advantages and 1 disadvantage of layered constraint?
Advantages:
* Limits system complexity
* Improves scalability
Disadvantage:
* Adds latency & overhead
What are the 3 principles of identification?
Global - addresses should be unambiguous & human readable
Distinct identifiers - using same URI for different resources creates a URI collision
Avoid aliases - don’t use different URIs for same resource
How should documents be named?
Use logical names rather than physical addresses to avoid issues when documents are moves
URL vs URN
URL specifies location of resource on internet
URN uniquely identifies resource by name - not that good approach as can just use HTTP
What are IRIs (Internationalised Resource Identifiers)?
An extension to URIs, allowing Unicode characters