Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Scala: Context & Observability
Search
Michał Bednarz
May 25, 2023
Programming
87
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Scala: Context & Observability
Slides for The Art of Scala presentation in Warsaw on 25th May 2023
Michał Bednarz
May 25, 2023
Transcript
30 slides
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
More Decks by Michał Bednarz
See All by Michał Bednarz
Scala: The Ideal Language for Game Wallets
bednam
0
34
Concurrency in Scala: from locks to STM
bednam
0
180
Other Decks in Programming
See All in Programming
[Kotlin Fest 2026] eBPF Tracing for Kotlin
takehaya
1
400
AI駆動開発4年目の現在地(『あなたはFDEになるべきか?』イベント資料)
kumaiu
0
700
LLM 101: Exploring LLMs, Starting with Tokens.
dalinaum
0
120
仕様駆動開発入門 (何を作るかを先に決めて渡す) | 目指せ Kiro マスター 05
inariku
PRO
3
220
ローカルLLMの基本と近況 2611 / Local LLM basics and recent situation 2611
kishida
3
660
JavaScriptはシングルバイナリの夢を見るか / Does JavaScript Dream of a Single Binary?
ssssota
0
130
どうしても Eloquent でリポジトリパターンをやりたいんだ #phpcon_niigata / phpcon-niigata-2026
shogogg
0
670
Kotlin JVM用に作られたライブラリのKMPを前提とした再設計
jsoizo
0
230
LLM 101
dalinaum
0
530
선언형 햅틱 라이브러리 진동을 소개합니다
l2hyunwoo
1
330
Ruby から Emacs を操作したい
phigasui
0
390
AIエージェントの「テストは通るのに本番で壊れる」を減らす
shibuiwilliam
3
110
Featured
See All Featured
Technical Leadership for Architectural Decision Making
baasie
4
660
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
3k
Building an army of robots
kneath
307
47k
New Earth Scene 8
popppiees
5
2.9k
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
1
250
Git: the NoSQL Database
bkeepers
PRO
433
67k
GraphQLの誤解/rethinking-graphql
sonatard
75
12k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
28
3.8k
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
380
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
1
620
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
Side Projects
sachag
456
43k