Security News
Bun 1.2 Released with 90% Node.js Compatibility and Built-in S3 Object Support
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
A library build on top of immutable.js to provide time-based data structures and processing within ESnet tools. For data structures it unifies the use of time ranges, events and timeseries. For processing it provides a chained operations interface to aggregate and collect streams of events.
We are still developing Pond as it integrates further into our code, so it may change or be incomplete in parts. That said it has a growing collection of tests and we will strive not to break those without careful consideration. See the CHANGES.md document for version updates.
We consume timeseries data throughout our network visualization applications and data processing chains so we needed to build a Javascript library to work with that was consistent and immutable way. The alternative for us has been to pass ad-hoc data structures between the server and the client, making all elements of the system much more complicated. Not only do we need to deal with different formats at all layers of the system, we also repeat our processing code over and over.
The result might be as simple as comparing two time ranges:
const timerange = timerange1.intersection(timerange2);
timerange.asRelativeString(); // "a few seconds ago to a month ago"
Or finding the average value in a timeseries:
timeseries.avg("sensor");
Or much higher level stream processing:
// Set up processing chain
const processor = Processor()
.groupBy("channelName")
.aggregate("5m", avg)
.collect("1d", false, timeseries => {
// --> Output timeseries representing 1 day of 5 min averages
});
// As events come in...
processor.addEvents(incomingEvents);
Pond has two main goals: basic data structures built on Immutable.js and processing operations to work with those structures. Here is a summary of what is provided:
And forming together a collection of events, we have a Timeseries:
And then high level helper functions to:
And finally a a chained interface to the high level functions:
Pond will run in node.js (ideally using babel-node) or in the browser (ideally via webpack). Install from npm:
npm install pondjs --save
For further information see the Getting started guide.
The library has Mocha tests. To run the tests interactively, use:
npm run start-tester
Then point your browser to:
http://localhost:9500/webpack-dev-server/tests
Or to run the tests (and linting) on the command line:
npm test
This code is distributed under a BSD style license, see the LICENSE file for complete information.
ESnet Timeseries Library ("Pond"), Copyright (c) 2015, The Regents of the University of California, through Lawrence Berkeley National Laboratory (subject to receipt of any required approvals from the U.S. Dept. of Energy). All rights reserved.
If you have questions about your rights to use or distribute this software, please contact Berkeley Lab's Innovation & Partnerships Office at IPO@lbl.gov.
NOTICE. This software is owned by the U.S. Department of Energy. As such, the U.S. Government has been granted for itself and others acting on its behalf a paid-up, nonexclusive, irrevocable, worldwide license in the Software to reproduce, prepare derivative works, and perform publicly and display publicly. Beginning five (5) years after the date permission to assert copyright is obtained from the U.S. Department of Energy, and subject to any subsequent five (5) year renewals, the U.S. Government is granted for itself and others acting on its behalf a paid-up, nonexclusive, irrevocable, worldwide license in the Software to reproduce, prepare derivative works, distribute copies to the public, perform publicly and display publicly, and to permit others to do so.
FAQs
A timeseries library build on top of immutable.js
The npm package pondjs receives a total of 2,503 weekly downloads. As such, pondjs popularity was classified as popular.
We found that pondjs demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
Security News
Biden's executive order pushes for AI-driven cybersecurity, software supply chain transparency, and stronger protections for federal and open source systems.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.