~/talk

Registry Design Patterns

Talkat npm camp 2016 · on Saturday, 2016-07-30· [devops-and-delivery, microservices]
slides:none on file

Explains concrete registry wiring: tarball servers hold medium‑sized data on single disks, CouchDB powers a changes feed used as a transaction log consumed by separate registry file followers; after publish tasks include CDN invalidation, Postgres and Elasticsearch updates, security scans, token invalidation and internal mirrors. Notes half the registry is microservices today, causing scattered side effects and hard-to-unwind failures, and describes moving publication orchestration into durable message queues to make retries, rollbacks and ownership explicit.

AI-written summary · about

  1. 0:00Intro
  2. 0:14design patterns & modularity in the npm registry
  3. 1:09human brains are pattern-detection machines
  4. 1:38the process of writing software is abstraction & pattern extraction
  5. 1:56patterns in code patterns in systems
  6. 2:51registry?
  7. 3:01registry, n: the system of services that manage package tar archives + metadata
  8. 3:53npm's largest engineering project & its most obvious scaling challenge
  9. 4:20monoliths microservices transaction logs message queues
  10. 4:37monoliths: everything in one big process
  11. 6:20it's easy to write highly-coupled code inside a non-modular monolith
  12. 7:45information data, its structures, the algorithms
  13. 8:01hide info behind an interface so you can change it
  14. 9:40you're forced to design an API & put implementation inside a service
  15. 10:03microservices can still mess up modularity
  16. 10:44can scatter a task across services making retries & failure hard to cope with
  17. 11:36auth sets up package access on a publish as a side effect
  18. 11:57what happens if a service crashes? or if validation rejects a publish?
  19. 13:24couchdb's super power the changes feed
  20. 13:56registry followers: consumers of couchdb's commit logs
  21. 15:20each log consumer does one thing well
  22. 15:36Estragon: Let's fix publication. Vladimir: Fine. But how?
  23. 16:11message queues inversion of control
  24. 16:44workers consume messages & retry or unwind on failure
  25. 18:51what's the pattern that emerges from this discussion of patterns?
  26. 19:25there is no silver bullet
  27. 19:54what problem are you solving? what tools do you have to hand? what is your team experienced with?
  28. 20:45you'll need to fight for modularity no matter what you pick
  29. 21:14make your users happy first because that's the hard part
  30. 21:39but know that you can change your systems
~/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.