~/talk

Reordering 59 Million NYT Publishing Assets Using Go and BadgerDB

Talkat GopherCon 2020 · 2020-11-09..11-13· [databases, go]
slides:none on file

Reorders 59 million NYT publishing assets stored on a single Kafka partition into correct chronological and topological order using Go and BadgerDB, shrinking the log to 35 million assets and enabling date-based scanning. Implements reordered 59 million events in-memory, compact encoding (167 bytes vs 777), a string→ID store for 22M URIs, a timestamp uniquing cache for pre‑1970 dates, and BadgerDB write batches for 9x faster writes; runs end-to-end and speeds iterations dramatically.

AI-written summary · about

  1. 0:00Intro
  2. 0:37My Background
  3. 2:45T Publishing Assets
  4. 11:12Encode Assets and Insert Into Database
  5. 11:42Find and Resolve Missing References
  6. 12:54Find and Remove Duplicates
  7. 15:56T Development Philosophy
  8. 17:50Fast Performance (v 1.6.1)
  9. 22:17I'm New to Go
  10. 24:04T Badger Wrapper
  11. 26:04T Batch DB Wrapper
  12. 29:20TEncoding Strings via Enumeration
  13. 32:59T Marshal - Read
  14. 33:51T Timestamps as Keys
  15. 34:43Refresher: Endianness
  16. 35:18Endianness - Sorting
  17. 36:53T Unique Timestamp
  18. 38:27TUnique Timestamp Cache
  19. 39:46T Panic Error Handling - Goroutines
~/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.