FIT1050 Web Fundamentals
Communication and Connectivity
Copyright Warning
Copyright By PowCoder代写 加微信 powcoder
Commonwealth of Australia Copyright Act 1968
This material has been reproduced and communicated to you by or on behalf of Monash University in accordance with section 113P of the Copyright Act 1968 (the Act).
The material in this communication may be subject to copyright under the Act. Any further reproduction or communication of this material by you may be the subject of copyright protection under the Act.
Learning objectives
Communication Protocols
¡ñ Understand the concept of protocols in computing
¡ñ Differentiate between different layers of protocols for Internet communication
¡ñ Understand what the purpose of the web’s main protocols
Internet Connections
¡ñ Understand the variety of connections
¡ñ Explore different issues that affect the usability of an Internet connection
¡ñ Consider how mobile connectivity affects web communication
World Wide Web Communication Protocols
The communication problem
Every information-based system has an information transfer issue:
¡ñ ¡ñ ¡ñ ¡ñ
Connection medium,
Sender transmission methods Receiver
and conversation rules.
What medium (or media) exists between the sender and receiver? What transmission methods are supported by both parties?
Are different methods required at different stages of the transmission? How strict should the rules be to avoid miscommunication?
Communication isn’t just a computing issue
What is a strength or weakness of these communication methods?
¡ñ Person-to-person networks
¡ð Face-to-face conversation / phone call / postal service
¡ñ Printed media networks
¡ð Newspapers / magazines / catalogues
¡ñ Mass broadcast electronic media ¡ð TV / radio
Specific features of each method affect what can be communicated, as well as the efficiency and quality of how information is sent/received.
Communication requires standards
¡ñ The problem of communication between separate computer networks
¡ð Compatibility of communication hardware and software
¡ð Compatibility of communications methods
¡ñ To operate many different services seamlessly…
¡ð Rules to control how communication takes place
¡ð Clear documentation of rules
¡ð Solution: Standards and protocols!
Protocols are strict, task-specific, rules. They are designed to efficiently handle a single aspect of a communication process.
Protocol layers
Instead of one complex set of rules to cover all stages of the process, we can break down the communication process into layers.
Various technology standards within each layer interoperate to provide solutions at each layer.
Application
DNS SSL TLS HTTP HTTPS
MAC PPP L2TP 802.11 Ethernet
Physical Ethernet / 802.11 DSL ISDN USB
Some historical developments
Packet-switching (1961)
Transmitting data in small blocks (packets), developed for military use to increase network robustness
ARPANET (1969)
An early packet-switched network, and the first to implement TCP/IP. Funded by the US Department of Defence
Gopher (1991, example on right)
A protocol presented as an alternative to the World Wide Web. Still operational, largely unchanged.
gopher.rp.spb.su via http://gopher.floodgap.com/gopher/
Network layer: Internet Protocol (IP)
This protocol serves 3 main functions:
1. Addressing host interfaces
¡ð Define a standard addressing system.
¡ð Ensuring network hardware is uniquely addressable.
2. Fragmenting data into packets and reassembling it later
¡ð The client and server negotiate a compatible packet size.
3. Routing data from source to destination
¡ð Connections are rarely direct – a route “hops” between different devices.
Transport layer: Transmission Control Protocol (TCP)
TCP manages data flow between at sender and receiver ends of a route while ensuring integrity for data before passing it to specific applications.
1. Negotiate and establish a working connection
¡ð Communicates transmission requirements between hosts. 2. Checks for corrupt, missing or duplicate packets
¡ð Re-request corrupt/missing packets, discard duplicates.
3. Detects out-of-order packets
¡ð Re-sequences data packets before passing to an application.
TCP/IP packet switching with routing tables
Next Hop Cost E 20 G 10
Next Hop Cost D 20 E 10
TCP vs UDP (User Datagram Protocol)
Transport Control Protocol
User Datagram Protocol
Detects and re-requests lost packets.
Does not validate successful packet arrival.
Assigns packet sequence and corrects order.
Sends packets as a continuous stream.
Data errors handled during communication.
Data errors are handled by the application.
Requires resources to manage data transport.
Minimal resources use for data transport.
Used where data integrity is critical.
Used where data is needed in quickly.
Review: Client-server model of computing
Last week we considered how web clients request resources from web servers.
HTTP: Hypertext Transfer Protocol
HTTP provides communications rules for both requests and responses.
The client sends a request containing:
¡ñ Request metadata, including a URL
¡ñ Optional encoded data
The server sends a response including:
¡ñ Request metadata, including a status code
¡ñ The requested data, usually in the form of an HTML document
HTTP communication headers
Client Request
:authority: en.m.wikipedia.org
:method: GET
:path: /static/images/mobile/copyright/wikipedia-wordmark
:scheme: https
accept: text/html,application/xhtml+xml,application/xml;
q=0.9,image/webp,image/apng,*/*;q=0.8,application
/signed-exchange;v=b3;q=0.9
accept-encoding: gzip, deflate, br
accept-language: en-US,en;q=0.9
cache-control: no-cache
cookie: WMF-Last-Access-Global=31-Jan-2020;
GeoIP=AU:VIC:Clayton:-37.91:145.13:v4;
WMF-Last-Access=31-Jan-2020
user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64)
AppleWebKit/537.36 (KHTML, like Gecko)
Chrome/79.0.3945.130 Safari/537.36
Server Response
accept-ranges: bytes
access-control-allow-origin: *
cache-control: max-age=31536000
content-length: 10361
content-type: image/png
date: Fri, 31 Jan 2020 01:40:01 GMT
expires: Mon, 25 Jan 2021 02:09:45 GMT
last-modified: Mon, 04 Dec 2017 19:10:13 GMT
server: ATS/8.0.5
status: 200
HTTP authentication
HTTP does provide basic authentication (login) features via the request URL.
However, this method is not recommended (at least on its own)
¡ñ Using plain HTTP the request URL is visible in transit.
¡ñ On the client, the credentials are visible in the browser’s address bar.
¡ñ On the client, the credentials are stored in the browser’s history.
¡ñ At the server, the credentials will be logged in plaintext.
¡ñ At the server, there is no default mechanism for preventing brute-forcing.
HTTPS – Hypertext Transfer Protocol Secure
HTTPS extends HTTP by encrypting data in transit using Transport Layer Security (TLS, newer) or Secure Sockets Layer (SSL, older).
The initial DNS request to resolve the domain is unencrypted, but afterwards:
¡ñ The client and server negotiate and exchange security keys.
¡ñ Any URL requests that occur during the session are encrypted.
¡ñ Request and response data are both encrypted for the session duration.
What do you think? Is this page safe?
SSL certificate types
Client-server traffic is encrypted. Validation (e.g. personal portfolio)
Organisation Validation
Client-server traffic is encrypted. Identity of the organisation is checked.
(e.g. online store)
Extended Validation
Client-server traffic is encrypted. Identity of the organisation is checked. Organisation passes background check.
(e.g. bank)
Internet Connections
Connection links – many technologies
¡ñ Analog telephone
¡ñ Digital telephone
¡ñ Digital data lines
¡ñ Cable Internet
¡ñ Fibre Fixed Line
¡ñ Mobile Internet
¡ñ Wireless Networks
¡ñ Fixed wireless
¡ñ Satellite Internet
PSTN (Public Switched Telephone Network) ISDN (Integrated Services Digital Network) ADSL (Asynchronous Digital Subscriber Line) HFC (Hybrid Fibre-Coaxial)
Fibre To The… Node / Curb / Basement / Home Mobile networks (2G GPRS, 3G HSPA, 4G LTE, 5G NR) Wi-Fi local networks (802.11 A, B, G, N, AC, AX) Long-range wireless networks (WiMAX, 4G, 5G) One-way + terrestrial, two-way satellite
Fixed broadband per 100 inhabitants (Dec 2020)
http://www.oecd.org/sti/broadband/broadband-statistics/
Connection links – design issues
¡ñ Link capacity
¡ð Legal definition of “broadband” can vary by country
¡ñ Variability in bandwidth capacity
¡ð Symmetrical and asymmetrical capacities
¡ñ Performance
¡ð May not match theoretical or advertised capacity
¡ñ The “digital divide”
¡ð Affordability and regional availability
¡ð Other governmental and societal issues
Response times
Main factors influence perceived response times:
¡ñ Bandwidth – the rate at which you send/receive data
¡ð Influenced by client network connection
¡ð Influenced by server capacity and network connection
¡ñ Latency – the time taken for data to get from Point A to Point B
¡ð May also be a result of processing delay at the server
¡ñ “Stutter” or “Jank” – perceived by the user
¡ð Usually caused by processing delay at the client end
New technologies increase bandwidth and decrease latency
Technology
Capability
Typical Speeds
~ 6 Mbit/s
Varies by distance
~ 15 Mbit/s
Varies by distance
250 Mbit/s
< 100 Mbit/s
Shared bandwidth
~25-100 Mbit/s
Assuming FTTP
< 25 Mbit/s
Line-of-sight
0.3 Mbit/s
~ 60 kbit/s
Rarely used
~ 8 Mbit/s
Highly variable
300 Gbit/s
~ 30 Mbit/s
Highly variable
~ 200 Mbit/s
Highly variable
Type of connection
¡ñ Wired connections typically have lower latency than wireless
¡ñ New technology typically has lower latency than older equivalents
Connection distance
¡ñ Physically longer distances require more time to transmit.
¡ñ Longer distances require usually more ¡°hops¡± between servers
Connection quality
¡ñ Transmission errors result re-routing over longer routes
¡ñ Transmission errors require data to be re-sent
Response time expectations
0.1 seconds or less
¡ñ Feels like it was caused by the user, not the computer.
¡ñ Essential to support the feeling of direct manipulation.
Approximately 1 second
¡ñ Users can sense a delay, and thus know the computer is generating the outcome but they still feel in control.
10 seconds or longer
¡ñ Users feel at the mercy of the computer and wish it was faster.
¡ñ After 10 seconds, they start thinking about other things
Test it yourself!
The developer tools in Google Chrome (and other browsers) includes a network panel that can visualise site loading performance:
Resource type filters Waterfall
Network log Summary
Simulating bandwidth and latency
The network panel in Chrome allows includes an option to artificially throttle loading of resources from any server.
Transfer time is more than download time
Minimising bandwidth and latency
Optimise to transmit less data and reduce time spent waiting for data.
¡ñ Remove unnecessary files
¡ñ Prefer single files over many files
¡ñ Author media at appropriate dimensions
¡ñ Choose efficient file formats and encoding
¡ñ Compression - both file-based and HTTP compression
¡ñ Selectively pre-load or lazy-load content
¡ñ Use servers located closer to users
But what if your users are located in different countries around the world?
Content delivery networks
https://www.akamai.com/us/en/resources/visualizing-akamai/media-delivery-map.jsp
¡ñ Learn the basics of HTML
¡ñ Understand the importance of W3C Web Standards
Participation Milestone 1 assessment takes place this week during lab class. Lab attendance is required to complete this task and earn full marks.
If you are unable to attend your lab session, contact your tutor as soon as possible! Special consideration will be available if you have a legitimate reason with appropriate documentation.
程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com