Discussion
HTTP/1.1 review
Widespread adoption in 1996 with full standard in 1997 RFC 2068 and later replaced with one in 1999 RFC 2616
Request (URL, method, headers, body) & Response (status code, headers, body)
Inherently async
Built for HyperText, makes it have problems
Head of line blocking
combining payloads to 1 response
multiple connections (Connection: Keep-Alive vs Close)
HTTP Pipelining
No cancellation, have to tear down connection
No prioritization, round robin over connections
iOS/Mac
NSURLRequest (NSHTTPURLRequest) and NSURLResponse (NSHTTPURLResponse)
NSURLConnection and NSURLSession
HTTP/2
Started by Google with SPDY (2012 - 2016), latest is SPDY/3.1
HTTP/2 is a binary protocol, where 1 and 1.1 are text
Previous episode on SPDY with M Schore
Reached standard in 2015 with RFC 7540 and adopted by Apple with iOS 9, Mac OS X 10.11
Resolves many issues with new features:
multiplexing (helps with head of line problem in HTTP/1.1)
cancellation
header compression
Always there
plain text, optimal for compression
dynamic prioritization
be responsible, set lower priority when possible
not guaranteed that the server will prioritize because it is optional in HTTP/2 spec
push responses (Nolan’s not a fan)
not supported by Apple
Upgrade to HTTP/2 dynamically with Upgrade Header or ALPN
Application Layer Protocol Negotiation, ALPN is during TLS and far more efficient than Upgrade header
NPN (Next Protocol Negotiation)
Picks
Nolan
Akamai HTTP/2 Demo - Good info at https://http2.akamai.com
HTTP/2 Test - Test supported domains
Darryl
What Every iOS Developer Should Be Doing With Instruments - Great introduction to Instruments by Kevin Kazmeirczak
John
ClockKit Tutorial: Add Complication to an Already Existing Watch Project from Kristina Thai
Jason
RescueTime - Time management software