Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Core.async
Search
Peter Brachwitz
September 18, 2014
Programming
0
60
Core.async
Introduction to core.async with some remarks on concurrency models in general
Peter Brachwitz
September 18, 2014
Tweet
Share
More Decks by Peter Brachwitz
See All by Peter Brachwitz
Om/React.js/Clojurescript: An introduction
pebrc
1
290
Introduction to Clojure for Java Devs
pebrc
1
73
Other Decks in Programming
See All in Programming
sbt 2
xuwei_k
0
300
マスタデータ問題、マイクロサービスでどう解くか
kts
0
100
Rubyで鍛える仕組み化プロヂュース力
muryoimpl
0
120
令和最新版Android Studioで化石デバイス向けアプリを作る
arkw
0
410
Findy AI+の開発、運用におけるMCP活用事例
starfish719
0
680
ZOZOにおけるAI活用の現在 ~モバイルアプリ開発でのAI活用状況と事例~
zozotech
PRO
8
5.7k
AIエージェントを活かすPM術 AI駆動開発の現場から
gyuta
0
420
テストやOSS開発に役立つSetup PHP Action
matsuo_atsushi
0
160
SwiftUIで本格音ゲー実装してみた
hypebeans
0
370
251126 TestState APIってなんだっけ?Step Functionsテストどう変わる?
east_takumi
0
320
エディターってAIで操作できるんだぜ
kis9a
0
730
Tinkerbellから学ぶ、Podで DHCPをリッスンする手法
tomokon
0
130
Featured
See All Featured
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
37
2.6k
Into the Great Unknown - MozCon
thekraken
40
2.2k
The Illustrated Children's Guide to Kubernetes
chrisshort
51
51k
The Language of Interfaces
destraynor
162
25k
[SF Ruby Conf 2025] Rails X
palkan
0
520
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
55
3.1k
Context Engineering - Making Every Token Count
addyosmani
9
510
Build The Right Thing And Hit Your Dates
maggiecrowley
38
3k
[RailsConf 2023] Rails as a piece of cake
palkan
58
6.2k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.6k
Stop Working from a Prison Cell
hatefulcrawdad
273
21k
Balancing Empowerment & Direction
lara
5
800
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