~/talk

Migrating a Library from RxJava To Coroutines

Talkat KotlinConf 2019 · 2019-12-04..12-06· [kotlin, react]

A production library called Store with 3500+ stars and 20+ contributors gets rewritten from RxJava to Coroutines and Flow in Kotlin the code drops the Rx dependency and adds observable Room and network sources a source of truth model writes network responses to disk then emits them via flows multicasting and concurrent request deduplication work in practice tests convert to Kotlin run against the old Store3 suite and use TestCoroutineScope to catch race conditions the project ships as Store 4 alpha and moves to a Dropbox repo for active development

AI-written summary · about

  1. 0:00Intro
  2. 1:26HOW DO YOU PUT IT ALL TOGETHER ?
  3. 3:20The Repository Pattern
  4. 3:46What does repository do?
  5. 4:18Few years back...
  6. 5:13Why NY Times released Store
  7. 5:49Build a simple Store
  8. 6:05Fresh request
  9. 6:26Get request
  10. 6:53Building an offline Store
  11. 7:40Fast forward 3 years
  12. 8:10Today We'd like to introduce
  13. 8:50Why Kotlin Coroutines?
  14. 9:19Structured Concurrency
  15. 11:23Building a Store
  16. 12:14Store Stream as First Class Citizen
  17. 12:28Store stream API
  18. 14:07Simple case: I want data & updates
  19. 17:25STREAM SKIP CACHE
  20. 17:58STREAM NOW WITH OBSERVABLE LOCAL DATA
  21. 21:12Should Store be The Source of Truth?
  22. 22:18Reporting Back to Store
  23. 23:35Supporting source of truth
  24. 23:59Source of truth gotchas
  25. 27:17CONCURRENT REQUESTS
  26. 28:55SHARING FLOWS
  27. 29:13Sharing in RxJava
  28. 29:59Context Preservation
  29. 31:08Store Multicast
  30. 36:04Migrating Store tests
  31. 37:56TestCoroutine Scope
  32. 38:32Catching work leaks
  33. 41:00Predictable parallel work
  34. 42:15YES: I JUST RECOMMENDED "DELAY" FOR TESTING :
  35. 42:50WHAT IS NEXT?
~/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.