Topics: 1. Evolution of event-driven programming: X Wait for a key press or line of text. X Interrupts (hardware and software). X Modern event loops 2. Types of events in modern applications: X IO X Timer X User input X Signal X Anything that can spontaneously happen in the real world. 3. How to write a modern event-loop. X kernel facilities (poll, select, etc.) 4. List of already-built event loops. - EV - Glib 5. Event-driven programming in Perl - POE - AnyEvent - IO::Async - Mojo::IOLoop 6. Special considerations - Exceptions in event-driven code. - SIGPIPE, EPIPE - might have more to do with long-lived processes rather than just event-driven programming, but still something to watch out for... 7. Promises: - Future - Future::AsyncAwait - Future::Utils 8. Real-world uses for event-driven applications: - Webhooks - PubsubHubbub - msg queue Other topics: X What is event-driven programming? - Reactor: event loop that can receive multiple types of events and demultiplex them, delivering them to appropriate handlers. - C10k problem - EDA (event-driven architecture) - Benefits of Event-driven Traditional programs: - CGI - web server calls your program, and your program does its thing and finishes. - filters - grep, less, sed, etc. Like a function, the program takes its input and produces some output. Perl features: - first-class subroutines - Can mix traditional architecture with event-driven (like docker that provides both an http and command-line interface.