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
Michał Bednarz
May 25, 2023
Programming
0
72
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
13
Concurrency in Scala: from locks to STM
bednam
0
140
Other Decks in Programming
See All in Programming
OSS開発者という働き方
andpad
5
1.7k
print("Hello, World")
eddie
2
530
Ruby×iOSアプリ開発 ~共に歩んだエコシステムの物語~
temoki
0
310
Laravel Boost 超入門
fire_arlo
3
210
Amazon RDS 向けに提供されている MCP Server と仕組みを調べてみた/jawsug-okayama-2025-aurora-mcp
takahashiikki
1
110
パッケージ設計の黒魔術/Kyoto.go#63
lufia
3
440
ユーザーも開発者も悩ませない TV アプリ開発 ~Compose の内部実装から学ぶフォーカス制御~
taked137
0
170
The Past, Present, and Future of Enterprise Java with ASF in the Middle
ivargrimstad
0
110
1から理解するWeb Push
dora1998
7
1.9k
Oracle Database Technology Night 92 Database Connection control FAN-AC
oracle4engineer
PRO
1
440
実用的なGOCACHEPROG実装をするために / golang.tokyo #40
mazrean
1
270
Putting The Genie in the Bottle - A Crash Course on running LLMs on Android
iurysza
0
140
Featured
See All Featured
We Have a Design System, Now What?
morganepeng
53
7.8k
What’s in a name? Adding method to the madness
productmarketing
PRO
23
3.7k
It's Worth the Effort
3n
187
28k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
188
55k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
44
2.5k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
53
2.9k
Making the Leap to Tech Lead
cromwellryan
135
9.5k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.1k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
48
9.7k
Faster Mobile Websites
deanohume
309
31k
Art, The Web, and Tiny UX
lynnandtonic
303
21k
GraphQLとの向き合い方2022年版
quramy
49
14k
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