Guidance request: Rails 8 + Falcon + Async Cable/Job, while keeping Solid stack (solid queue, solid cache, solid cable) working #8
Replies: 2 comments 10 replies
-
I just tested to put Async Cable to the site, to use with solid cable. And here is what I got:
So I did a custom implementation of turbo rails, but tailor for my application (inertia rails). When broadcast, I call an async job (with inline adapter) to broadcast. |
Beta Was this translation helpful? Give feedback.
-
Okay, with regards to SolidQueue, I think they basically need to fix their code to be safe when In the mean time, it's probably okay to run without For context, there has been some discussion around SolidQueue supporting Async / Fiber scheduler but it's not something I can say when it will happen (or not). Depending on the performance of the database, this may or may not make sense. Regarding MissionControl, maybe that's something we can try to build for Falcon / Async::Job. That being said, it might just be better to use an APM (or build a very basic one).
In principle if they are following Rails conventions, it should work. That means they should be using
The point of that option is to detect use cases that checkout a database connection permanently. If your own code doesn't have this problem, then the value of this configuration won't change anything. So, in principle, it's safe to ignore this option for now.
A proper APM + https://github.com/socketry/traces + https://github.com/socketry/metrics - we can add more command line tools for job manipulation if that's helpful.
I think you should probably just replace it. Hope this helps, let me know if you have more questions or need more specifics. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi Samuel,
First of all, I want to thank you for Falcon and the async ecosystem.
I've been moving my app in that direction and would love your guidance on a simple, safe path.
Where I am
I switched from Puma to Falcon a while ago. It's been good.
After reading your keynote, I made my my config explicit follow the slide and added:
After I put those in, my jobs process (Solid Queue) started looping with an AR (ActiveRecord) connection error when the scheduler tries to persist recurring tasks. I'm not filing a bug here, just asking for the best way to transition.
Key context lines I see:
My understanding: with
:disallowed
, code should useActiveRecord.with_connection { ... }
orlease_connection
(no permanent checkout). That likely explains the loop.I tried to do monkey patch for this, and new problems happen with Solid cache, just same issue.
And I checked their codebase, it seems only design for thread base isolation now.
My goal
How my jobs are set up (why I mix today)
My app runs
bin/dev
which startsweb
(Falcon),jobs
(Solid Queue supervisor), andvite
.IO‑heavy, short tasks (e.g., AI responses): I use async‑job with an Inline processor on a dedicated queue. It's simple and responsive, no extra moving parts for these quick jobs.
Production‑critical flows that need a UI (e.g., publishing posts to Facebook/TikTok): I keep these on Solid Queue. I tried
bundle exec async-job-adapter-active_job-server
, but without a UI like Solid Queue it was hard to trace failures and see state at a glance, so the UI matters. I also use Solid Queue for jobs which are more CPU‑heavy and operationally sensitive.So I'm in the mix: async‑job Inline for fast IO stuff; Solid Queue for the important, observable workflows.
I'd like to keep this for now, if it plays well with Falcon/fibers. But I'm not sure about this after seeing the error.
Cable plans
What I need guidance on
Rails 8 on Falcon: should I just turned off
permanent_connection_checkout = :disallowed
just to make the solid stack works, will there any problems?If I move more jobs to
async-job-adapter-active_job-server
, what's your recommended path to production observability (logs/metrics/instrumentation) comparable to Solid Queue's UI? I'm thinking building a UI forasync-job-adapter-active_job-server
if no.Cable: best practice for Async Cable with Rails 8 + Falcon. Should it replace Solid Cable, or can they coexist? Any gotchas when migrating from Action Cable to Async Cable in a fiber‑first app?
Sorry about asking these dumb question b/c of lacking experience here.
Environment (for reference)
I'm Hhppy to share a small repro and test whatever you suggest. Thanks again, I'm trying to do this with minimal churn and keep the good parts I have today while moving toward Falcon + Async.
Beta Was this translation helpful? Give feedback.
All reactions