Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Scala: Context & Observability
Search
Michał Bednarz
May 25, 2023
Programming
0
75
Scala: Context & Observability
Slides for The Art of Scala presentation in Warsaw on 25th May 2023
Michał Bednarz
May 25, 2023
Tweet
Share
More Decks by Michał Bednarz
See All by Michał Bednarz
Scala: The Ideal Language for Game Wallets
bednam
0
15
Concurrency in Scala: from locks to STM
bednam
0
150
Other Decks in Programming
See All in Programming
AIエージェントを活かすPM術 AI駆動開発の現場から
gyuta
0
400
Microservices rules: What good looks like
cer
PRO
0
1.3k
「コードは上から下へ読むのが一番」と思った時に、思い出してほしい話
panda728
PRO
38
26k
Giselleで作るAI QAアシスタント 〜 Pull Requestレビューに継続的QAを
codenote
0
160
関数実行の裏側では何が起きているのか?
minop1205
1
690
手軽に積ん読を増やすには?/読みたい本と付き合うには?
o0h
PRO
1
170
組み合わせ爆発にのまれない - 責務分割 x テスト
halhorn
1
150
MAP, Jigsaw, Code Golf 振り返り会 by 関東Kaggler会|Jigsaw 15th Solution
hasibirok0
0
230
令和最新版Android Studioで化石デバイス向けアプリを作る
arkw
0
400
AIコーディングエージェント(skywork)
kondai24
0
160
JETLS.jl ─ A New Language Server for Julia
abap34
1
390
Rubyで鍛える仕組み化プロヂュース力
muryoimpl
0
100
Featured
See All Featured
YesSQL, Process and Tooling at Scale
rocio
174
15k
Writing Fast Ruby
sferik
630
62k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
122
21k
Facilitating Awesome Meetings
lara
57
6.7k
Docker and Python
trallard
47
3.7k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
RailsConf 2023
tenderlove
30
1.3k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
Scaling GitHub
holman
464
140k
Build your cross-platform service in a week with App Engine
jlugia
234
18k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
10
720
A Modern Web Designer's Workflow
chriscoyier
698
190k
Transcript
Scala: Context & Observability
Context propagation explicit parameter implicit parameter
Thread-safe state on JVM AtomicRef ThreadLocal Every thread has its
own local copy of the state which is not visible to the others Shared state safely updated by many threads using optimistic concurrency (CAS)
Context propagation on JVM ThreadLocal InheritableThreadLocal DynamicVariable
None
None
None
None
None
Scope Lexical Dynamic Depends on location in source code Depends
on method call graph
None
None
None
Functional context propagation ReaderT / Kleisli (cats) IOLocal (cats-effect) Context
functions (scala 3)
Context propagation with cats-mtl Ask Local Stateful read-only environment effect
dynamic scope effect shared mutable state effect
None
None
None
None
None
None
None
Local + log4cats demo
None
Local + log4cats + IOLocal demo
None
None
Scala 3 Context Functions
None
linktr.ee/mbednarz