NEGABARO Rails

An encyclopedia of essential concepts for Rails development.

๐Ÿš€ Advanced

โณ

Background Jobs

Active Job + Sidekiq โ€” process heavy tasks asynchronously

Process time-consuming tasks like email delivery, file processing, and external API calls asynchronously in background queues. Users get immediate responses.

๐Ÿ’€

Sidekiq: Deploys and the Async Job Pitfall

SIGTERM/SIGKILL โ€” why long Sidekiq jobs die on every deploy

Async jobs can vanish entirely or get stuck forever in \"running\" state depending on deploy timing. Understanding the difference between SIGTERM (graceful) and SIGKILL (forced), how Sidekiq handles graceful shutdown, and the limits of OSS reveals why these incidents happen.

๐Ÿ“ก

Action Cable

Rails built-in WebSocket โ€” real-time features

WebSocket framework built into Rails that pushes real-time data from server to client. Used for chat, notifications, and live updates.

๐Ÿ’จ

Caching

Dramatically improve response speed by reducing repeated computations

Cache DB queries and view rendering results with Fragment Caching, Russian Doll Caching, Low-Level Caching for 10x+ response speed improvement.

๐Ÿ“ฆ

Asset Pipeline & Vite

Frontend asset management for JavaScript, CSS, images

Bundle JavaScript/CSS/images with Sprockets (legacy), Webpacker (deprecated), Vite (modern) and optimize cache with fingerprinting.

๐Ÿšข

Kamal Deployment

Rails official deployment tool โ€” Docker-based zero-downtime deploys

Rails official deployment tool by DHH. Deploy to any VPS with Docker containers. For small servers like DigitalOcean, local build + push to registry is recommended.

๐Ÿ–ผ๏ธ

background-removal-js โ€” How AI Background Removal Works in the Browser

IS-Net model + ONNX Runtime Web + WebGPU โ€” client-side segmentation without a server

imgly/background-removal-js removes image backgrounds with AI in the browser, no server needed. Runs IS-Net (U-Net family) via ONNX Runtime Web with WebGPU acceleration. Resizes to 1024ร—1024 โ†’ model outputs alpha mask โ†’ applied to original.