Tiny Functions for Codecs, Compilation, and (Maybe) Soon Everything
Speaker: Keith Winstein, Stanford University
Location: 60 Fifth Avenue C15
Date: October 10, 2017, 11 a.m.
Host: Mike Walfish
By expressing systems as compositions of tiny pure functions, we've found it's possible to build better applications for video and image processing and for many other tasks that currently occupy our computers: compiling software, machine learning, data exploration, etc. I'll discuss our experience with systems that demonstrate this basic idea: ExCamera parallelizes video encoding into thousands of tiny tasks, each handling a fraction of a second of video, much shorter than the interval between keyframes, and executing in parallel on AWS Lambda. Rhino uses a network-aware video codec, and a video-aware transport protocol, for real-time videoconferencing. This architecture substantially outperforms more loosely-coupled applications -- Skype, Facetime, Hangouts, and WebRTC -- in both delay and visual quality. Lepton uses a purely functional JPEG/VP8 transcoder to compress images in parallel across a distributed network filesystem with arbitrary block boundaries. This open-source system is in production at Dropbox and has compressed, by 23%, more than 200 petabytes of user JPEGs.
Based on our experience, we propose a general abstraction for outsourced morsels of computation, called cloud "thunks" -- stateless closures that describe their data-dependencies by content hash. We have created a tool that infers these thunks from an arbitrary build system (make, cmake, etc.) and compiles software with 1000-way parallelism on public functions-as-a-service infrastructure like AWS Lambda. We believe that functionalizing applications in this way will fuel a new wave of "general-purpose lambda computing," permitting us to turn many time-consuming processes into large numbers of lambdas executing in parallel with low latency in the cloud.
Keith Winstein is an assistant professor of computer science and, by courtesy, of law at Stanford University. He and his colleagues wrote the Mosh (mobile shell) tool, the Remy (TCP ex Machina) system for computer-generated congestion control, the Mahimahi network emulator, and the Lepton JPEG-compression tool. Winstein was previously a staff reporter at The Wall Street Journal.