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
令和最新版Android Studioで化石デバイス向けアプリを作る
arkw
0
380
非同期処理の迷宮を抜ける: 初学者がつまづく構造的な原因
pd1xx
1
700
Microservices rules: What good looks like
cer
PRO
0
1.1k
CSC305 Lecture 17
javiergs
PRO
0
340
LLM Çağında Backend Olmak: 10 Milyon Prompt'u Milisaniyede Sorgulamak
selcukusta
0
110
配送計画の均等化機能を提供する取り組みについて(⽩⾦鉱業 Meetup Vol.21@六本⽊(数理最適化編))
izu_nori
0
140
無秩序からの脱却 / Emergence from chaos
nrslib
2
13k
MAP, Jigsaw, Code Golf 振り返り会 by 関東Kaggler会|Jigsaw 15th Solution
hasibirok0
0
230
AIコーディングエージェント(Gemini)
kondai24
0
200
SwiftUIで本格音ゲー実装してみた
hypebeans
0
110
20 years of Symfony, what's next?
fabpot
2
340
手軽に積ん読を増やすには?/読みたい本と付き合うには?
o0h
PRO
1
170
Featured
See All Featured
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
15k
Reflections from 52 weeks, 52 projects
jeffersonlam
355
21k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
37
2.6k
GraphQLの誤解/rethinking-graphql
sonatard
73
11k
Site-Speed That Sticks
csswizardry
13
990
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.3k
The Pragmatic Product Professional
lauravandoore
37
7.1k
Art, The Web, and Tiny UX
lynnandtonic
303
21k
Git: the NoSQL Database
bkeepers
PRO
432
66k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
3.8k
Designing for Performance
lara
610
69k
Building a Scalable Design System with Sketch
lauravandoore
463
34k
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