New:Microsoft Teams Notifications Are Now Available in Socket.Learn more
Get Started

@magmacomputing/tempo-plugin-batch

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@magmacomputing/tempo-plugin-batch

Tempo community plugin bringing C-level parallelization to massive date arrays via SharedArrayBuffer and Worker Threads.

Source
npmnpm
Version
1.0.1
Version published
Weekly downloads
141
-18.5%
Maintainers
1
Weekly downloads
 
Created
Source

Tempo Plugin

@magmacomputing/tempo-plugin-batch

npm version npm peer dependency version License TypeScript Ready Documentation

This is a Community plugin for the Tempo library that parallelizes massive epoch mutation tasks across worker threads utilizing lock-free SharedArrayBuffer architecture for extreme throughput.

👉 View the full documentation on our GitHub Pages

Perfect for: Heavy data ETL pipelines, massive IoT telemetry ingestion, financial ledger chronometrics, and any parallel bulk date-processing workloads.

Installation

npm install @magmacomputing/tempo-plugin-batch

Usage

import { Tempo } from '@magmacomputing/tempo';
import { BatchPlugin } from '@magmacomputing/tempo-plugin-batch';

Tempo.init({ 
  plugins: [BatchPlugin] 
});

// Assume `epochs` is a massive array of integers representing timestamps
const epochs = [1700000000000, 1700000001000, /* ... millions more ... */];

// Mutate millions of dates concurrently using the worker pool
// The engine automatically splits the payload and offloads to workers!
const batchResult = await Tempo.batch(epochs, { weeks: 1 });

console.log(batchResult); // Returns an array of mutated timestamp integers

Rehydration

By default, Tempo.batch returns an array of primitive number timestamps to maximize throughput over the thread boundary. If you need fully-fledged Tempo objects back, pass { rehydrate: true }:

// Returns an array of Tempo instances instead of integers
const tempoInstances = await Tempo.batch(epochs, { weeks: 1 }, { rehydrate: true });

Graceful Degradation

If the host environment does not support SharedArrayBuffer (or if it is blocked by CORS/COOP headers in the browser), the orchestrator intelligently and transparently falls back to using traditional postMessage structural cloning chunks to ensure execution never halts.

Licensing

This is a Community plugin. It is completely free and open-source for personal and commercial use. No license token is required.

For commercial licensing options, please contact Magma Computing.

Keywords

tempo

FAQs

Package last updated on 18 Jul 2026

Related posts