Replies: 5 comments 1 reply
-
@olimart Render has a free Redis option, right? I believe the But regardless of that, it would be really nice to eliminate that dependency. When I first created this project the piece I was least familiar with was ActionCable. I followed a tutorial that used Redis for ActionCable but I've not investigated if postgres can maintain socket connections. Have you ever tried using postgres for actioncable? Actually, one other notable thing is that the PR I just merged in last night used Redis. I was conscious that attempting to do a SQL read every 100 ms could be material on the DB so I thought I was being a little clever by writing this to the redis key-value store: Basically, while the AI is replying and it's streaming to the browser, while it's in that streaming loop within the GetAIResponseJob it monitors for some redis value to change to know that it should abort early. This could easily be a configurable thing. So the core question is really: configuring actionable to maintain socket connections with postgres and whether that's doable. |
Beta Was this translation helpful? Give feedback.
-
There is some limits with web sockets & pg at the moment for large payloads (I think). |
Beta Was this translation helpful? Give feedback.
-
I'm updating the repo right now with the free plan. |
Beta Was this translation helpful? Give feedback.
-
@olimart I just finished eliminating Redis as a dependency! I love Rails' continuous focus on simplicity. You might find this interesting: the queue was already using Postgres (SolidQueue FTW) and ActionCable had pre-existing support for Postgres as a backend, however it has an 8K limit. Based on discussions it looks like Rails 8 is going to solve this limitation but while the team debates what the right solution is, one of the proposed solutions has been spun out into a gem: https://github.com/reclaim-the-stack/actioncable-enhanced-postgresql-adapter I just finished updating the two supported hosting options (Render and Fly) so they auto-deploy without Redis. |
Beta Was this translation helpful? Give feedback.
-
Fantastic @krschacht Thanks a lot |
Beta Was this translation helpful? Give feedback.
-
Asking because SolidQueue is already installed and Render setup targets a paying plan ("starter").
So, maybe we can specifically target the free plan or just do it all with Postgres.
Also, Render does not allow to downgrade Redis plan at the moment.
Beta Was this translation helpful? Give feedback.
All reactions