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
Scala: Context & Observability
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Michał Bednarz
May 25, 2023
Programming
80
0
Share
Scala: Context & Observability
Slides for The Art of Scala presentation in Warsaw on 25th May 2023
Michał Bednarz
May 25, 2023
More Decks by Michał Bednarz
See All by Michał Bednarz
Scala: The Ideal Language for Game Wallets
bednam
0
19
Concurrency in Scala: from locks to STM
bednam
0
160
Other Decks in Programming
See All in Programming
iOS26時代の新規アプリ開発
yuukiw00w
0
160
20260514_its_the_context_window_stupid.pdf
heita
0
1.1k
tsserverとは何だったのか_これからどうなるのか
nowaki28
1
270
SkillsをS3 Filesに置く時のあれこれ
watany
3
1.7k
次世代リンターで探る、tsgo 時代における型認識カスタムルールの現実解
ytakahashii
1
610
When benchmarks go bad - what I learned from measuring performance wrong
hollycummins
0
400
Swiftのレキシカルスコープ管理
kntkymt
0
130
色即是空、空即是色、データサイエンス
kamoneggi
1
140
cloudnative conference 2026 flyle
azihsoyn
1
200
Agentic UI beyond Chats Architecture Patterns & Open Standards @ngMunich 05/2026
manfredsteyer
PRO
0
110
継続的な負荷検証を目指して
pyama86
3
1.2k
空間オーディオの活用
objectiveaudio
0
160
Featured
See All Featured
Building AI with AI
inesmontani
PRO
1
1k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.2k
Leo the Paperboy
mayatellez
7
1.8k
GraphQLとの向き合い方2022年版
quramy
50
15k
Balancing Empowerment & Direction
lara
6
1.1k
Chasing Engaging Ingredients in Design
codingconduct
0
190
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.7k
Making Projects Easy
brettharned
120
6.6k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
199
73k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
62k
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