Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Effective Communication
Search
exupero
July 25, 2012
Technology
1
390
Effective Communication
A talk for the Detroit Lambda Lounge on CSP and Go.
exupero
July 25, 2012
Tweet
Share
More Decks by exupero
See All by exupero
Implementing the Elm Architecture in ClojureScript
exupero
1
380
Communicating Sequential Processes
exupero
0
340
Sketchnotes: Harnessing the Messy Mind
exupero
1
210
Scala
exupero
1
360
Io
exupero
1
120
Other Decks in Technology
See All in Technology
TypeScript100%で作るMovable Typeプラグイン
usualoma
2
110
共創するアーキテクチャ ~チーム全体で築く持続可能な開発エコシステム~ / Co-Creating Architecture - A Sustainable Development Ecosystem Built by the Entire Team
bitkey
PRO
0
2.6k
OCI Security サービス 概要
oracle4engineer
PRO
0
6.6k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
1
180
BLADE: An Attempt to Automate Penetration Testing Using Autonomous AI Agents
bbrbbq
0
360
KotlinユーザのためのJSpecify入門 / JSpecify 101 for Kotlin Devs
eller86
0
100
2024年のAmazon Bedrockアップデート一挙おさらい 〜まだ間に合う! re:Invent直前までの重大ニュースを速習しよう〜
minorun365
PRO
3
110
AI前提のサービス運用ってなんだろう?
ryuichi1208
8
1.5k
10XにおけるData Contractの導入について: Data Contract事例共有会
10xinc
7
750
SREが投資するAIOps ~ペアーズにおけるLLM for Developerへの取り組み~
takumiogawa
5
1.2k
DynamoDB でスロットリングが発生したとき_大盛りver/when_throttling_occurs_in_dynamodb_long
emiki
1
510
もし大規模障害が、10分で解決できたら?
masaaki_k
0
110
Featured
See All Featured
The MySQL Ecosystem @ GitHub 2015
samlambert
250
12k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
329
21k
Making Projects Easy
brettharned
115
5.9k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
25
1.8k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
26
1.4k
Site-Speed That Sticks
csswizardry
0
52
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
27
2.1k
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.1k
No one is an island. Learnings from fostering a developers community.
thoeni
19
3k
Measuring & Analyzing Core Web Vitals
bluesmoon
4
140
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
4
380
[RailsConf 2023] Rails as a piece of cake
palkan
52
4.9k
Transcript
Effective Communication Or, Why Telepathy Might Not Be Such a
Good Idea Eric Shull (@exupero)
SHARING MEMORY THE PROBLEM:
SHARING MEMORY THE PROBLEM: NON-DETERMINISM
SHARING MEMORY THE PROBLEM: NON-DETERMINISM RACE CONDITIONS
SHARING MEMORY THE PROBLEM: NON-DETERMINISM RACE CONDITIONS DEADLOCKS
SHARING MEMORY THE PROBLEM: NON-DETERMINISM RACE CONDITIONS DEADLOCKS HARD TO
REPRODUCE
SHARING MEMORY THE PROBLEM: NON-DETERMINISM RACE CONDITIONS DEADLOCKS HARD TO
REPRODUCE HARD TO DEBUG
SHARING MEMORY THE PROBLEM: NON-DETERMINISM RACE CONDITIONS DEADLOCKS HARD TO
REPRODUCE HARD TO DEBUG HARD TO ENSURE RELIABILITY
MUTEXES & LOCKS SEMAPHORES COMPARE & SWAP ATOMIC OPERATIONS SYNCHRONIZATION
SOLUTIONS?
WRITE LOCK? WRITE UNLOCK. READ LOCK? FAIL! READ LOCK? DEADLOCK?
GOT IT! GOT IT! COMPLEX
LEAKY
NON-COMPOSABLE
WANTED SIMPLICITY ABSTRACTIONS COMPOSABILITY
WANTED SIMPLICITY ABSTRACTIONS COMPOSABILITY CONCURRENCY
PIPES
PIPESSIMPLE
PIPESSIMPLE COMPOSABLE
PIPESSIMPLE COMPOSABLE NON-LEAKY
PIPESSIMPLE COMPOSABLE NON-LEAKY PARALLEL
CSP COMMUNICATING SEQUENTIAL PROCESSES BY C.A.R. HOARE
PROCESSES
PROCESSES NO THREADS
PROCESSES NO THREADS NO SHARED MEMORY
PROCESSES “GOROUTINES” NO THREADS NO SHARED MEMORY
CHANNELS
CHANNELS COMMUNICATION
CHANNELS COMMUNICATION PASS DATA STRUCTURES
CHANNELS COMMUNICATION PASS DATA STRUCTURES VALUES AREN’T SHARED
ONE-TO-ONE
ONE-TO-MANY
MANY-TO-ONE
MANY-TO-MANY
SOUNDS LIKE ERLANG, EXCEPT... SYNCHRONY ...
SOUNDS LIKE ERLANG, EXCEPT... SYNCHRONY ... CHANNEL, NOT MAILBOX
CSPC.A.R. HOARE
CSPC.A.R. HOARE GO ROB PIKE KEN THOMPSON ROBERT GRIESEMER
CSPC.A.R. HOARE GO ROB PIKE KEN THOMPSON ROBERT GRIESEMER
CSPC.A.R. HOARE SQUEAKROB PIKE LUCA CARDELLI GO ROB PIKE KEN
THOMPSON ROBERT GRIESEMER
CSPC.A.R. HOARE NEWSQUEAK ROB PIKE SQUEAKROB PIKE LUCA CARDELLI GO
ROB PIKE KEN THOMPSON ROBERT GRIESEMER
CHANNELS FUNCTIONS OR GOROUTINES* FUNCTIONS OR GOROUTINES*
CHANNELS FUNCTIONS OR GOROUTINES* FUNCTIONS OR GOROUTINES* *GOROUTINES:
CHANNELS FUNCTIONS OR GOROUTINES* FUNCTIONS OR GOROUTINES* NOT THREADS *GOROUTINES:
CHANNELS FUNCTIONS OR GOROUTINES* FUNCTIONS OR GOROUTINES* NOT THREADS MORE
LIGHTWEIGHT *GOROUTINES:
CHANNELS FUNCTIONS OR GOROUTINES* FUNCTIONS OR GOROUTINES* NOT THREADS MIGHT
HAVE MILLIONS MORE LIGHTWEIGHT *GOROUTINES:
A SITE AGGREGATOR github.com/exupero/csp-demo
POLL SITES A SITE AGGREGATOR github.com/exupero/csp-demo
csp/poll-sites
None
None
POLL SITES A SITE AGGREGATOR
POLL SITES GET SOURCE A SITE AGGREGATOR
csp/queue-content
None
None
POLL SITES GET SOURCE A SITE AGGREGATOR
POLL SITES FILTER QUEUE GET SOURCE A SITE AGGREGATOR
csp/filter-queue
None
POLL SITES FILTER QUEUE GET SOURCE A SITE AGGREGATOR
POLL SITES FILTER QUEUE AGGREGATE MOOD GET SOURCE A SITE
AGGREGATOR
csp/aggregate
None
A SITE AGGREGATOR
A SITE AGGREGATOR SIMPLE EXAMPLE
A SITE AGGREGATOR SIMPLE EXAMPLE DEMONSTRATES GRAMMAR
A SITE AGGREGATOR SIMPLE EXAMPLE DEMONSTRATES GRAMMAR SHOWS COMPOSABILITY
CSP COMMUNICATING SEQUENTIAL PROCESSES
CSP COMMUNICATING SEQUENTIAL PROCESSES PLAY WITH IT UNDERSTAND IT USE
IT