Understand Rage's execution model and design principles
mainRage is built on several core architectural principles that affect how you write and expect your application to behave:
- Single-Threaded Fiber-Based Approach: Every request is processed in its own isolated Fiber. When the code encounters blocking I/O, the Fiber pauses, allowing the single thread to handle other tasks. This eliminates thread synchronization overhead and simplifies concurrency.
- Lean Happy Path: The framework performs as much work as possible during server initialization (boot time) to ensure the request-processing path is as fast as possible.
- Rails Compatibility: The
ControllerandCableAPIs are designed to feel familiar to Rails developers, though they are unique implementations. - Idiomatic Ruby: The framework avoids heavy abstractions in favor of standard Ruby syntax and patterns. You are encouraged to use idiomatic Ruby rather than relying on framework-specific DSLs where standard Ruby suffices.