ALF-ILP Based on Slides by Anthony D. Joseph
ALF and ILP Clark and Tennenhouse, 1990 –Application Level Framing (ALF) ALF solves problems with strictly-layered architecture –Integrated Layer Processing (ILP) ILP solves problems with layered impl’n ALF a mainstream concept, major impact –basis for Real-time Transport Protocol ILP still in research stage –Hard problem, e.g., HIPPARCH project
ALF Basic idea: –Express application's semantics in the design of its network protocol. “One size fits all” often inadequate Application packets mux Application packets demux
ALF (cont’d) ”In the case of layered architectures, practical experience provides strong support for alternative engineering design”. Not obvious –Streaming A/V on web (via TCP) –XPhone system (A/V over TCP)
ALF (cont’d) Key architectural principle is: FLEXIBLE DECOMPOSITION Defer engineering decisions to implementor Avoid inessential constraints
More ALF Examples: –Real-time Transport Protocol –LBL whiteboard / reliable multicast But isn't TCP “one size fits all”? –Hasn't this worked really well? –(e.g., telnet, ftp, , web/http) Yes, however, even these can be improved in certain environments: –Slogin (add encryption) –multicast mail exploder (avoid duplication)
Application Data Units Notion of “application data unit” (ADU) explicit in the network/application interface. Example: –“Intelligent” framing of compressed video –Bit-oriented JPEG video stream –Frame bit-stream into ADUs/packets for … …
Video Framing Add header (H*) to each packet to make “idempotent”; independently “processable” Allows receiver to: –Proceed in the presence of loss –Selectively decide which data to retransmit (if at all) Hdr B0 B1 … BN Frame N-1 Frame NFrame N+1 “JPEG” Video Sequence Hdr BLBL+1 BMBM+1 BNHdr BLBL+1 BMBM+1 BNHdr BLBL+1 BMBM+1 BN Naïve Framing H* BLH*BL+1BMH*BM+1BNH* BLH*BL+1BMH*BM+1BNH* BLH*BL+1BMH*BM+1BN Intelligent Framing
Protocol Functions Performance issues: separation of control and “data manipulation” Data manipulation (touching / moving) –Move to/from net –Error detection –Buffering for retransmission –Encryption –Moving to/from app address space –Presentation formatting
More Protocol Functions Control transfer –Flow / congestion control –Detecting network transmission problems: loss, duplication, re-ordering –Acknowledgement –Multiplexing –Timestamping –Framing
More Details Simple measurements and argument to say: data manipulation is bottleneck But control semantics place constraints on implementation, leads to layered implementations.
Consider TCP What happens when data is reordered? (actually: how does data get reordered?) –TCP stalls system to wait for retransmission lost packet stalls “presentation conversion” Instead: let application process misordered data: –App might accept less than perfect delivery, merely continue –Sending app can provide missing data (rather than keeping buffered copy in transport layer) –App might want to retransmit new not old data to fix consequence of original loss
How can we do this? TCP doesn't work (API wrong, reliable byte stream) Instead: Application Data Unit (ADU) –Unit of manipulation –ADUs processed in any order –ADU boundaries replace packet boundaries (for data manipulation functions like error detection) –Lost piece of ADU lost ADU
Discussion questions How to name ADUs? –Sequence numbers? Why not make ADU = packet? Why not make ADU >> packet? Does ALF imply a user-level protocol?
Integrated Layer Processing Layering: + Design / - Implementation Naive implementation sequential processing at each layer Clark/Tennenhouse argue that layering is not fundamental; rather, it's just one design option. Alternative engineering principle: Integrated Layer Processing
ILP Motivation: ever-widening memory / CPU bottleneck ”Integrated processing loop” –Loop over bytes in packet –Touch each byte at most once –Massive integrated loop w/ all steps in-line –Trivial example: bcopy + checksum Architecture must minimize precedence/ordering constraints, e.g., –Some steps needs ordering (DES/CBC, decompression?) –Many steps need per/app state (wait for demux)
Discussion Questions How to implement ILP? –By hand? –Automatic synthesis? –How? compiler? formal language? –Protocol implementations typically ad hoc, and thus difficult to transform. –Formal techniques haven't panned out (yet...?) Where are bottlenecks? where is most opportunity? –I claim at application! Then this is no longer really a networking problem; it's a really a compiler/application problem... (Example: encrypted/compressed video)