Storage & Recovery

Combine an in-memory cache with Redis persistence for durable game state.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/kerem-ersoz/gonul --skill storage-recovery
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Storage & Recovery
Source: https://github.com/kerem-ersoz/gonul/tree/main/.github/skills/storage-recovery
Command: npx skills add https://github.com/kerem-ersoz/gonul --skill storage-recovery

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Solve slow access to durable game state by combining an in-memory cache with Redis persistence.

Core Features & Use Cases

  • HybridStorage API with synchronous in-memory operations and asynchronous Redis persistence
  • Boot-time recovery: reconstructs tables and game instances from Redis
  • Background sync: pending ops flush, full sync, reconnection recovery
  • Event log system with Redis Streams for state replay
  • Circuit breaker for Redis outages to prevent cascading failures
  • State serialization and reconstruction support for new game types

Quick Start

Initialize the HybridStorage system at startup to perform boot-time recovery from Redis and load in-memory tables.

Frequently Asked Questions about Storage & Recovery

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I recover game state from Redis after a server restart?

Boot-time recovery reconstructs game state from Redis by replaying event logs stored in Redis Streams and loading persisted tables back into an in-memory cache for synchronous access.

What is the best way to combine in-memory cache with Redis persistence for durable game state?

A hybrid storage approach uses synchronous in-memory operations for fast access while asynchronously syncing state changes to Redis, ensuring durability without sacrificing read and write speed.

How does a circuit breaker prevent cascading failures during a Redis outage?

A circuit breaker monitors Redis connection health and temporarily halts sync operations during outages, preventing cascading failures by allowing the system to rely on in-memory cache until connectivity is restored.

Can I replay game state changes using Redis Streams for fault-tolerant storage?

Redis Streams enables event logging for state replay by sequentially recording game state changes, allowing systems to reconstruct state by replaying events from the log during recovery scenarios.

How do I serialize and reconstruct new game types for hybrid storage recovery?

State serialization formats new game instances into storable representations for Redis persistence, while reconstruction support automatically rebuilds those serialized objects back into in-memory tables during boot-time recovery.

Does background sync handle pending operations and reconnection recovery for Redis?

Background synchronization automatically flushes pending operations to Redis, performs full state syncs, and manages reconnection recovery to ensure in-memory cache and persistent storage remain consistent.