This project showcases a proof of concept for client-side graph processing leveraging Java libraries compiled to WebAssembly via GraalVM. Users can query geographic hierarchies directly in the browser without a backend, enabling powerful graph traversal and querying capabilities.
Live Demo: Explore the interactive demo here.
This project serves as a proof of concept for client-side graph processing utilizing Java libraries, such as Guava and Commons CSV, compiled to WebAssembly via GraalVM. This innovative approach enables the querying of geographical hierarchies directly within the browser, eliminating the need for backend support.
Once the geographical graph is established, users can query its data with questions like:
var reachable = Graphs.reachableNodes(graph, "Collo").contains("Algeria");
This line of code leverages Guava's graph APIs to efficiently traverse relationships and return results seamlessly to JavaScript.
While JavaScript libraries suffice for basic graph queries, this project shines by allowing powerful libraries originally written in languages such as C++, Rust, or Java to function within the browser/Node environment. This capability opens up possibilities for integrating sophisticated solvers like OptaPlanner, Timefold, or Choco solver, enhancing the web application's analytical capabilities.
Skikda, Algeria
Collo, Skikda
This project represents a step towards enhanced web capabilities. Ongoing efforts include improving inter-operability between Java and JavaScript through GraalVM, alongside potential developments for implementing multithreading capabilities for improved performance.
For additional context on GraalVM and WebAssembly, consider exploring the following:
Engaging with this project provides insight into the potential of merging mature Java ecosystems with modern web technologies, significantly enriching web application capabilities.
No comments yet.
Sign in to be the first to comment.