Low-Latency Video Processing Using Thousands of Tiny Threads [pdf]
Co-author here -- thanks for linking to our paper. The basic theme is that (a) purely functional implementations of things like video codecs can allow finer-granularity parallelism than previously realized [e.g. smaller than the interval between key frames], and (b) lambda can be used to invoke thousands of threads very quickly, running an arbitrary statically linked Linux binary, to do big jobs interactively. (Subsequent work like PyWren, by my old MIT roommate, have now done (b) more generally than us.)<p>My student&#x27;s talk, which is worth watching and has a cool demo of using the same system for bulk facial recognition, is here: <a href="https:&#x2F;&#x2F;www.usenix.org&#x2F;conference&#x2F;nsdi17&#x2F;technical-sessions&#x2F;presentation&#x2F;fouladi" rel="nofollow">https:&#x2F;&#x2F;www.usenix.org&#x2F;conference&#x2F;nsdi17&#x2F;technical-sessions&#x2F;...</a><p>Daniel Horn, Ken Elkabany, Chris Lesniewski, and I used the same idea of finer-granularity parallelism at inconvenient boundaries, and initially some of the same code (a purely functional implementation of the VP8 entropy codec, and a purely functional implementation of the JPEG DC-predicted Huffman coder that can resume encoding from midstream) in our Lepton project at Dropbox to compress 200+ PB of their JPEG files, splitting each transcoded JPEG at an arbitrary byte boundary to match the filesystem blocks: <a href="https:&#x2F;&#x2F;www.usenix.org&#x2F;conference&#x2F;nsdi17&#x2F;technical-sessions&#x2F;presentation&#x2F;horn" rel="nofollow">https:&#x2F;&#x2F;www.usenix.org&#x2F;conference&#x2F;nsdi17&#x2F;technical-sessions&#x2F;...</a><p>My students and I also have an upcoming paper at NSDI 2018 that uses the same purely functional codec to do better videoconferencing (compared with Facetime, Hangouts, Skype, and WebRTC with and without VP9-SVC). The idea is that having a purely functional codec lets you explore execution paths without committing to them, so the videoconferencing system can try different quantizers for each frame and look at the resulting compressed sizes (or no quantizer, just skipping the frame even after encoding) until it finds one that matches its estimate of the network&#x27;s capacity at that moment.<p>One conclusion is that video codecs (and JPEG codecs...) should support a save&#x2F;restore interface to give a succinct summary of their internal state that can be thawed out elsewhere to let you resume from that point. We&#x27;ve shown now that if you have that (at least for VP8, but probably also for VP9&#x2F;H.264&#x2F;265 as these are very similar) you can do a lot of cool tricks, even trouncing H.264&#x2F;265-based videoconferencing apps on quality and delay. (Code here: <a href="https:&#x2F;&#x2F;github.com&#x2F;excamera&#x2F;alfalfa" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;excamera&#x2F;alfalfa</a>). Mosh (mobile shell) is really about the same thing and is sort of videoconferencing for terminals -- if you have a purely functional ANSI terminal emulator with a save&#x2F;restore interface that expresses its state succinctly (relative to an arbitrary prior state), you can do the same tricks of syncing the server-to-client state at whatever interval you want and recovering efficiently from dropped updates.<p>For lambda, it&#x27;s fun to imagine that every compute-intensive job you might run (video filters or search, machine learning, data visualization, ray tracing) could show the user a button that says, &quot;Do it locally [1 hour]&quot; and a button next to it that says, &quot;Do it in 10,000 cores on lambda, one second each, and you&#x27;ll pay 25 cents and it will take one second.&quot;