COE 558Lecture 01Reference
Reference sheet
Introduction compressed onto one page: the definitions, formulas and numbers to have in your head before a quiz or exam.
TCP/IP stack
Five layers, bottom-up PL, DLL, NL, TL, AL. Each payload is the PDU of the layer above. Part 03: TCP/IP stack
| Layer | PDU | Payload | Protocols | Connection | Address |
|---|---|---|---|---|---|
| Application | Message | Application bytes | HTTP, SMTP, IMAP | Process to process, rides on E2E | None |
| Transport | Segment (TCP) or datagram (UDP) | Message | TCP, UDP | E2E, virtual, one per path | Port number |
| Network | Packet (datagram) | Segment or UDP datagram | IP, routing protocols | H2H, virtual, one per path | IP address |
| Data link | Frame | Packet | Ethernet, 802.11, PPP | P2P, physical, one per hop | MAC address |
| Physical | Bits | Frame, as signals | Signal specs of Ethernet and Wi-Fi | The medium itself | None |
Sockets, TCP and UDP
names one endpoint. A connection is the pair of sockets, and a flow is the 5-tuple (src IP, dst IP, protocol, src port, dst port). Ports: 0 to 1023 system, 1024 to 49151 user, 49152 to 65535 dynamic. Part 05: Sockets and web apps
| Property | TCP | UDP |
|---|---|---|
| POSIX type | SOCK_STREAM | SOCK_DGRAM |
| Setup | Three-way handshake before data | None, each datagram stands alone |
| Delivery | Loss detected and retransmitted | No delivery or duplicate guarantee |
| Ordering | In-order byte stream | May arrive out of order |
| Boundaries | Continuous stream, no boundaries | One datagram is one message |
| Header | 20 bytes minimum plus connection state | 8 bytes, no state |
| Fits | Web pages, file transfer, APIs | Live voice and video, DNS queries, QUIC |
Decentralized versus distributed
Two independent dimensions, not opposites. Bitcoin is both. Part 04: Network applications
| Aspect | Decentralized | Distributed |
|---|---|---|
| What is split | The application, into separate client and server programs | The computation and state, across client, server or many machines |
| Stresses | Structure: programs talking through a protocol and sockets | Resources: where compute and state live |
| Lecture example | BitTorrent, Bitcoin | Google Cloud |
| Design-space axis | Vertical: which layer | Horizontal: which compute or storage resource |
Edge-to-cloud layers
Going outward, proximity falls and resources rise. Chain order: device, mist, near edge, far edge, fog, regional cloud, cloud. Part 08: Edge, fog and cloud
| Layer | Proximity | Resources | Role | Examples |
|---|---|---|---|---|
| Mist | Closest | Very limited | Immediate, local decisions | Sensor chip, Raspberry Pi Pico |
| Near edge | Very close | Limited to moderate | Local processing | Home router, Raspberry Pi 4 |
| Far edge | Close | Moderate to high | Low-latency applications | Jetson Orin Nano, AWS Wavelength Zone |
| Fog or regional | Intermediate | High | Aggregation and coordination | Metro micro data center, Azure Stack Edge |
| Cloud | Distant | Very high | Large-scale computation and storage | AWS Region and its availability zones |
Latency formulas
One-way lower bound from geodesic distance at c ≈ 300,000 km/s: about 3.3 ms per 1,000 km. Fiber runs near 200,000 km/s, so about 1.5× the bound. Part 07: Latency
Response time and budget. Part 09: Mapping tasks, Part 10: Latency budget
The four delays
| Delay | Where | Driven by | Formula or factor |
|---|---|---|---|
| Processing | Inside each router, switch or host | Header and error checks, forwarding lookup | Device speed, usually microseconds |
| Queueing | Router and server buffers | Congestion ahead of your packet | Traffic intensity, zero to very large |
| Transmission | Network interface pushing bits out | Packet size and bandwidth | L / R |
| Propagation | The physical channel | Link length and medium | d / s |
| Region | Geodesic | Bound one way / RTT | Measured RTT | Ratio |
|---|---|---|---|---|
| Frankfurt (eu-central-1) | ≈4,390 km | 14.6 ms / 29.3 ms | 100 ms | ≈3.4× |
| Tokyo (ap-northeast-1) | ≈8,300 km | 27.7 ms / 55.3 ms | 163 ms | ≈2.9× |
| Oregon (us-west-2) | ≈11,900 km | 39.7 ms / 79.4 ms | 243 ms | ≈3.1× |
The four mappings
Pipeline T1 resize, T2 detect, T3 draw. Part 09: Mapping tasks
| Mapping | Where T1, T2, T3 run | Strengths | Weaknesses | Example |
|---|---|---|---|---|
| 1 | All in the cloud | Consistency, simple client, easy scaling | Large L1 and L2, unfit for AR or gaming | Photo tagging in a distant data center |
| 2 | All on the device | No network, privacy, works offline | Battery, limited hardware, long PT | Smartwatch activity recognition |
| 3 | All at the edge | Low latency, data stays local | Limited reach, limited scalability | Retail store analytics |
| 4 | T1 edge, T2 fog, T3 edge | Shared model, more compute, model updates | Extra inter-layer hops and transfer cost | Smart-city traffic cameras |
New York client, California cloud
Worked numbers
- Terms
- L1 = 70 ms, PT = 30 ms, L2 = 70 ms
- Response time
- 70 + 30 + 70 = 170 ms
- Computation share
- 30 / 170 ≈ 17.6%, network 140 / 170 ≈ 82%
- Server 2x faster
- 70 + 15 + 70 = 155 ms, speedup 170 / 155 ≈ 1.097x (about 9%)
- Infinitely fast server
- 70 + 0 + 70 = 140 ms, ceiling 170 / 140 ≈ 1.21x
- Amdahl check
- f = 30/170, k = 2: 1 / (0.8235 + 0.0882) ≈ 1.097
Design exercise method
Same four steps for smart glasses, warehouse AR and VR. Part 10: Latency budget
Four steps
- 1. List the tasks
- Break the app into its pipeline: capture, compress, detect or recognize, render, store, retrain.
- 2. Set τ per task
- Cite published budgets: 20 ms motion-to-photon for XR (RFC 9699), 370 to 1000 ms face recognition, 150 ms one-way voice (G.114). Storage and training have no deadline.
- 3. Place each task
- Rendering and tracking on the device (mist), heavy inference offloaded to a nearby edge, storage and training in the cloud.
- 4. Check RT and trade-offs
- Write RT = out + PT + back with numbers against τ per task, then weigh battery, heat, privacy, cost and scale.
- Worked check at τ = 100 ms: fog 20 + 70 + 20 = 110 ms fails, edge 5 + 70 + 5 = 80 ms passes.
- Check budgets at a percentile, not the mean. A faster CPU only shrinks PT.
Slide errata
Answer with the corrected fact, and name the slide version if a question depends on it. Part 01: Course map
What the slides get wrong
- Slide 5
- Deployment models (public, private, hybrid, multi-cloud) differ from NIST: private, community, public, hybrid.
- Slide 18
- 100 W x 10 h = 1,000 Wh = 1 kWh, an energy, not 1,000 watts.
- Slide 25
- Email is an application (SMTP, IMAP), and MAC addresses are an addressing scheme, not protocols.
- Slide 26
- Point-to-Point means one hop between adjacent interfaces, not PPP or peer-to-peer.
- Slide 28
- IP plus port names one socket. A connection needs both endpoints plus protocol (the 5-tuple).
- Slide 37
- The socket is the endpoint. TCP establishes the connection; UDP never does.
- Slide 42
- TCP data can be lost in the network; TCP detects and retransmits. More than two socket types exist.
- Slide 45
- "Font-end" means Front-end. server.route is the hapi framework on Node.js.
- Slide 48
- "Layer 1, 2, 3" are path tiers. Switching is layer 2, routing layer 3.
- Slide 49
- The 1 / 5 / 15 ns figures are a ranking only; main memory is about 90 ns.
- Slide 54
- Use geodesic, not planar, distance. Oregon is about 11,900 km, so 39.7 ms, not 37 ms.
- Slides 60, 71
- The pictured board is a Raspberry Pi 4 single-board computer, not a microcontroller board.
- Slide 72
- Compare RT, not latency, with τ.
- Slide 76
- Captions skip the device layer, which must run tracking for a 20 ms XR budget.
- Slide 77
- RT = f(Latency, PT) means the sum of every hop plus every task's PT.