~/talk

Refactor a Play application using cats and cats‑effect (cats IO)

TalkinFrenchat ScalaIO 2018 · 2018-10-29..10-31· [web-performance]
links:none on file
slides:none on file

Refactors a Play Framework API by replacing Scala Future with a generic effect type F[_] using the tagless-final pattern so business logic remains pure and testable. Uses Cats EitherT to validate JSON into case classes and return domain errors as Left or successes as Right (avoiding nested flatMaps), implements concrete effects by bridging Cats Effect IO to Play’s Future to run in Play, publishes events to an event store, and demonstrates the minimal Cats typeclass constraints (Functor/Applicative/MonadError) required for each component.

AI-written summary · about

  1. 0:00Introduction
  2. 1:45Example app overview
  3. 3:32Readability issues
  4. 5:46Cats and Cats-effect intro
  5. 7:33Replacing Futures with IO
  6. 9:18Error monad simplification
  7. 11:07Typeclassing F
  8. 12:34Choosing IO for prod
  9. 14:17Play controllers integration
  10. 16:04Demo and resources
  11. 17:49Q&A
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.