Skip to content

Nexus OrchestratorThe Ultimate Event Bus

AI-Powered • Resilient • Cross-Platform

Nexus Orchestrator

Why Nexus?

Traditional event buses are simple but fragile. They don't handle:

  • Network failures (no retries, no fallbacks)
  • Performance bottlenecks (everything runs at the same priority)
  • User behavior patterns (no learning or optimization)
  • Distributed systems (client/server split is painful)

Nexus Orchestrator solves these problems with a next-generation architecture inspired by production systems at scale.

Quick Example

typescript
import { Nexus } from '@caeligo/nexus-orchestrator';

const bus = new Nexus({
  replayMemory: 50,        // Keep last 50 events
  predictionThreshold: 0.7, // Enable AI predictions
  debug: true              // DevTools integration
});

// Request/Reply Pattern
const user = await bus.request('user:fetch', { id: 123 });
console.log(user.name);

// Priority Lanes
bus.emit('analytics:track', data, { priority: 'background' });
bus.emit('ui:alert', message, { priority: 'critical' });

// State Cursors
const authCursor = bus.cursor('auth:state', { loggedIn: false });
console.log(authCursor.value); // Always sync access

// Resilience
bus.on('api:call', handler, {
  attempts: 3,        // Retry 3 times
  backoff: 1000,      // 1s between retries
  fallback: (err) => showOfflineMode()
});

Installation

bash
npm install @caeligo/nexus-orchestrator

Ready to dive deeper? Get Started →

Released under the MIT License.