~/talk

Writing backend APIs in a functional programming style

links:none on file
slides:none on file

Pattern claims: separate business logic from I/O using a functional-core, imperative-shell and keep each RPC result as a Result so error handling changes only touch business code. Implementation shows a gRPC endpoint that calls three services (Dasher, customer, delivery), uses Kotlin coroutines with structured concurrency and Deferred fields to run calls concurrently, and converts to lazy async (start=lazy) to conditionally skip calls. Uses supervisor scope, per-RPC Result wrapping, and a working example that lets errors be mapped without refactoring.

AI-written summary · about

  1. 0:00Introduction
  2. 0:23The problem
  3. 2:56The key idea
  4. 3:39Functional shell pattern
  5. 10:13New product requirements
  6. 12:22Product requirements
  7. 12:46Structured concurrency
  8. 15:54Lazy loading
  9. 21:35Supervisor and Coroutine scope
  10. 23:01Summary
  11. 24:03Questions
~/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.