A comprehensive guide to building modular monoliths in Rails 8, covering the three main approaches: Rails Engines, Packwerk, and plain namespaced modules. Explains how each mechanism enforces boundaries differently — structural vs. CI-enforced vs. convention-based — with a side-by-side comparison table. Covers Zeitwerk autoloading behavior in modular layouts, inter-module communication patterns (method calls, ActiveSupport::Notifications, async jobs), data ownership rules (one database with logical table ownership), and testing strategies per module. Includes an incremental migration path for existing messy apps and honest guidance on when NOT to modularize. Also notes that Rails 8's Solid Queue/Cache/Cable reduces the operational pressure to extract microservices.
Nguồn: https://davidslv.uk/modular-monolith-rails. 8sync News chỉ tóm tắt và dẫn link; bản quyền nội dung thuộc tác giả và nguồn gốc.

Thay vì tạo lớp ActiveJob mỏng để gọi phương thức đơn lẻ trong file recurring.yml, lập trình viên Ruby on Rails có thể sử dụng khóa command: để gọi trực tiếp phương thức lớp Ruby thuần. Cách này giảm boilerplate, giữ logic trong đối tượng Ruby thuần, và chỉ cần worker cấu hình cho queue solid_queue_recurring. Có thể ghi đè queue cho mỗi tác vụ.
Lập trình viên Ruby on Rails nên đọc bài này để tiết kiệm thời gian và tránh việc tạo lớp ActiveJob thừa khi chỉ cần xử lý nhiệm vụ định kỳ đơn giản, đồng thời tối ưu hóa cấu trúc mã bằng cách sử dụng Solid Queue một cách hiệu quả.
Bảng tham chiếu tương thích này liệt kê phiên bản JRuby từ 9.2 đến 10.1, bao gồm mức ngôn ngữ Ruby, phiên bản Java tối thiểu và phiên bản Rails hỗ trợ. JRuby 10 cải thiện thời gian khởi động nhờ AppCDS và Project CRaC, trong khi lợi thế của JRuby so với CRuby MRI bao gồm đa luồng thực sự (không có GVL), truy cập hệ sinh thái JVM và triển khai dưới dạng một artifact duy nhất.
Lập trình viên phát triển ứng dụng Rails cần tham khảo bảng so sánh này để chọn phiên bản JRuby phù hợp với yêu cầu Ruby version, Java cốt lõi và Rails version, giúp tối ưu hiệu năng, tương thích và triển khai nhanh chóng.
Khi một ứng dụng Rails được mua lại, giai đoạn chuyển giao kỹ thuật thường khó khăn hơn bản thân thương vụ. Ba tháng đầu tiên quan trọng để xây dựng niềm tin với chủ sở hữu mới, bao gồm kiểm kê toàn bộ dịch vụ bên ngoài, chi phí, tiến hành kiểm toán bảo mật chủ động (cập nhật gem lỗi thời, xem xét quyền truy cập sản xuất, kiểm tra thông tin đăng nhập trong kho lưu trữ), và ghi chép kiến thức nội bộ trước khi thành viên rời đi. Nên ưu tiên ổn định hệ thống thay vì vội vàng phát triển tính năng mới, đồng thời minh bạch về lỗ hổng, chi phí và lộ trình khắc phục để tăng uy tín.
Một lập trình viên Rails nên đọc bài này để hiểu cách bảo vệ và chuyển giao dự án hiệu quả trong giai đoạn quan trọng sau khi được mua lại, từ việc kiểm tra an toàn, quản lý chi phí đến xây dựng sự tin tưởng với đội ngũ mới.

Ruby Weekly issue #806 covers a range of Ruby ecosystem news. The headline story is an experiment compiling a Rails blog app to a ~500KB binary using Spinel (Matz's AOT Ruby compiler) and the Roundhouse compiler, serving the app in just 12MB of RAM. Other highlights include a proposal to add parallel sweeping to Ruby's GC (showing ~3.64% runtime improvement), the json gem 2.20 release with non-recursive parsers and a new ResumableParser, a pure Ruby X11 terminal emulator, and several library releases including RubyGems/Bundler 4.0.15, mruby/c 4.0, Rails Event Store 3.0, and Grape 3.3.
AlchemyCMS 8.3 has been released with a completely redesigned admin dashboard featuring configurable, lazy-loaded widgets. New wildcard URL support allows dynamic content routing via URL pattern matching. The release also replaces the custom select web component with Tom Select (removing a jQuery dependency), updates TinyMCE to 8.6.0, adds automatic element cache invalidation on related object changes, and includes several developer ergonomics improvements. Breaking changes include removal of the AlchemyHTMLElement base class and soft-removal of Ruby 3.2 from the test matrix. Upgrading requires bumping the gem version and running the built-in upgrader.
Russian doll caching — the Rails pattern of nesting cache fragments so inner unchanged pieces are reused — can be extended beyond templates to span the full request stack: browser cache, CloudFront edge, HTTP validators, a hot store, and the database. The post walks through classifying routes into public shell, tenant shell, and user leaf shapes, each with its own cache policy. It covers using HTTP ETags and conditional GET (304 Not Modified) before reaching for Redis, correctly applying Cache-Control directives (no-cache vs no-store vs public/s-maxage), structuring CloudFront cache keys to avoid variant explosion, and using stale-while-revalidate and stale-if-error as resilience tools. The principle applies across Rails, Laravel, Django, and Phoenix. The goal is to push the largest safe cache shell as far outward as possible, so expensive rendering and database queries are only triggered when truly necessary.
Common test case mistakes in Rails applications and how to fix them. Covers four key issues: insufficient assertions (only checking response status instead of side effects like emails and DB records), testing only happy paths while ignoring failure scenarios, cramming multiple scenarios into a single test case causing state dependencies and unclear failures, and writing vague test descriptions. Also introduces mutation testing as a technique to verify test strength, mentioning the Mutant gem for Ruby.