~/talk

Multiple Backend DBs In A Rails Application

Talkat RubyConf MY 2017 · 2017-10-12..10-13· [ruby-on-rails, databases]
links:none on file
slides:none on file

Rails handles four separate source databases of front-end web events by loading per-database config files at init and picking one default DB for Rails metadata. Each DB gets its own folders (migrations, seeds, structure) and models inherit from a base ActiveRecord class that establishes that DB connection. Team adds rake tasks per DB and custom migration generators, uses PostgreSQL partitioning and a pg_copy wrapper for fast bulk loads, and versions stored-procedure and view code; the setup works in production.

AI-written summary · about

  1. 0:00Start
  2. 1:44The challenge
  3. 2:34Hard decisions
  4. 2:44Let's try rails!
  5. 3:07Let's try rails in Malaysia!
  6. 3:17Rails app with a single DB
  7. 3:43Rails app with multiple DBS
  8. 4:02Hey, Mr. Meeseks!
  9. 4:46Initialize DB configs
  10. 5:15Default rails app DB
  11. 5:39What does it do?
  12. 6:37Create base models
  13. 7:17Create a set of rake tasks...
  14. 10:07Where to find me
~/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.