Namespace, What and Why
summary
Proposal implements Namespace on Read for Ruby so you can load gems into isolated module-based spaces and run conflicting versions side-by-side. It modifies C internals (class_alloc) and uses a copy-on-write classext_t to give builtins per-namespace method tables, constants, and supers. Native extensions are loaded by copying files to bypass dlopen and use RTLD_LOCAL. Live demo loads App A with oj 3.15/msgpack 1.6/activesupport 6.1 while root app uses newer gems; intermittent SEGV appears about one run in ten.
AI-written summary · about
chapters (9)
- 0:00Introduction and motivation
- 3:37What is namespace on read
- 7:41Demo of namespace isolation
- 10:27Why namespaces solve conflicts
- 14:03Namespace on read vs on write
- 16:04Implementation overview
- 25:24How namespaces work technically
- 25:47Future use cases and ideas
- 30:14Current status and next steps








