Concurrency Models Demystified
summary
Compares three concrete models by building a 135‑URL word frequency pipeline and measuring results Sequential uses blocking HTTP calls then a single thread map Multithreaded uses producer/consumer with a blocking queue guarded by mutexes and semaphores causing race fixes deadlocks and over synchronization Actor design uses three actors (fetcher word counter orchestrator) implemented with Akka and Erlang style messaging, trading overhead and complexity for isolation Asynchronous single thread uses nonblocking IO with async/await and Promise.all and measures faster for IO bound work but fails for CPU heavy tasks
AI-written summary · about
chapters (15)
- 0:00Concurrency challenges
- 1:17What concurrency means
- 3:05Shared memory sync
- 6:56Producer-consumer pattern
- 8:41Locks and sync problems
- 10:07Actor model messaging
- 13:40Actor implementation details
- 14:41Message passing trade-offs
- 15:24Async programming model
- 16:26Async in Hack
- 17:53Async trade-offs
- 18:56Concurrency models summary
- 19:39Choosing concurrency model
- 20:22Concurrency complexity advice
- 21:06Q&A
related talks
25mAsynchrony: Under the Hood
35mThe Multi-Threaded Asynchronous Parallel World of Swift
53mYou Keep Using That Word: Asynchronous And Interprocess Comms
01h 07mBuilding confidence in concurrent code with a model checker
01h 14mMultithreading in UI application: When some threads are more equal than others
49mThinking in a Highly Concurrent, Mostly-functional Language
25mArchitecting Web Apps - Lights, Camera, Action!
53mAsync sequences and algorithms to compose them
