Adapter@syncframe/redis

@syncframe/redis

Redis-backed SyncStore and SyncTransport for production deployments.

Overview

Pluggable adapters so SyncServer can persist anchors and fan out snapshots across processes and serverless instances. Connection-injected — you supply ioredis clients; auth and pooling stay in your app.

pnpm add @syncframe/redis @syncframe/core ioredis

Wire-up

import Redis from 'ioredis';
import { SyncServer } from '@syncframe/core/server';
import { RedisStore, RedisTransport } from '@syncframe/redis';

const redis = new Redis(process.env.REDIS_URL!);

const server = new SyncServer({
  store: new RedisStore({ redis, prefix: 'syncframe' }),
  transport: new RedisTransport({
    redis,
    createSubscriber: () => new Redis(process.env.REDIS_URL!),
    prefix: 'syncframe',
  }),
  namespace: 'my-app',
});
Subscriber connections cannot issue other commands — create a fresh client per subscription.

Key layout

Keys and pub/sub channels live under {prefix}:{namespace}:…. Use a distinct prefix when sharing Redis with other apps (e.g. wp: for watchparty).

Next steps