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
Core.async
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Peter Brachwitz
September 18, 2014
Programming
78
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Core.async
Introduction to core.async with some remarks on concurrency models in general
Peter Brachwitz
September 18, 2014
More Decks by Peter Brachwitz
See All by Peter Brachwitz
Om/React.js/Clojurescript: An introduction
pebrc
1
300
Introduction to Clojure for Java Devs
pebrc
1
90
Other Decks in Programming
See All in Programming
Datadog × OpenTelemetry 入門と実践のあいだ
kn_to_maxpno
1
170
Honoでのサプライチェーン侵害対策 〜 3つのライブラリに学ぶ
yusukebe
7
1.4k
エージェンティックRAGにAWSで入門しよう!
har1101
9
1.7k
The ROI of Quarkus for Spring Boot Applications
hollycummins
0
130
作って学ぶ、 JSX (TSX) ランタイムの基本
syumai
7
1.7k
Skillsは効率化、Agentsは"自分の拡張"——Builder時代のエージェント編成(CC Night 2026)
wemra
1
140
OSもどきOS
arkw
0
580
RTSPクライアントを自作してみた話
simotin13
0
620
正しくソフトウェアを作る、前提を疑うための認知の視点 / doubt-premise
minodriven
21
7k
依存関係から依存物へ―Dependencyという言葉の歴史をひも解く
j_lee
0
130
Signal Forms: Details & Live Coding @enterJS 2026 in Mannheim
manfredsteyer
PRO
0
180
ふつうのFeature Flag実践入門
irof
8
4.1k
Featured
See All Featured
sira's awesome portfolio website redesign presentation
elsirapls
0
280
Fireside Chat
paigeccino
42
4k
Docker and Python
trallard
47
3.9k
Automating Front-end Workflow
addyosmani
1370
210k
Statistics for Hackers
jakevdp
799
230k
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
180
Utilizing Notion as your number one productivity tool
mfonobong
4
320
Principles of Awesome APIs and How to Build Them.
keavy
128
18k
Believing is Seeing
oripsolob
1
150
First, design no harm
axbom
PRO
2
1.2k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
2k
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
1.1k
Transcript
CORE.ASYNC WITH SOME REMARKS ON CONCURRENCY MODELS IN GENERAL /
Peter Brachwitz @p_brc
AGENDA 1. Popular concurrency models in comparison [15 min.] 2.
A taste of core.async [15 min]
WHY? We want to be more 'reactive' (we can discuss
whether 'reactive' is a 'thing' later) We want to make use of our multi-core hardware Low-level concurrency is hard
WHAT? Definitions: Concurrency vs. parallelism and what about multi-core Here:
'processes' working together in a meaningful manner
APPROACHES TO CONCURRENT PROGRAMMING 1. Shared memory: Threads and locks
* 2. Message passing: 1. Actors 2. CSP
WHAT NOT (TODAY)? Refs Atoms Agents Futures, Delays
SHARED MEMORY, THREADS AND LOCKS 'Location based programming' (R. Hickey)
Naive approaches don't scale very well. Think: web server using a thread per request. Hard to reason about, error-prone
MITIGATION: EVENT-LOOP ARCHITECTURE Single-threaded, non-blocking Handle blocking or time-consuming computations
in different execution contexts Handle the completion of these computations via callbacks (callback hell)
THE ACTOR MODEL [originally] Hewitt, Bishop, Steiger 1973
'Objects' communicating via messages Sequencing of messages via actor-local queues
('mailbox') You need to know your peer No inherent back-pressure (can be implemented on application level)
CSP [originally] Hoare 1978
CSP in core.async flavour Channels as conveyor belts between 'processes'
Sequential looking asynchrony via go blocks Channels are bounded: back pressure Not for distributed computing: everything within one VM
COMPARISON WITH ACTOR SYSTEMS Anonymity vs. Identity Rendezvous vs. Asynchrony
Explicit vs. implicit 'channels' Local vs. Distributed
LET'S LOOK AT SOME CODE!
SOURCES core.async on Github Tim Baldrige's Clojure Conj 2013 talk
Rich Hickey speaking at Strange Loop 2013 Gul Agha's dissertation