0.1.3 • Published 4 years ago

@uncharted.software/kruda v0.1.3

Weekly downloads
1
License
MIT
Repository
-
Last release
4 years ago

kruda.js

Fast data pipeline in the browser.
This is a derivative work of BigDataParser by Dario Segura

WARNING: This is pre-release software under active development.

Installation

yarn add @uncharted.software/kruda

or

npm install @uncharted.software/kruda

Usage

  • www/index.html has a working example you can look at.
  • Look at the documentation

Running the example.

  • Run yarn install
  • Download airport data (Airports2.csv)
  • Run node ./src/DSBIN/node/generateDSBIN.js /path/to/Airports2.csv ./www/data/flight_routes.ds.bin (change /path/to/Airports2.csv to the location where you stored the Airports2.csv file) to convert Airports2.csv to the .ds.bin format.
  • Run yarn start
  • In Chrome (must be chrome for now) navigate to localhost:8090
    • The example will allocate a 2GB memory heap
    • Load the generated flight routes ds.bin file (~3.6 million rows)
    • Apply a filter to it where:
      • The origin airport code equals SEA
        and
      • The number of passengers equals 110
        and
      • The destination airport code is not equal to LAX
    • OR:
      • The origin airport code equals MCO
        and
      • The number of passengers is more than 180
        and
      • The number of passengers is less than 200
        and
      • The flight date contains 2001
  • On a laptop running a 4th gen 2.5GHz intel i7 quad core processor:
    • Allocating 2GB of memory takes ~1242ms
    • Loading the ds.bin file (~38MB, ~500MB uncompressed) takes ~861ms
    • Filtering all ~3.6 million rows with the rules above takes ~115ms
    • Filtering all ~3.6 million rows with a filter that returns every single row takes ~462ms

Debugging

Unfortunately many error checks must be disabled for the sake of performance, if statements are very expensive!
You can re-enable them by changing the flag _DEBUG in the rollup.config.js file:

jscc({
    prefixes: '/// ',
    sourcemap: false,
    values: {
        _DEBUG: false, // <<<<<< CHANGE THIS LINE TO `true`
    },
}),
0.1.3

4 years ago

0.1.2

4 years ago

0.1.1

4 years ago

0.0.15

4 years ago

0.0.14

5 years ago

0.0.13

5 years ago

0.0.12

5 years ago

0.0.11

5 years ago

0.0.10

5 years ago

0.0.9

5 years ago

0.0.8

5 years ago

0.0.7

5 years ago

0.0.6

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago