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
77
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
izumin5210のプロポーザルのネタ探し #tskaigi_msup
izumin5210
1
110
開発者から情シスまで - 多様なユーザー層に届けるAPI提供戦略 / Postman API Night Okinawa 2026 Winter
tasshi
0
200
AIフル活用時代だからこそ学んでおきたい働き方の心得
shinoyu
0
130
Automatic Grammar Agreementと Markdown Extended Attributes について
kishikawakatsumi
0
190
MDN Web Docs に日本語翻訳でコントリビュート
ohmori_yusuke
0
650
CSC307 Lecture 06
javiergs
PRO
0
680
例外処理とどう使い分ける?Result型を使ったエラー設計 #burikaigi
kajitack
16
6.1k
Implementation Patterns
denyspoltorak
0
280
Fragmented Architectures
denyspoltorak
0
150
OCaml 5でモダンな並列プログラミングを Enjoyしよう!
haochenx
0
140
humanlayerのブログから学ぶ、良いCLAUDE.mdの書き方
tsukamoto1783
0
190
今から始めるClaude Code超入門
448jp
8
8.7k
Featured
See All Featured
Believing is Seeing
oripsolob
1
54
Product Roadmaps are Hard
iamctodd
PRO
55
12k
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
2
3.6k
The untapped power of vector embeddings
frankvandijk
1
1.6k
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
0
250
Amusing Abliteration
ianozsvald
0
100
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
1
710
Stop Working from a Prison Cell
hatefulcrawdad
273
21k
Bioeconomy Workshop: Dr. Julius Ecuru, Opportunities for a Bioeconomy in West Africa
akademiya2063
PRO
1
54
Making the Leap to Tech Lead
cromwellryan
135
9.7k
The World Runs on Bad Software
bkeepers
PRO
72
12k
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
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