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
330
Sketchnotes: Harnessing the Messy Mind
exupero
1
200
Scala
exupero
1
360
Io
exupero
1
110
Other Decks in Technology
See All in Technology
やってやろうじゃないかメカアジャイル! / Let's do it, mechanical agile!
psj59129
1
180
疎通2024
sadnessojisan
5
1k
エンジニア視点で見る、 組織で運用されるデザインシステムにするには
shunya078
1
300
Oracle Base Database Service:サービス概要のご紹介
oracle4engineer
PRO
0
13k
Monitor GraalVM Native Apps with OpenTelemetry
logico_jp
0
130
AWS SAW を広めたい @四国クラウドお遍路
kazzpapa3
0
220
LLVM/ASMを使った有限体の高速実装
herumi
0
120
Functional TypeScript
naoya
11
4.6k
Oracle Autonomous Database:サービス概要のご紹介
oracle4engineer
PRO
1
7k
プログラム検証入門
riru
5
760
難しいから面白い!医薬品×在庫管理ドメインの複雑性と向き合い、プロダクトの成長を支えるための取り組み / Initiatives to Support Product Growth
kakehashi
2
190
Fediverse Discovery Providers overview
andypiper
0
150
Featured
See All Featured
Optimising Largest Contentful Paint
csswizardry
30
2.8k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
41
6.5k
How To Stay Up To Date on Web Technology
chriscoyier
786
250k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
25
3.9k
RailsConf 2023
tenderlove
28
800
Producing Creativity
orderedlist
PRO
340
39k
10 Git Anti Patterns You Should be Aware of
lemiorhan
653
58k
A designer walks into a library…
pauljervisheath
201
24k
Clear Off the Table
cherdarchuk
91
320k
A Modern Web Designer's Workflow
chriscoyier
691
190k
Typedesign – Prime Four
hannesfritz
39
2.3k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
28
1.6k
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