add async_redis Action Cable adapter (async-redis), docs, tests, and middleware hardening#2
Open
darkamenosa wants to merge 1 commit into
Conversation
5c35ba0 to
53c5bf9
Compare
A fiber-based Redis pub/sub adapter for Action Cable, built on async-redis. Maintains a single dedicated thread that hosts an Async reactor and owns both Redis clients (publisher + subscriber); all adapter operations are routed onto that reactor via a thread-safe inbox queue. Mirrors Rails' built-in `redis` adapter semantics (dynamic subscribe/unsubscribe, automatic reconnect + resubscribe). Co-authored-by: darkamenosa <hxtxmu@gmail.com> Co-authored-by: Samuel Williams <samuel.williams@oriontransfer.co.nz>
53c5bf9 to
27e5c17
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi Samuel,
As discussed in previous thread, so I prose
async_redisadapter for this. People just need to change 1 line oncable.yml, then done.I tested on a few projects, it worked well. However, I haven't finished the load test. So not so sure, but I stand for correct.
Summary:
Motivation:
Implementation Details:
Configuration (cable.yml)
cable.yml
Compatibility & Behavior Notes
works reliably with async-redis.
Tests
Docs
How To Test Locally
bundle installbundle exec susbundle exec bake decode:index:coverage libbundle exec rubocop -A --fail-level WRisks / Tradeoffs:
interval).
Alternatives Considered:
Future Work
Checklist
Release Notes:
async_redisincable.yml.Thanks for reviewing! Happy to adjust naming, defaults (queue size/behavior), or test coverage based on maintainer feedback.