Replies: 2 comments 7 replies
-
Since your channel's logic (UserPresenceChannel) is implemented within a Rails app, we cannot reach it w/o RPC. There were some ideas on making it possible to implement simple channels right within Another option is to build a custom Go app on top of |
Beta Was this translation helpful? Give feedback.
-
Thank you for the answer. It should be able to run the rpc with the anycable-go server with a single command, at least on development environment. Doing that I ended up with the following error. Not sure what is wrong. The error is only for the second websocket connection.
|
Beta Was this translation helpful? Give feedback.
-
Hi,
First of all thanks for the awesome solutions!
Here's my situation
We configured the app to use anycable-pro (1.2.2-pro-96e71ad) and
@anycable/turbo-stream
on Rails 7.0.4.2 on a RPC-less infra. The app works as expected. This is awesome because we had previous experience with the gRPC server and it's way better to have one less component to manage.Now we have a new demand to create a secondary websocket connection/client that will check user details (to simplify think of it as checking for the user session) on another host.
We have a multi-tenant app with multiple domains/subdomains that will authenticate on a centralized authentication server (OpenID Connect).
The clients on their subdomains (client1.example.com or client2.example.com) will "ping" host "auth.example.com" from time to time. One use case for it is to check if the user has a valid session on the auth server and logout the same user from all subdomains it might be logged.
A very basic implementation would be as follow:
app/channels/user_presence_channel.rb
app/javascript/channels/consumer.js
/app/javascript/channels/user_presence_channel.js
This setup currently doesn't work, and requires the RPC server.
The connection doesn't get established and the following error shows on logs.
Is it possible to still be RPC-less and be able to use custom channels and subscribers?
If so, how can this be implemented? Using JWT?
Can you provide any relevant information, details, ideas to help with this implementation?
Best regards,
Beta Was this translation helpful? Give feedback.
All reactions