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.8k
【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
880
Featured
See All Featured
Understanding Cognitive Biases in Performance Measurement
bluesmoon
27
1.6k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
30
4.6k
Building a Scalable Design System with Sketch
lauravandoore
461
33k
A better future with KSS
kneath
238
17k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
175
51k
Mobile First: as difficult as doing things right
swwweet
223
9.3k
BBQ
matthewcrist
87
9.5k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
3.7k
Product Roadmaps are Hard
iamctodd
PRO
50
11k
Into the Great Unknown - MozCon
thekraken
35
1.6k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
233
17k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
330
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?