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
Concurrency in the imperative and functional world
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Scalone
November 17, 2015
Programming
180
0
Share
Concurrency in the imperative and functional world
Presentation created for ITerior 2015 conference check
http://iterior.com.br
Scalone
November 17, 2015
More Decks by Scalone
See All by Scalone
TDD - Test Driven Development
scalone
0
3
Ruby, Web and IOT with the same Platform
scalone
0
100
20k mRuby devices in Production
scalone
0
470
DaFunk, IOT Framework in Ruby
scalone
0
180
Concurrency in the imperative and functional world
scalone
0
220
Git e Github
scalone
0
110
Git, o que é, do que é feito, para que serve?
scalone
0
350
DaFunk, IOT Framework in Ruby
scalone
0
210
Uzmenino Marketplace
scalone
0
160
Other Decks in Programming
See All in Programming
The free-lunch guide to idea circularity
hollycummins
0
410
Go_College_最終発表資料__外部公開用_.pdf
xe_pc23
0
120
Symfony + NelmioApiDocBundle を使った スキーマ駆動開発 / Schema Driven Development with NelmioApiDocBundle
okashoi
0
260
AIと共にエンジニアとPMの “二刀流”を実現する
naruogram
0
130
2026-03-27 #terminalnight 変数展開とコマンド展開でターミナル作業をスマートにする方法
masasuzu
0
290
AI時代の脳疲弊と向き合う ~言語学としてのPHP~
sakuraikotone
1
1.8k
Reactive ❤️ Loom: A Forbidden Love Story
franz1981
2
220
10年分の技術的負債、完済へ ― Claude Code主導のAI駆動開発でスポーツブルを丸ごとリプレイスした話
takuya_houshima
0
930
ローカルで稼働するAI エージェントを超えて / beyond-local-ai-agents
gawa
1
240
Going Multiplatform with Your Android App (Android Makers 2026)
zsmb
1
290
AIエージェントで業務改善してみた
taku271
0
440
AI時代のシステム設計:ドメインモデルで変更しやすさを守る設計戦略
masuda220
PRO
7
1.2k
Featured
See All Featured
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
0
260
ラッコキーワード サービス紹介資料
rakko
1
2.9M
SEO for Brand Visibility & Recognition
aleyda
0
4.4k
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
2
660
HDC tutorial
michielstock
1
600
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
120
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
1
220
Facilitating Awesome Meetings
lara
57
6.8k
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
140
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.6k
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
2
200
How to Think Like a Performance Engineer
csswizardry
28
2.5k
Transcript
@Scalone Concurrency in the imperative and functional world
Thiago Scalone
[email protected]
@scalone
None
None
None
… nothing new … DISCLAIMER
If you don't understand concurrency… it isn’t problem if doesn't
make part of your day. DISCLAIMER
POINT
Context 1
None
… and the light …
None
None
None
None
None
None
Context 2
None
Concurrency
Concurrency Parallelism
“Dealing a lot of things at once Rob Pike about
Concurrency
“Doing a lot of things at once Rob Pike about
Parallelism
@Scalone
@Scalone
@Scalone
@Scalone
@Scalone
@Scalone
@Scalone
@Scalone
Context 3
Imperative
Imperative
Imperative defines computation as statements that change a program state
Imperative
Imperative
Functional
Functional treats computation as the evaluation of mathematical functions and
avoids state and mutable data
Functional treats computation as the evaluation of mathematical functions and
avoids state and mutable data
Functional treats computation as the evaluation of mathematical functions and
avoids state and mutable data
Functional
Functional
Functional
Functional
Functional
Functional
None
Concurrency
Threads
Thread and Locks
Thread and Locks
Thread and Locks
Thread and Locks
Thread and Locks
Thread and Locks
Thread and Locks
Thread and Locks
Java = Imperative
Thread and Locks I don't know the answer
Thread and Locks Mutable State
Thread and Locks Race condition
Race Condition the output is dependent on the sequence or
timing of other uncontrollable events
Thread and Locks The meaning of life is: 0
None
Thread and Locks The meaning of life is: 0
Thread and Locks
Thread and Locks
Thread and Locks
Thread and Locks
Thread and Locks
Thread and Locks
Thread and Locks
Thread and Locks
Thread and Locks Optimization
Optimization the compiler is allowed to statically optimize your code
by reordering things
Optimization the compiler is allowed to statically optimize your code
by reordering things
Optimization the JVM is allowed to dynamically optimize your code
by reordering things
Optimization the JVM is allowed to dynamically optimize your code
by reordering things
Optimization the hardware you’re running on is allowed to optimize
performance by reordering things
Optimization the hardware you’re running on is allowed to optimize
performance by reordering things
Imperative
Imperative Thread Pool Mutual Exclusion Mutiple Locks - Deadlock Excessive
Contention
Functional
Functional treats computation as the evaluation of mathematical functions and
avoids state and mutable data
Functional treats computation as the evaluation of mathematical functions and
avoids state and mutable data
Functional treats computation as the evaluation of mathematical functions and
avoids state and mutable data
Functional - Bound/Unbound Variable
Functional - Bound/Unbound Variable
Functional - Bound/Unbound Variable
Functional - Bound/Unbound Variable
Functional - Bound/Unbound Variable
Determinism
Determinism - Same In => Same out f(x)
Determinism - Same In => Same out no disk I/O
f(x)
Determinism - Same In => Same out no disk I/O
no random() f(x)
Determinism - Same In => Same out no disk I/O
no side effects no random() always the same result f(x)
Determinism - Same In => Same out no disk I/O
no side effects no random() f(x)
Determinism
Determinism
Determinism 42
Determinism
Determinism + Concurrency
Determinism + Concurrency
Determinism + Concurrency
Determinism + Concurrency
Determinism + Concurrency
Concurrency Models
Actor
Actor
Actor An object which encapsulates state and communicates with other
actors by exchaging messages
Actor accumulator
Actor accumulator
Goroutines and Channels
Goroutines and Channels
Microthreads with a internal scheduler Goroutines and Channels
Goroutines and Channels
Goroutines and Channels
Goroutines and Channels
Goroutines and Channels
Goroutines and Channels
Goroutines and Channels
Goroutines and Channels
Goroutines and Channels
References
References
References
THANK YOU! @Scalone