Skip to content

Latest commit

 

History

History
95 lines (63 loc) · 4.28 KB

README.md

File metadata and controls

95 lines (63 loc) · 4.28 KB

GRAPE-JDK with GraphScope Analytical Engine

GRAPE-JDK is a subproject of GraphScope, presenting an efficient Java SDK for the analytical engine. Powered by Alibaba-FastFFI and its ability to bridge the huge programming gap between Java and C++, GRAPE-JDK enables Java programmers to write and run graph algorithms with these benefits.

  • Easy to Program. GRAPE-JDK mirrors the full-featured GRAPE framework, including Fragment, MessageManager, in a Java style, hence a Java programmer can develop algorithms in GRAPE PIE-model easily.

  • Efficient Execution. Due to the limited ability to access low-level system resources, existing graph computing systems written in Java are usually suboptimal at efficiency. By leveraging the JNI acceleration provided by LLVM4JNI, GRAPE-JDK substantially narrows the gap between apps written in Java and in C++. As experiments shows, the overall performance gap between native C++ and GRAPE-JDK are lower than 2x, and in some scenarios like PageRank, GRAPE-JDK runs nearly as fast as native C++ implementation.

  • Support Giraph app. We also prvide user with a Giraph SDK, grape-giraph. The algorithms user implemented on Giraph interface can be run on GRAPE-JDK without any modification.

  • Support Spark Graphx. We break down the storage gap between Spark RDD and GraphScope Fragment, enabling fragment-as-rdd wrapping and rdd-to-fragment conversion.

Organization

  • grape-demo Provides example apps and FFIMirrors.
  • grape-jdk Provides the PIE SDK with graph computing interfaces.
  • grape-runtime Contains the essential files for JNI code-gen and the glue code invoked by the analytcial engine (building with ENABLE_JAVA_SDK).
  • grape-giraph Integrating grape with Apache Giraph.
  • grape-graphx Integrating grape with Spark GraphX.
  • grape-rdd-reader Providing RDD reader for spark RDD.

Get grape-jdk

Building from source

git clone https://github.com/alibaba/GraphScope.git
cd analytical_engine/java/grape-jdk
mvn clean install

This will only install grape-jdk for you, if you are only interested in writing graph algorithms in java, that's enough for you :D.

To build the whole project, make sure there is one usable c++ compiler in your envirment and both GraphScope-Analytical engine and Vineyard is installed.

From Maven Central repo

You can include grape-jdk as a dependency in your maven project

<dependency>
  <groupId>com.alibaba.graphscope</groupId>
  <artifactId>grape-jdk</artifactId>
  <version>0.18.1</version>
</dependency>

Getting Started

Documentation

Online JavaDoc is available at GraphScope Docs.

You can also generate the documentation with in three different ways.

cd ${GRAPHSCOPE_REPO}/analytical_engine/java/grape-jdk
mvn javadoc::javadoc -Djavadoc.output.directory=${OUTPUT_DIR} -Djavadoc.output.destDir=${OUTPUT_DEST_DIR}

Performance

Apart from the user-friendly interface, GRAPE-JDK also provide user with high performance graph analytics experience. Please refer to benchmark for the benchmark results.