Skip to content

winkjs/composer

wink-composer

Stability License: MIT

✨ Streaming intelligence, playfully simple.

A sensor spikes. An engine runs hot. A building's energy use surges. A customer clicks away. A shipment stalls. A forecast shifts. Your streaming data has a story to tell—uncovering it has always been the hard part.

WinkComposer reveals it—effortlessly. Small, focused nodes chain into powerful pipelines. An expressive flow API that mirrors your intent. Monitor 200K sensors on a single CPU core. Same code from edge to cloud.

Hello, Flow

Smooth noisy data. Detect threshold breaches. Confirm they persist. Broadcast alerts:

await flow( 'temperature-monitor' )                               // Name the flow
    .partition( 'sensorId' )                                      // Isolate per sensor
    .source( csv, { path: './sensor-data.csv' } )                 // Dev/debug data source
    .emitter( mqtt, { brokerUrl: 'mqtt://localhost:1883' } )      // Define alert channel
    .esMean( 'smooth', 'temperature',
        { mean: 'smoothTemp' }, { halfLife: 5 } )                 // Smoothen data
    .threshold( 'alert', 'smoothTemp', { active: 'overheating' }, // Detect overheating
        { mode: 'above', threshold: 80, hysteresis: 2 } )         // Avoid flapping
    .persistenceCheck( 'confirm', ( msg ) => msg.overheating,     // Avoid false alarms
        { persistenceConfirmed: 'alertConfirmed' }, { minVotes: 2, outOfTotal: 3 } ) 
    .emitIf( 'broadcast', ( msg ) => msg.alertConfirmed,          // Send alert
        { target: 'mqtt', signalType: 'temperatureAlert' } ) 
    .run();                                                       // Start the flow

Why Composability

Build exactly what you need.
Most platforms give you fixed features—often as black boxes. WinkComposer gives you building blocks. You compose only what your use case demands.

Evolve as you go.
Start simple: sensor → threshold → alert. Add smoothing when there’s noise. Add persistence to cut false positives. Pipelines grow with your understanding.

Know what’s happening.
Each node does one job. Every decision is visible. When an alert fires, you know exactly where—and why—it happened.

Unlock possibilities.
Focused nodes combine like musical notes. Simple patterns build into powerful, custom intelligence.

Built to Stay Clear

No drag-and-drop spaghetti. WinkComposer uses clean, linear flows with control signals for orchestration. This keeps pipelines understandable, maintainable, and production-safe—even as they grow.

Works Everywhere

Process any streaming data—same codebase, edge to cloud:

  • Industrial IoT — Predictive maintenance, quality control, process monitoring
  • Vehicle Telematics — Driver behavior, fleet analytics, diagnostics
  • E-commerce — Clickstream insights, real-time personalization, session analysis
  • Network Operations — Anomaly detection, QoS monitoring, capacity planning
  • Financial Services — Fraud detection, transaction monitoring, audit trails
  • Smart Infrastructure — Energy optimization, predictive operations, occupancy patterns

Features

30+ nodes across 6 categories

Category Purpose
Signal Conditioning Smoothing, filtering, noise removal
Feature Extraction Statistics, correlations, trends
Detection Thresholds, change points, persistence checks
Flow Control Filtering, routing, orchestration
Emission MQTT publishing, conditional alerts
Data Quality Validation, range checking

Core Capabilities

  • Adaptive pipelines — Analyze only when needed. Reset baselines on mode changes.
  • Isolated state — Each sensor, user, or session runs independently. Failures don’t cascade.
  • Production-ready — Offline queuing, circuit breakers, auto-recovery.
  • Context-aware thresholds — Parameters adapt to real-time context.

Performance

Benchmarked with an 8-node change-point detection pipeline (single-threaded, Node.js):

Configuration Throughput
Raspberry Pi 5 ~100K msgs/sec
Modern server >1M msgs/sec
Modern server, 200K unique sensors 300K msgs/sec

Scales horizontally across processes or hosts.

Project Status

WinkComposer is in active development. Open source transition planned for Q1 2026.

Stable

  • Core DSL and runtime
  • 30+ analytical nodes
  • CSV input, MQTT output
  • Tested from Raspberry Pi to cloud

In Progress

  • MCP Server — Chat with your streaming data. Trace anomalies. Discover root causes in near real time.
  • DuckDB + Parquet Archival — Policy-driven local storage and export to Parquet. Seamlessly move data to platforms like Databricks or BigQuery for downstream ML and analytics.
  • Real-time dashboard framework

Planned

  • Kafka integration
  • Authentication and access control
  • Knowledge graph integration

Get Involved

Help shape the future of composable streaming intelligence:

About winkJS

WinkComposer joins the winkJS family — production-grade open-source packages for NLP, ML, and statistics in JavaScript.

License

Wink Composer is copyright 2017-25 GRAYPE Systems Private Limited.

Licensed under the MIT License.