~/talk

Cultivating Developer-Centric DSLs

Talkat RubyConf 2021 · 2021-11-08..11-10· [ruby]
slides:none on file

Weedmaps ships a production Redis-backed limiter and a small DSL that exposes a memoized rate limiter and a clear class-level config (bucket, global and local rates). Code uses a blocking within_limit wrapper and an optional method_missing trick to support a rate_limited_ prefix, plus an “unlimited if no bucket or zero rate” fast path. Monitoring shows 429s drive design choices, global/local ordering gets flipped during rollout, and a gist with the implementation and knobs for retries and delays exists.

AI-written summary · about

  1. 0:00Introduction
  2. 2:27What is a DSL
  3. 4:33Rate limiters with demo
  4. 7:23Building DSL on rate limiter
  5. 9:50Local versus global rate limits
  6. 11:36Developer-centric DSL design
  7. 14:44Class-level rate limiter config
  8. 16:53Abstracting with within_rate_limit
  9. 17:15Metaprogramming rate-limited prefix
  10. 20:45Handling unlimited limits
  11. 22:53Lessons learned
  12. 27:06User-friendly error tracking
  13. 27:47Extending rate limiter DSL
  14. 30:37Q&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.