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
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Michał Bednarz
May 25, 2023
Programming
84
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
More Decks by Michał Bednarz
See All by Michał Bednarz
Scala: The Ideal Language for Game Wallets
bednam
0
28
Concurrency in Scala: from locks to STM
bednam
0
170
Other Decks in Programming
See All in Programming
Kiroで創り、AgentCoreで繋ぐ!AWSで実践する「AI-DLC」から「AIエージェント統合」までの最新地図
licux
4
680
フロントエンドUIフレームワークのこれまでとこれから
ssssota
5
2.7k
What We Talk About When We Talk About XP
m_seki
2
630
[DroidKaigi 2026] Bring your own phones to Gradle Managed Devices
f2lk
0
120
一人だけ、Kiroが静止する日
hideg
0
110
thread_parallel_with_free-threaded_Python_and_NumPy.pdf
riku_sakamoto
0
330
JPUG勉強会 OSSデータベースの内部構造を理解しよう(第2回)
oga5
0
230
LL言語やWebフレームワークのPostgreSQL対応 〜DBの機能がユーザーに届くまで〜
kentaroutakeda
1
150
選挙速報を多くのユーザーへ 届ける Live Activities 設計
hamayokokuririn
0
140
スマートフォンでモールス信号を送受信する 〜スマートフォンのLEDとカメラで作る光通信の設計と実装〜
atsuki_seo
0
120
Claude Codeを組織的に動かして月400PRを実現した話
happy_ryo
0
280
一参加者から『中の人』へ 〜全通PHPerがブースに立って学んだ、カンファレンスを100倍楽しむコツ〜
wp_daisuke
0
150
Featured
See All Featured
Jamie Indigo - Trashchat’s Guide to Black Boxes: Technical SEO Tactics for LLMs
techseoconnect
PRO
0
670
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
2.2k
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
720
Highjacked: Video Game Concept Design
rkendrick25
PRO
1
460
WCS-LA-2024
lcolladotor
0
830
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
990
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
500
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
580
Chasing Engaging Ingredients in Design
codingconduct
0
310
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4.2k
Odyssey Design
rkendrick25
PRO
2
810
Design of three-dimensional binary manipulators for pick-and-place task avoiding obstacles (IECON2024)
konakalab
0
590
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