Code Monkey home page Code Monkey logo

gpjson's Introduction

GPJSON

GPJSON is a GPU-based JSON data processing system which can be used to execute JSONPath queries on newline-delimited JSON datasets. It has support for a subset of JSONPath queries and can be used from any GraalVM language.

Build and installation

GPJSON uses Gradle as a build system. There is no need to install Gradle, the Gradle wrapper can be used to build GPJSON.

The only requirements for running GPJSON are GraalVM and CUDA (and a supported GPU). It has been tested on GraalVM CE 21.0.0.2 Java 8, downloadable here. It has only been tested on Linux using CUDA 11.2, but should work on other OS when CUDARuntime.java is adapted.

To build the project, execute:

./gradlew build

This will generate two files in gpjson/build/libs:

  • gpjson-0.1-SNAPSHOT.jar: Contains the compiled code of GPJSON, without any dependencies. This will not run without including GPJSON's dependencies on the classpath.
  • gpjson-0.1-SNAPSHOT-all.jar: Contains the compiled code of GPJSON, including all dependencies. This will run without any other JAR files required on the classpath.

To use GPJSON in GraalVM, copy the gpjson-0.1-SNAPSHOT-all.jar file to $GRAALVM_HOME/jre/languages/gpjson. This can also be done automatically by setting the graalVMDirectory project property. For example, if you have set the GRAALVM_HOME environment variable, use:

./gradlew copyToGraalVM -PgraalVMDirectory=$GRAALVM_HOME

Usage

Create a file gpjson.js:

const gpjson = Polyglot.eval('gpjson', 'jsonpath');
const result = gpjson.query('dataset.json', '$.user.lang');

Then, run:

$GRAALVM_HOME/bin/node --polyglot --jvm gpjson.js

License

GPJSON is licensed under the BSD 3-Clause license available here.

Parts of the source code are from grCUDA and are licensed under the BSD 3-Clause license available here.

GPJSON also depends on Truffle APIs licensed under the Universal Permissive License (UPL), Version 1.0 (https://opensource.org/licenses/UPL).

gpjson's People

Contributors

koesie10 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

mrragava necst

gpjson's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.