brave new concurrent world
DESCRIPTION
[talk from Webcamp Ljubljana 2009] A non-apologetic treatise on how to think concurrency. Contains exotic languages, swearing, and only a passing relevance to the web.TRANSCRIPT
![Page 2: Brave New Concurrent World](https://reader033.vdocuments.mx/reader033/viewer/2022061222/54c2098a4a79598f198b45a0/html5/thumbnails/2.jpg)
Why should you give a fuck?
• More data > better algorithms
• Moore’s Law: from GHz to cores
• Conventional computation models are badly broken
![Page 3: Brave New Concurrent World](https://reader033.vdocuments.mx/reader033/viewer/2022061222/54c2098a4a79598f198b45a0/html5/thumbnails/3.jpg)
Some big ideas in concurrency
![Page 4: Brave New Concurrent World](https://reader033.vdocuments.mx/reader033/viewer/2022061222/54c2098a4a79598f198b45a0/html5/thumbnails/4.jpg)
Decouple temporal and spital order
![Page 5: Brave New Concurrent World](https://reader033.vdocuments.mx/reader033/viewer/2022061222/54c2098a4a79598f198b45a0/html5/thumbnails/5.jpg)
a*(b*c)=(a*b)*c a+b=b+a
Associativity v. commutativity
![Page 6: Brave New Concurrent World](https://reader033.vdocuments.mx/reader033/viewer/2022061222/54c2098a4a79598f198b45a0/html5/thumbnails/6.jpg)
• First/rest• Linked lists
• Partitions• trees
Linear v. multi-way decomposition
![Page 7: Brave New Concurrent World](https://reader033.vdocuments.mx/reader033/viewer/2022061222/54c2098a4a79598f198b45a0/html5/thumbnails/7.jpg)
• Recursive updates • Map to singelton solutions
• Merge subsolutions
Accumulation v. merging
![Page 8: Brave New Concurrent World](https://reader033.vdocuments.mx/reader033/viewer/2022061222/54c2098a4a79598f198b45a0/html5/thumbnails/8.jpg)
The future is a function of the past, it doesn’t change it
![Page 9: Brave New Concurrent World](https://reader033.vdocuments.mx/reader033/viewer/2022061222/54c2098a4a79598f198b45a0/html5/thumbnails/9.jpg)
Identity is an illusion
There is no enduring changing entity
![Page 10: Brave New Concurrent World](https://reader033.vdocuments.mx/reader033/viewer/2022061222/54c2098a4a79598f198b45a0/html5/thumbnails/10.jpg)
Immutable values
• Copy on change (pure functions)– State transitions never disturb prior– Structure sharing where possible
• Never need synchronization
![Page 11: Brave New Concurrent World](https://reader033.vdocuments.mx/reader033/viewer/2022061222/54c2098a4a79598f198b45a0/html5/thumbnails/11.jpg)
Forget everything you know about performance
![Page 12: Brave New Concurrent World](https://reader033.vdocuments.mx/reader033/viewer/2022061222/54c2098a4a79598f198b45a0/html5/thumbnails/12.jpg)
Do redundant operationsto reduce communication
![Page 13: Brave New Concurrent World](https://reader033.vdocuments.mx/reader033/viewer/2022061222/54c2098a4a79598f198b45a0/html5/thumbnails/13.jpg)
Take extra space to permittemporal decoupling
![Page 14: Brave New Concurrent World](https://reader033.vdocuments.mx/reader033/viewer/2022061222/54c2098a4a79598f198b45a0/html5/thumbnails/14.jpg)
![Page 15: Brave New Concurrent World](https://reader033.vdocuments.mx/reader033/viewer/2022061222/54c2098a4a79598f198b45a0/html5/thumbnails/15.jpg)
Map/reduce
Concurrency in practice
![Page 16: Brave New Concurrent World](https://reader033.vdocuments.mx/reader033/viewer/2022061222/54c2098a4a79598f198b45a0/html5/thumbnails/16.jpg)
![Page 17: Brave New Concurrent World](https://reader033.vdocuments.mx/reader033/viewer/2022061222/54c2098a4a79598f198b45a0/html5/thumbnails/17.jpg)
Fine granularity
N(map tasks) >> N(machines)
![Page 18: Brave New Concurrent World](https://reader033.vdocuments.mx/reader033/viewer/2022061222/54c2098a4a79598f198b45a0/html5/thumbnails/18.jpg)
Fault tolerance viare-execution
![Page 19: Brave New Concurrent World](https://reader033.vdocuments.mx/reader033/viewer/2022061222/54c2098a4a79598f198b45a0/html5/thumbnails/19.jpg)
Refinements
• Redundant execution
• Locality optimizations– Master scheduler
![Page 20: Brave New Concurrent World](https://reader033.vdocuments.mx/reader033/viewer/2022061222/54c2098a4a79598f198b45a0/html5/thumbnails/20.jpg)
How not to get (completely) ass-raped in the near future
• Functional programming
• Smart(er) compilers/run-times
Erlang, Clojure, (Haskell, Go, Fortress, ...)