SQLite-based write buffer and caching system for Prisma that accelerates data operations by buffering writes and caching reads in local SQLite databases with automatic background sync to the main database via Redis/BullMQ. Current stable version 0.0.50, released weekly. Key differentiators: Prisma-first integration, multi-node master/worker architecture, automatic WAL optimizations, and CLI schema generation. Targets sub-10ms response times for high-frequency operations, but adds complexity and is not suited for low-throughput or simple CRUD apps.
npm install shardedNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Initializes Sharded with Prisma client, starts buffer/cache, performs a write and read, then stops. Demonstrates basic usage with Redis connection.
Update Prisma to >=6.7.0
Mount a persistent volume at /app/prisma/blocks/data in Docker or use an external directory configured via dataDir.
Refer to WAL-OPTIMIZATIONS.md in the repository for handling crash recovery.
Use 'models' instead of 'blocks' when upgrading to v0.1.0+.
Use import { generateSchema } from 'sharded/cli';Ensure the model is included in the 'blocks' array when constructing Sharded.
Start Redis server or set REDIS_URL to a valid Redis connection string.
Use a single worker per block or implement external locking via Redis. Sharded is designed for single-node worker per block.