npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@fantasticfour/world-redis

v1.0.3

Published

Pure Redis-based World implementation using Redis Lists for lightweight and simple workflow execution

Readme

@fantasticfour/world-redis

Pure Redis-based workflow backend using Redis Lists for lightweight queue management. Ideal for simple deployments, development environments, and small to medium-scale production workloads.

Why Use This Package

  • Minimal Dependencies: Single Redis instance for both storage and queuing
  • Simple Setup: No additional queue infrastructure required
  • Cost-Effective: Pure Redis solution without external services
  • Fast Development: Quick local setup with Docker
  • Proven Patterns: Based on @workflow/world-local architecture

Best for applications that need reliable workflow execution without the complexity of advanced queue systems.

Installation

pnpm add @fantasticfour/world-redis

Usage

Environment Variables

# Required
export WORKFLOW_REDIS_URL="redis://localhost:6379"
export PORT="3000"                               # Port for embedded world HTTP server

# Optional
export WORKFLOW_REDIS_KEY_PREFIX="workflow:"     # Default: 'workflow:'
export WORKFLOW_REDIS_WORKER_CONCURRENCY="10"   # Default: 10

Programmatic Usage

import { createWorld } from '@fantasticfour/world-redis';

const world = createWorld({
  redis: 'redis://localhost:6379',
  // or use RedisOptions object:
  // redis: { host: 'localhost', port: 6379, password: 'secret' },

  keyPrefix: 'workflow:',       // optional
  queueConcurrency: 10,          // optional
});

await world.start();

Architecture

  • Storage: Redis Hashes and Sorted Sets
  • Queue: Redis Lists (LPUSH/BRPOP pattern)
  • Streaming: Redis Pub/Sub
  • IDs: ULID-based for monotonic ordering

Configuration Options

| Option | Type | Default | Description | |--------|------|---------|-------------| | redis | string \| RedisOptions | redis://localhost:6379 | Redis connection URL or ioredis options | | keyPrefix | string | workflow: | Prefix for all Redis keys | | queueConcurrency | number | 10 | Number of concurrent queue workers |

Redis Data Structures

Hashes - Individual records:

  • workflow:run:{runId}
  • workflow:step:{runId}:{stepId}
  • workflow:event:{eventId}
  • workflow:hook:{hookId}

Sorted Sets - Indexes for queries:

  • workflow:runs:index
  • workflow:runs:by_name:{workflowName}
  • workflow:runs:by_status:{status}
  • workflow:steps:by_run:{runId}
  • workflow:events:by_run:{runId}

Lists - Job queues:

  • workflow:queue:flows
  • workflow:queue:steps

Local Development

# Start Redis with Docker
docker run -d -p 6379:6379 redis:7-alpine

# Set environment
export WORKFLOW_REDIS_URL="redis://localhost:6379"
export PORT="3000"

# Run your workflows

When to Choose This Package

Use world-redis when:

  • You need a simple, single-dependency solution
  • Development or small-scale production
  • Redis persistence (AOF/RDB) meets your durability needs
  • Basic queue functionality is sufficient

Consider alternatives when:

  • You need advanced queue features (priorities, delays, retries) → use @fantasticfour/world-redis-bullmq
  • You need SQL queryability → use @fantasticfour/world-postgres-redis
  • You're on serverless platforms → use @fantasticfour/world-postgres-upstash

License

Apache License