~/talk

Struct Embedding, Instrumentation and Code Generation

Talkat Conf42 Golang 2021 · on Thursday, 2021-06-24· [go]
slides:none on file

Codebase replaces a brittle middleware chain with struct embedding layers that wrap a concrete SQL store to provide caching, timing, tracing, retries and search delegation to Elasticsearch/Blee. Generators use go/ast plus templates and gofmt to emit timer, OpenTracing and retry wrappers automatically; timer metrics feed Prometheus histograms. Retry layer loops on serializable repeatable errors and gives up after three attempts. Solution reduces scattered code and works well in production but requires a homogeneous interface and careful handling because embedding is not inheritance.

AI-written summary · about

  1. 0:00Marmos architecture intro
  2. 3:24Middleware pattern for caching
  3. 8:19Struct embedding for stores
  4. 12:46Struct embedding challenges
  5. 15:14Instrumenting layers
  6. 18:46Timer layer generation
  7. 21:37Open tracing layer
  8. 23:45Retry layer for DB errors
  9. 27:19Code generation in Marmos
  10. 29:24Storage query delegation
  11. 32:49Final architecture wrap
  12. 36:01Drawbacks and homogeneity
  13. 37:24Key takeaways
~/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.