A year with Hanami in production: the Good, the Bad and some Recipes
summary
A year-long Hanami production run builds a JSON SPA with 140 API actions and ~350 operations across ~50 entities, using Trailblazer operations for business logic, GJWT then JWT sessions gem for auth, and a multi-database setup spanning Postgres, Redis, Cassandra, Influx and more — six databases in practice — which proves powerful but costly. Rom-rb causes six months of friction (poor docs, single-connection limits) so ActiveRecord plus custom repositories replaces it. Background work uses Sidekiq and AnyCable (Ruby+Go) successfully; JRuby plus Celluloid handles many threads. Tests use Minitest/fabricators; production runs on Puma with manual DB connection handling.
AI-written summary · about
chapters (25)
- 0:00Introduction and background
- 2:15What is Hanami and why consider it
- 5:50Hanami architecture and differences from Rails
- 10:56One year with Hanami in production
- 12:22Integrating Trailblazer with Hanami
- 15:59Building REST API with Hanami
- 18:51Authentication and JWT in Hanami
- 20:56Frontend integration and Webpack
- 21:18Background jobs with Sidekiq
- 22:00Hanami repositories and database handling
- 25:34Switching from ROM to ActiveRecord
- 28:23Multi-database setup in Hanami
- 31:41Dependency injection with dry-container
- 33:27Caching strategies in Hanami
- 35:41Running Hanami in production
- 37:10Custom CLI tools in Hanami
- 38:55Testing in Hanami
- 41:02Authorization with Pundit-like gems
- 42:48WebSockets with AnyCable
- 45:47Microservices and RabbitMQ
- 47:39Hanami container applications
- 49:28Exotic Hanami usage with JRuby
- 54:30Future of Hanami and framework ideals
- 59:27Framework structure and DDD principles
- 1:03:48Summary and final thoughts
related talks
51m"A year with Hanami in production: the Good, the Bad and some Recipes"
42mLessons Learned While Building Hanami
25mHanami - New Ruby Web Framework
42mHanami - New Ruby Web Framework
38mTaking Refinery off the Rails
36mReturn To Simplicity: Architect Hypermedia REST applications using Hanami + HTMX
46m365 Days Later: Moving from Java to RoR and how it changed everything
27mHanami::API
