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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
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
高速開発のためのコード整理術
sutetotanuki
1
400
Patterns of Patterns
denyspoltorak
0
1.4k
フロントエンド開発の勘所 -複数事業を経験して見えた判断軸の違い-
heimusu
7
2.8k
Basic Architectures
denyspoltorak
0
670
AI前提で考えるiOSアプリのモダナイズ設計
yuukiw00w
0
230
AI時代の認知負荷との向き合い方
optfit
0
160
AI時代のキャリアプラン「技術の引力」からの脱出と「問い」へのいざない / tech-gravity
minodriven
21
7.2k
MDN Web Docs に日本語翻訳でコントリビュート
ohmori_yusuke
0
650
0→1 フロントエンド開発 Tips🚀 #レバテックMeetup
bengo4com
0
560
Oxlint JS plugins
kazupon
1
890
今こそ知るべき耐量子計算機暗号(PQC)入門 / PQC: What You Need to Know Now
mackey0225
3
370
dchart: charts from deck markup
ajstarks
3
990
Featured
See All Featured
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
0
2.3k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.4k
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
0
160
Utilizing Notion as your number one productivity tool
mfonobong
3
220
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
1
51
How to Ace a Technical Interview
jacobian
281
24k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
54k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
122
21k
Bootstrapping a Software Product
garrettdimon
PRO
307
120k
Product Roadmaps are Hard
iamctodd
PRO
55
12k
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
320
Ruling the World: When Life Gets Gamed
codingconduct
0
140
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