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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@mini256/orbital

v0.1.0

Published

The ultimate distributed task scheduler for Node.js

Readme

🛰️ Orbital

The ultimate distributed task scheduler for Node.js

npm version License TypeScript Node.js


🚀 Quick Start

Installation

# Using pnpm (recommended)
pnpm add @mini256/orbital

# Using npm
npm install @mini256/orbital

# Using yarn
yarn add @mini256/orbital

Basic Usage

import { Orbital } from '@mini256/orbital';

// Initialize the scheduler
const scheduler = new Orbital({
  redis: 'redis://localhost:6379',
  database: 'mysql://localhost/orbital'
});

// Define a task handler
scheduler.define('email.send', async (job) => {
  const { to, subject, body } = job.data;
  await sendEmail(to, subject, body);
  return { sent: true, timestamp: new Date() };
});

// Enqueue a task
const jobId = await scheduler.enqueue('email.send', {
  to: '[email protected]',
  subject: 'Hello from Orbital',
  body: 'This is a distributed task!'
});

// Schedule a recurring job
scheduler.schedule('daily.report', '0 0 * * *', async () => {
  await generateDailyReport();
});

// Start workers
await scheduler.start();

✨ Features

| Feature | Description | |---------|-------------| | 🚀 High Performance | 50k+ TPS, Redis-powered queue | | 🔒 Distributed | Multi-worker cluster, no single point of failure | | 💾 Persistent | Redis + TiDB dual-write architecture | | ⏰ Scheduling | Cron, delayed, priority queues | | 🔍 Observable | Prometheus metrics, Grafana dashboards | | 📘 TypeScript | Full type definitions, strict mode | | 🔌 Plugin System | Custom workers and backends | | 📊 Metrics | Built-in Prometheus exporters |


📚 Documentation


🎯 Use Cases

  • Data Pipelines - ETL workflows, data synchronization (like OSS Insight)
  • Background Jobs - Email sending, image processing, notifications
  • Cron Scheduling - Periodic tasks, reports, cleanup jobs
  • Workflow Orchestration - Multi-step business processes
  • Distributed Processing - Parallel task execution across workers

🏗️ Architecture

┌─────────────┐     ┌─────────────┐
│   Client    │────▶│   Redis     │
│             │     │  (Queue)    │
└─────────────┘     └──────┬──────┘
                           │
                    ┌──────▼──────┐
                    │   Worker    │
                    │   Cluster   │
                    └──────┬──────┘
                           │
                     ┌─────▼──────┐
                     │    TiDB    │
                     │ (Persistent)│
                     └────────────┘

Components

  • Client - Enqueues tasks and schedules jobs
  • Redis - High-speed task queue and distributed locking
  • Workers - Process tasks from the queue
  • TiDB - Persistent storage for task history and state

🛠️ Development

Prerequisites

  • Node.js >= 18.0.0
  • pnpm >= 9.0.0
  • Redis >= 6.0
  • MySQL/TiDB >= 8.0

Setup

# Clone the repository
git clone https://github.com/pingcap/ossinsight.git
cd orbital

# Install dependencies
pnpm install

# Copy environment configuration
cp .env.example .env

# Set up the database
pnpm prisma migrate dev

# Run development server
pnpm dev

# Run tests
pnpm test

# Build for production
pnpm build

Commands

| Command | Description | |---------|-------------| | pnpm dev | Start development server with hot reload | | pnpm build | Compile TypeScript to JavaScript | | pnpm test | Run test suite | | pnpm test:watch | Run tests in watch mode | | pnpm test:coverage | Run tests with coverage report | | pnpm lint | Run oxlint | | pnpm fmt | Format code with oxfmt | | pnpm check | Run all checks (format, lint, type) | | pnpm worker | Start a worker process |


📦 Package Exports

// Main entry point
import { Orbital } from '@mini256/orbital';

// Core modules
import { Queue, Worker, Scheduler, Task } from '@mini256/orbital/core';

// Adapters
import { RedisAdapter, TiDBAdapter } from '@mini256/orbital/adapters';

// Workers
import { DataImportWorker } from '@mini256/orbital/workers';

🔧 Configuration

Environment Variables

| Variable | Description | Default | |----------|-------------|---------| | REDIS_URL | Redis connection string | redis://localhost:6379 | | DATABASE_URL | MySQL/TiDB connection string | mysql://localhost/orbital | | WORKER_CONCURRENCY | Number of concurrent jobs | 10 | | LOG_LEVEL | Logging level | info | | METRICS_PORT | Prometheus metrics port | 9090 |

See .env.example for full configuration options.


📊 Performance

Benchmarks (Redis 7.0, Node.js 20, M1 Mac):

| Operation | Throughput | Latency (p99) | |-----------|------------|---------------| | Enqueue | 55,000 ops/s | 2ms | | Dequeue | 52,000 ops/s | 3ms | | Complete | 48,000 ops/s | 4ms | | Schedule | 10,000 ops/s | 5ms |


🤝 Contributing

Contributions are welcome! Please follow these steps:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Please read our Contributing Guide for details.


📄 License

Apache-2.0 © OSS Insight Team


🙏 Acknowledgments

  • Built with Vite+ - The unified toolchain
  • Powered by Redis - In-memory data structure store
  • Uses Prisma - Next-generation ORM
  • Metrics by Prometheus - Monitoring system

Made with ❤️ by the OSS Insight Team

Report Issue · Request Feature