• Stars
    star
    204
  • Rank 188,424 (Top 4 %)
  • Language
    TypeScript
  • License
    Other
  • Created over 9 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Immutable timeseries data structures built with Typescript

Pond.js

Build Status npm version

Version 1.0 (alpha) of Pond.js is written in Typescript and has a brand new fully typed API**

Version 0.9.x of Pond.js is the current version and the last version with the old API. (Documentation is still available) Note that v0.8.x/v0.9.x is the only version currently aligned with react-timeseries-charts.


Pond.js is a library built on top of immutable.js and Typescript to provide time-based data structures, serialization and processing.

For data structures it unifies the use of times, time ranges, events, collections and time series. For processing it provides a chained pipeline interface to aggregate, collect and process batches or streams of events.

We are still developing Pond.js 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.

Rationale

ESnet runs a large research network for the US Department of Energy. Our tools consume events and time series data throughout our network visualization applications and data processing chains. As our tool set grew, so did our need to build a Javascript library to work with this type of data that was consistent and dependable. 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. Pond.js was built to address these pain points.

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 simply getting the average value in a timeseries:

timeseries.avg("sensor");

Or quickly performing aggregations on a timeseries:

const dailyAvg = timeseries.fixedWindowRollup({
    window: everyDay,
    aggregation: { value: ["value", avg()] }
});

Or much higher level batch or stream processing using the chained API:

