-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feature: multiple websocket connection #63
Comments
I think if you want to use more than one actioncable server simultaneously, then probably a library with less abstraction would be a better fit. I don't really see a clear way to implement that cleanly. You could use the https://github.com/AngularClass/angular-websocket library and manage your own low-level ws connections or start with the Rails coffeescripts https://github.com/rails/rails/tree/d89238d767ddfbd3b32f6d5ec7fe5583e409973f/actioncable/app/assets/javascripts |
I understand that there is no clear way to implement it, thanks for providing other possible solutions |
It could be implemented with a complete refactor in a 2.0 |
The purpose of this library when created was to get the actioncable and angular working together seamlessy with a high state of abstraction and ease of use-- there are lots of other options if you want to do more than that, but they involve more troubleshooting and edge-cases that this library hides away and handles automatically. I'm wondering, do you have an example of "some code you wish worked"? Like, what specifically do you want to do? I'm guessing make the config a class instead of a singleton?
The goal of handling reconnections and resubscriptions automatically after connection problems precludes doing it a lot of ways that would otherwise work. |
You could also fork this repo and just make 2 different ActionCableChannel classes that use 2 different URLs... though I'm not sure that is the best strategy |
You put my thoughts beautifully, i was thinking of |
Let me think about how that could work. The problem I am thinking about is the Rails meta tag and how to handle that, the |
Actioncable connects to only one websocket connection defined by
ActionCableConfig.wsUri
Multiple websocket connection and their channel management could be a feature
The text was updated successfully, but these errors were encountered: