Skip to content

Fast small desktop and web application designed to provide a visual interactive representation of RDF (Resource Description Framework) data.

License

Notifications You must be signed in to change notification settings

xdobry/rdfglance

Repository files navigation

RDFGlance

RDFGlance is an open-source application designed to provide a visual representation of RDF (Resource Description Framework) data. The application is programmed using Rust, ensuring high performance and safety.

  • Easy to install
  • Small Desktop App
  • Serverless WASM Based Web Application (limited functionality)
  • 100% React free
  • Multithread Processing to use 100% of your CPU power
  • No HTML
  • No Server needed
  • Programmed by real programmer with real programming language
  • The self-contained executable is only 15MB!
  • Zero runtime needed

Try Rdfglance WASM version directly in your browser. You can browse your RDF Data online. The WASM version does not offer all functionality. Especially no multithread non-blocking processing.

You may pass query parameter with url of ttl data to be loaded. https://xdobry.github.io/rdfglance/?url=https://purl.humanatlas.io/asct-b/kidney

The server with ttl data should allow cors by setting the http header "access-control-allow-origin: *" in the response.

Description

RDFGlance allows users to easily visualize and interact with RDF data. It is RDF Visualization tool. It provides a user-friendly interface to explore the relationships and properties within RDF datasets in different ways: as visual interactive graph, table or data sheet. The application is suitable for developers, researchers, publisher and anyone interested in working with semantic web technologies.

My primary goal was to ensure the program runs as fast as possible and maintains high performance even when handling large datasets. Therefore, the program has been optimized to efficiently process and manage large number of triples and records.

screenshot

Individually styled visualization of nodes and edges

screenshot

Manual

Features

RDFGlance offers the following visualization capabilities for RDF data:

  • Visual interactive graph
  • data tables organized by instance types.
  • You can navigate the nodes like in browser from node to node.
  • Display of statistical information about types, data properties, and references, sorted by type
  • Can safe all data, graph and styles as project in own binary format for fast loading.
  • Compute some graph statistics and adapt node size of their result. Following graph statistics are implemented:
    • betweenness centrality
    • closeness centrality
    • degree centrality
    • page rank
    • k-core centrality
    • eigenvector centrality
    • louvain clustering (community detection) - used to color nodes
  • Semantic zoom based on graph statistics
  • Can open ttl file passed as start parameter
  • Can open ttl file dropped from explorer
  • Support for display of multilingual data

The RDF Data can be loaded by using following formats:

  • ttl
  • rdf/xml
  • trig - named graphs are ignored
  • nt (n-tuples)
  • nq (n-quads) - named graphs are ignored

Defined prefixes are taken from the input file if possible.

The program assumes that the RDF nodes (triples) are organized using RDFS (RDF Schema). So every node have a assigned rdf type. The program index and show all data using these types.

Some features of RDF are not supported very well. This includes:

  • named graphs
  • RDF list (you may resolve the lists to simple predicates. The order are preserved)

I hope to improve it in later versions. You may use github issue system to report bug and feature wishes.

Installation

The application is only one executable file without dependencies that can be just copied somewhere. So no installation package need to be provided. As windows user you can just use executable from releases directory: github releases

You may also associate the TTL file extension with the program. So you can open rdf-glance just by double-click on the file in the file explorer.

Compilation

To compile RDFGlance, you need to have Rust installed on your system. Follow these steps to compile the application:

  1. Clone the repository:
git clone https://github.com/xdobry/rdfglance.git
cd rdfglance
  1. Build the application using Cargo:
cargo build --release
  1. The compiled binary will be located in the target/release directory.

You may also pick the precompiled executable for windows from github releases.

Usage

After compiling the application, you can run it using the following command:

./target/release/rdf-glance

For more information on how to use RDFGlance, refer to the documentation provided in the repository.

Wasm Web Application Build

You can run the application in browser using the WASM (Web Assembly) technology. The rust code is compiled to wasm that can be run in browser in almost native code speed. The HTML engine is not used and the application render the UI using WebGL.

Prepare wasm compilation

rustup target add wasm32-unknown-unknown
cargo install trunk
cargo build --target wasm32-unknown-unknown

Run server in dev mode

trunk serve

You can run the application in your browser using local address : http://localhost:8080

Build static web content. Output in dist folder

trunk build

Build for github pages

trunk build --release --public-url /rdfglance/

The last web release is available here Rdfglance WASM version

You need to configure vs code to switch to wasm mode by Ctrl-Shift-P + Preferences Open User Settings (JSON). Add option

 "rust-analyzer.cargo.target": "wasm32-unknown-unknown",

Known Problems

  • Some RDF files can not be read. You will see the error messages in the std output. It seems that the used oxrdf parser is quite sensitive.
  • For WASM (Web) the loading big rdf files the gui may freeze for a while. Multithread processing is not support for WASM
  • There is configurable limit of visual nodes in visual graph set to 40.000. It depends on your computer and data how hight the limit can be set for acceptable performance.
  • If your computer has no GPU support the application can be quite slow, especially in browser.

I hope that the application can be useful for others. Please report your feature request as github issue.

Technology

RDFGlance leverages the egui library, a simple and fast GUI library for Rust that can create both desktop and web applications using WebAssembly (Wasm). Unlike traditional web applications that rely on HTML and React, egui allows for a more lightweight and efficient approach. This results in a smaller application size and improved performance, enabling RDFGlance to handle and display larger RDF datasets, up to 100,000 triples, without any delays.

RDFGlance uses some oxigraph rust libraries.

I have developed the application because my frustration about low performance of existing rdf solutions and I wanted to learn and test Rust and egui framework. It is a learning and hobby project.

Releases

You can use ready to use binaries for windows see github releases

Contributing

We welcome contributions from the community. If you would like to contribute to RDFGlance, please fork the repository and submit a pull request. Make sure to follow the contribution guidelines outlined in the repository. You can also create github issue

License

RDFGlance is licensed under the GPL License. See the LICENSE file for more details.

About

Fast small desktop and web application designed to provide a visual interactive representation of RDF (Resource Description Framework) data.

Resources

License

Stars

Watchers

Forks

Packages

No packages published