const source = stream()
    .groupByWindow({
        window: everyThirtyMinutes,
        trigger: Trigger.onDiscardedWindow
    })
    .aggregate({
        in_avg: ["in", avg()],
        out_avg: ["out", avg()]
    })
    .output(evt => // result );

How to install

Pond can be installed from npm.

The current version of the Typescript rewrite of Pond is pre-release 1.0 alpha, so you need to install it explicitly:

npm install [email protected]

The older Javascript version (v0.8.x), which is the only one currently compatible with the companion visualization library react-timeseries-charts, is still the default version:

npm install pondjs

What does it do?

Pond has three main goals:

  1. Data Structures - Provide a robust set of time-related data structures, built on Immutable.js
  2. Serialization - Provide serialization of these structures for transmission across the wire
  3. Processing - Provide processing operations to work with those structures

Here is the high level overview of the data structures provided:

  • Time - a timestamp

  • TimeRange - a begin and end time, packaged together

  • Index - A time range denoted by a string, for example "5m-1234" is a specific 5 minute time range, or "2014-09" is September 2014

  • Duration - A length of time, with no particular anchor

  • Period - A reoccurring time, for example "hourly"

  • Window - A reoccurring duration of time, such as a one hour window, incrementing forward in time every 5 min

  • Event<K> - A key of type T, which could be Time, TimeRange or Index, and a data object packaged together

  • Collection<K> - A bag of events Event<K>, with a comprehensive set of methods for operating on those events

  • TimeSeries<K> - A sorted Collection<K> of events Event<K> and associated meta data

And then high level processing can be achieved either by chaining together Collection or TimeSeries operations, or with the experimental Stream API:

  • Stream - Stream style processing of events to build more complex processing operations, either on incoming realtime data. Supports remapping, filtering, windowing and aggregation.

Typescript

This library, as of 1.0 alpha, is now written entirely in Typescript. As a result, we recommend that it is used in a Typescript application. However, that is not a requirement.

The documentation website is generated from the Typescript definitions and so will provide type information. While especially useful when building a Typescript application, it is also a guide for Javascript users as it will tell you the expected types, as well as understanding consistency in generics. See these How to read these docs for a quick guide to reading Typescript definitions.

v0.8.9 of Pond ships with basic Typescript declarations that were contributed to the project.

Contributing

Read the contribution guidelines.

The library is written in Typescript and has a large and growing Jest test suite. To run the tests interactively, use:

npm test

Publishing

We are currently publishing Alpha versions as we find bugs or need to make other changes.

lerna publish --npm-tag alpha

License

This code is distributed under a BSD style license, see the LICENSE file for complete information.

Copyright

ESnet Timeseries Library ("Pond.js"), Copyright (c) 2015-2017, 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 [email protected].

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.

More Repositories

1

iperf

iperf3: A TCP, UDP, and SCTP network bandwidth measurement tool
C
6,519
star
2

react-timeseries-charts

Declarative and modular timeseries charting components for React
JavaScript
855
star
3

gdg

Grafana Dashboard Manager
Go
314
star
4

react-network-diagrams

Contains ESnet network mapping and circuit rendering code, as used in the ESnet portal.
JavaScript
188
star
5

esnet-smartnic-hw

ESnet SmartNIC hardware design repository.
SystemVerilog
36
star
6

react-dynamic-forms

Dynamic forms library for React
JavaScript
36
star
7

dpdk-plugin

C++
22
star
8

EScp

Rust
17
star
9

zeek-exporter

Prometheus Exporter for Zeek
C++
16
star
10

enos

ESnet Network Operating System (NOT ACTIVELY MAINTAINED)
Python
15
star
11

xilinx-tools-docker

Docker image containing Xilinx build tools
Dockerfile
13
star
12

zeek-dpdk

11
star
13

grafana-esnet-networkmap-panel

A geographic bidirectional network map based on d3 and leaflet
JavaScript
11
star
14

oscars

Java
11
star
15

esnet-perfsonar-mesh

Shell
9
star
16

react-axis

Axis components built for React
JavaScript
9
star
17

TCP-monitor

Simple Python Program to monitor TCP sockets
Python
8
star
18

react-timeseries-barchart

A horizontal barchart that summarizes a list of TimeSeries objects
JavaScript
7
star
19

esnet-fpga-library

ESnet general-purpose FPGA design library.
SystemVerilog
7
star
20

simple-lookup-service

sLS code
Java
7
star
21

docker

Files for various Science DMZ use cases. This repository is no longer being maintained and serves as an example only.
7
star
22

esnet-smartnic-fw

ESnet SmartNIC firmware design repository.
C
6
star
23

netshell

Kernel and companion software that support ENOS applications (NOT ACTIVELY MAINTAINED)
Java
6
star
24

react-timeseries-table

Got a TimeSeries? Build a Table.
JavaScript
6
star
25

mini-portal

Demonstration of toolkits used to build the MyESnet portal.
JavaScript
5
star
26

sense-rtmon

Custom Scripts for Dynamic End-To-End Flow-Specific Grafana Dashboards
Python
5
star
27

sans-holiday-hack-2018

ESnet Security Team's SANS Holiday Hack 2018 Report
HTML
5
star
28

pypond

A python library to manipulate and transmit time-series data.
Python
5
star
29

nml-mrml

MRML: Multi-Resource Markup Language - Modeling Schemas and Tools
Java
5
star
30

cookiecutter-zeekpackage

Cookiecutter template for Zeek packages
Python
5
star
31

arborq

Python library for querying Arbor PeakFlow devices.
Python
4
star
32

netgraf

Real-time network monitoring tool that uses machine learning
Jupyter Notebook
4
star
33

xilinx-qdma-for-opennic

Variant of Xilinx QDMA IP Drivers for DPDK that is compatible with Xilinx opennic-shell.
C
4
star
34

shibboleth_session_auth

Simplistic Shibboleth integration with Django sessions
Python
3
star
35

ansible_network_capture

Jinja
3
star
36

eZeeKonfigurator

Web-based configuration for your Zeek clusters
Python
3
star
37

sense-rm

SENSE Resource Manager
Java
3
star
38

esnet-arcdiagram-panel

An arch diagram panel plugin for Grafana
TypeScript
2
star
39

indira_networkIntent

Python
2
star
40

calibers

Exploring shaping traffic at the edge of the network
Jupyter Notebook
2
star
41

oscars-frontend

JavaScript
2
star
42

hylia_networkprediction

Jupyter Notebook
2
star
43

oscars-topology-json

Publishes the OSCARS NMWG topology and list of circuits in a JSON format
Python
2
star
44

regio

Tools for working with FPGA register maps (including code generators for C and SystemVerilog interfaces).
Python
2
star
45

workflow-databooks

Repository of sample data related to distributed data workflows for scientific research. Data is explained and exercise through a set of Jupyter notebooks. Anyone is invited to share relevant date, including all aspects of workflows, including but not limited, WAN, LAN, I/O, CPU, memory.
Jupyter Notebook
2
star
46

smartnic-dpdk-docker

Docker container with dpdk + xilinx qdma + pktgen-dpdk for use in high speed test setups
Dockerfile
2
star
47

hps-rl

Hyperparameter tuning for deep RL applications
Python
1
star
48

xilinx-labtools-docker

Docker image to provide Xilinx LabTools
Dockerfile
1
star
49

testing-harness

A harness for executing jobs across multiple hosts and collecting output.
Jupyter Notebook
1
star
50

docker-tooling

Misc tools that can be in your $PATH to make life easier
Shell
1
star
51

netpredict

Real-time network traffic prediction with deep learning
Jupyter Notebook
1
star
52

esviz

DEPRECATED. ESnet charts visualizations can be found at react-timeseries-charts.
JavaScript
1
star
53

esnet-matrix-panel

TypeScript
1
star
54

zeek_perfsonar_owamp

OWAMP protocol analyzer plugin for Bro/Zeek
JavaScript
1
star
55

arista-tapagg-ansible

HTML
1
star
56

hhc19

SANS Holiday Hack 2019
HTML
1
star
57

sense-nrm-oscars

Python
1
star
58

stardust-snmp-pipeline

The data processing pipeline the ESnet Stardust project uses to enrich data collected from SNMP.
Ruby
1
star
59

janus-client

Python
1
star
60

simpleML4Networks

examples for trying out multiple machine learning on network data sets
Jupyter Notebook
1
star