graph of links#1387
Open
dylanmcreynolds wants to merge 3 commits into
Open
Conversation
|
Great job! No new security vulnerabilities introduced in this pull requestCommunicate with Checkmarx by submitting a PR comment with @Checkmarx followed by one of the supported commands. Learn about the supported commands here. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

This implements a sql-based graph-like linking implementation. This is EXPERIMENTAL. Like, really quite experimental.
With #242, @danielballan implemented a linking mechanism to implement compatibility for bluesky references.
We discussed a more general purpose linking mechanism, which might even be able to produce JSON-LD and/or RDF. These specifications are widely used to provide semantic meaning to links between objects on the web. These technologies are often implemented in purpose-built "tripl store" databases, which are highly optimized for indexing and searching a triple, often described as subject, predicate object. Specialized query languages like SPARQL exist for querying triple stores. Triple stores are a specialization of graph database, with the
predicateproviding the semantic indicator of the link.Another popular feature of triple stores to actually quad stores, with another dimension helping support groups of triples, imagine projects, for example
This PR is inspired by triplestores, but does not implement many of the features. It does this all in SQL, with lots of indexes. It adds a third database to the tiled family (in addition to catalog and auth). In that database are a couple of key t tables:
entitieswhich carry URIs and metadata blockslinkswhich have columns forsubject,object, andpredicateThe PR exposes this new functionality using a GraphQL endpoint, rather than a RESTful endpoint. This is a departure for tiled, and something that should be considered and debated. I did it this way because it felt more natural for queries here.
Much of this code comes from another project: splash_links. It could easily stay as a separate service, but in discussions with @ahexemer and @danielballan, there was a strong desire to make it a core feature of Tiled. We imagine this helping with several key types of use cases:
Checklist
Full disclosure, much of this PR was assited by an LLM (Claude). To the extent possible, all changes were reviewed before being accepted.