Use Valkey instead of Redis
Redis 7.4+ is RSALv2/SSPL and 8.0+ adds AGPLv3. None of the three works for a closed-source commercial cloud service, and SSPL section 13 specifically targets offering the software's functionality as a service, which is what a control plane does. Valkey is BSD-3-Clause, under the Linux Foundation, forked from Redis 7.2.4. Deciding this now rather than after step 3 of PLAN.md stands up real infrastructure makes it free: Valkey speaks the same RESP protocol, so `ioredis` is untouched and only names change. `REDIS_URL` becomes `VALKEY_URL`, the exported client becomes `valkey`, and `/health` reports a `valkey` field. Two things deliberately do not change, documented in place so they are not "fixed" later: the `redis://` URL scheme, which names the wire protocol and is what every client actually parses (none understands `valkey://`), and `ioredis` itself, which is a RESP client whose name refers to the protocol's origin and not to the server we run. docker-compose.yml is new, pinning valkey/valkey:8-alpine alongside pgvector/pgvector:pg17 - the plain postgres image lacks the extension `frame_embeddings` needs. It makes the Valkey choice concrete rather than a note someone has to remember.
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
# continuum-backend
|
||||
|
||||
Cloud control plane for Continuum. Bun + ElysiaJS, PostgreSQL (via pgCat/PgBouncer,
|
||||
with pgvector for frame embeddings), Redis Streams, and Cloudflare R2 storage.
|
||||
with pgvector for frame embeddings), Valkey Streams, and Cloudflare R2 storage.
|
||||
|
||||
## Run
|
||||
|
||||
```sh
|
||||
bun install
|
||||
cp .env.example .env # fill in DATABASE_URL, REDIS_URL, R2_*, SUPABASE_JWT_SECRET
|
||||
cp .env.example .env # fill in DATABASE_URL, VALKEY_URL, R2_*, SUPABASE_JWT_SECRET
|
||||
bun run db:generate && bun run db:migrate
|
||||
bun run dev
|
||||
```
|
||||
@@ -21,8 +21,14 @@ bun run dev
|
||||
instead of two hand-synced ones.
|
||||
- `src/s3/` - R2 presigned URL helpers (`PUT` for client uploads, `GET` for the
|
||||
edge proxy).
|
||||
- `src/queue/` - Redis client + `XADD` helper pushing onto `stream:camera_frames`
|
||||
for `continuum-ai-worker`.
|
||||
- `src/queue/` - Valkey client (`ioredis`) + `XADD` helper pushing onto
|
||||
`stream:camera_frames` for `continuum-ai-worker`.
|
||||
|
||||
Valkey, not Redis: Redis 7.4+ is RSALv2/SSPL and 8.0+ adds AGPLv3, none of
|
||||
which a commercial product can ship. Valkey is BSD-3-Clause and speaks the
|
||||
same RESP protocol, so `ioredis` is unchanged - only the server differs. See
|
||||
`continuum-common/docs/LICENSES.md`. `docker-compose.yml` here brings up
|
||||
Valkey and Postgres+pgvector for local development.
|
||||
- `src/routes/` - `/auth`, `/farms`, `/printers`, `/jobs`, and the edge-gateway
|
||||
WebSocket at `/ws/edge/v1`.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user