Skip to content

Add Redis Package Challenge Series #472

@RezaSi

Description

@RezaSi

Add Redis Package Challenge Series

Issue Description

Create a comprehensive Redis package challenge series to teach developers how to use Redis with Go for caching, session management, and real-time applications.

What needs to be implemented

Package Structure

Create packages/redis/ with the following challenges:

  1. Challenge 1: Basic Operations & Caching (Beginner)

    • Redis connection and basic commands (GET, SET, DEL)
    • String operations and expiration
    • Build a simple cache layer for a web application
  2. Challenge 2: Data Structures & Sessions (Intermediate)

    • Lists, Sets, Hashes, and Sorted Sets
    • Session management implementation
    • Shopping cart functionality using Redis data structures
  3. Challenge 3: Pub/Sub & Real-time Features (Intermediate)

    • Redis Pub/Sub messaging
    • Real-time chat application
    • Event-driven architecture patterns
  4. Challenge 4: Advanced Features & Performance (Advanced)

    • Redis Streams for event sourcing
    • Lua scripting for atomic operations
    • Connection pooling and performance optimization

Required Files for Each Challenge

  • README.md - Challenge description and requirements
  • solution-template.go - Starting code template with TODOs
  • solution-template_test.go - Comprehensive test suite
  • learning.md - Educational content (400+ lines)
  • hints.md - Step-by-step guidance
  • metadata.json - Challenge metadata
  • go.mod and go.sum - Dependencies
  • run_tests.sh - Testing script

Package Metadata (package.json)

{
  "name": "redis",
  "display_name": "Redis Go Client",
  "description": "In-memory data structure store for caching and real-time applications",
  "version": "v9.3.0",
  "github_url": "https://github.com/redis/go-redis",
  "documentation_url": "https://redis.uptrace.dev/",
  "stars": 19000,
  "category": "database",
  "difficulty": "beginner_to_advanced",
  "prerequisites": ["basic_go", "database_concepts", "networking"],
  "learning_path": [
    "challenge-1-basic-operations-caching",
    "challenge-2-data-structures-sessions",
    "challenge-3-pubsub-realtime",
    "challenge-4-advanced-performance"
  ],
  "tags": ["redis", "caching", "session", "pubsub", "realtime", "performance"],
  "estimated_time": "6-8 hours",
  "real_world_usage": [
    "Web application caching",
    "Session management",
    "Real-time messaging",
    "Rate limiting",
    "Leaderboards and counters",
    "Job queues"
  ]
}

Learning Objectives

  • Master Redis fundamentals and Go client usage
  • Implement caching strategies for web applications
  • Build real-time features with Pub/Sub
  • Understand Redis data structures and their use cases
  • Learn performance optimization techniques
  • Practice with production-ready patterns

Resources

Acceptance Criteria

  • All 4 challenges implemented with complete file structure
  • Each challenge has comprehensive tests (90%+ coverage)
  • Learning materials are detailed and educational
  • Code follows existing repository patterns and style
  • All tests pass and scripts work correctly
  • Documentation is clear and beginner-friendly

Getting Started

  1. Study existing package challenges in packages/gin/ or packages/mongodb/
  2. Set up Redis locally or use Redis Cloud
  3. Follow the package challenge structure from CONTRIBUTING.md
  4. Start with Challenge 1 and build progressively

Need Help?

  • Check out our Contributing Guidelines
  • Look at existing package implementations for patterns
  • Ask questions in the comments below

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions