vercel / vercel/resumable-stream
Feature Request: Support for custom Redis clients (Upstash, Valkey, etc.)
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 574
- Forks
- 44
- Avg merge
- 3m
- Merged PRs (30d)
- 1
Description
Problem
Currently, the library only supports two specific Redis client libraries:
redis(viaresumable-stream)ioredis(viaresumable-stream/ioredis)
Users who want to use other Redis-compatible clients like Upstash Redis, Valkey, can do so but they are still required to install one of the above libraries, even though they are unused
Use Cases
- Upstash Redis: Users deploying to edge environments (Cloudflare Workers, Vercel Edge Functions) often use Upstash Redis REST API
- Valkey: Users migrating from Redis to Valkey (Redis fork) need compatibility
- Custom implementations: Teams with custom Redis wrappers or proxies can't integrate easily
- Future-proofing: New Redis-compatible clients emerge regularly
Proposed Solution
Add a generic entry point that accepts custom Publisher/Subscriber implementations conforming to the existing interfaces:
import { createResumableStreamContext } from "resumable-stream/generic";
import type { Publisher, Subscriber } from "resumable-stream/generic";
// Users provide their own implementations
const streamContext = createResumableStreamContext({
waitUntil: null,
publisher: myCustomPublisher,
subscriber: myCustomSubscriber,
});
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Compare the existing resumable-stream and resumable-stream/ioredis entry points and the Publisher and Subscriber interfaces described in the issue. Trace how the current Redis clients are wired, then define the generic entry point so callers can provide custom implementations; done means the shown import and configuration work without requiring either existing client library.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- redis, typescript
- Domain
- backend, databases
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100