Skip to content
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

Subscription state seems... messy. #3

Open
ioquatix opened this issue Nov 16, 2024 · 1 comment
Open

Subscription state seems... messy. #3

ioquatix opened this issue Nov 16, 2024 · 1 comment

Comments

@ioquatix
Copy link

An incoming web request may subscribe and unsubscribe to a message bus.

Conceptually, that subscription is bound to the scope of the web request.

One of the reasons why I think the current implementation is a bit buggy is because of the shared internal state, especially stuff like the redis backend which has a single thread for subscribing.

It's extremely tricky to redirect those events back to the correct event loop unless the callback itself stores that information, in other words, multiplexing multiple clients into a single pubsub_adapter is extremely tricky.

I think a single global server doesn't really make sense for Falcon.

We can certainly wrap an internal per-thread instance in the existing interface. The reality is though, when a request comes in, we are basically resolving ActionCable.server per process and it currently feels like an extremely unnatural choke point (global state).

@ioquatix
Copy link
Author

I think what would be a good action item here is to clearly describe WHAT methods are invoked on what threads/event loops/etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant