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関西】http4s/tagless final
Search
Dasha Tarasova
November 10, 2018
3
2.6k
【Scala関西】http4s/tagless final
http4sとcats-effectで可愛らしい、関数型らしいアプリケーションを書こう!٩(๑^o^๑)۶
Dasha Tarasova
November 10, 2018
Tweet
Share
More Decks by Dasha Tarasova
See All by Dasha Tarasova
ワークライフバランスのバランス
dysangelist
1
870
Featured
See All Featured
Become a Pro
speakerdeck
PRO
24
4.9k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
250
21k
How GitHub (no longer) Works
holman
311
140k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
106
48k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
9
630
Into the Great Unknown - MozCon
thekraken
31
1.4k
The Straight Up "How To Draw Better" Workshop
denniskardys
232
130k
5 minutes of I Can Smell Your CMS
philhawksworth
202
19k
How to train your dragon (web standard)
notwaldorf
88
5.6k
Stop Working from a Prison Cell
hatefulcrawdad
267
20k
Bash Introduction
62gerente
608
210k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
327
21k
Transcript
http4scats-effect ٩(๑^o^๑)۶
2 Hello! ! !# Scala" % (&)
' $ ZOZO Tech
• • cats effect
• http4s • Tagless final +..+♪ (•’∀’•)♪+..+ 3
• • dysangelist/scala_kansai_demo @github +..+♪(•’∀’•)♪+..+
4
1
Scala(/0#+ • #+-7Java2.6,3" 8 • '$% 7 14 8
• 57&)*)!!8 • 6
• • •
7
01(* .)-4 • *. #'+ • %-!*./
• &$,"3 2 8
Cats Effect 2
Cats Effect • 7 23Cats8.IO)%$: 1"' *!5/*&*+- • 9ZIOHaskellIOMonix
Task6 • Type Level04(,# 10
! Future- • Future#(Future **) • &$ Futureside-effectful • %()"
! ! ! • + left identity ' , 11
http4s 3
http4s • Fs2IO http (Framework
• Service As KleisliServer As Stream 13
+< • Play! $' !API-)#)%!!! • Finagle – Twitter Future/1
• Finch - ↑ :58Effect23 .*4 9; • AkkaHTTP ← Spray,6. 7 • Colossus ???? &(" < • Chaos ??? 0< 14
Tagless final 4
Tagless Final • $'%End Of The World • "
(Eff, Free • ↑ !&# 16
• Principle of Least Power • •
17
Application 5
-26*7 • % $!& "'#5 345(+ 2 • ),persistence.in
memoryHashMap )0 8DB91/ '# : https://github.com/dysangelist/scala_kansai_demo 19
20 •
Algebra① 21 • %#)! ' • Type
"$&(
Algebra② 22
Algebra③ 23 • *(Algebra'"$ &% #!+ • - .Aggregate-DDD,
) .
Algebra④ 24
Logic① 25 • Logic, Algebra
Logic② 26
27
② 28 • Service/Router Logic
③ 29
④ 30 • !!
31
Representation 32 • Algebra
Representation② 33 • InMemory
Representation③ 34 • InMemory
• HttpService[F]Kleisli[OptionT[F, ?], Request[F], Response[F]] alias • IntelliJcombineK
Service? 35
36
4 37 • FW%#%&(), 1.Separation of Concerns • "!'$
03/ • http4sOpinionated 2* • +-
38 ~fin~ Any questions?