Skip to content

Releases

v0.3.3

Choose a tag to compare

@MathiasVDA MathiasVDA released this 01 Dec 22:16
5cd7f9a

Fixes found by running 0.3.x in production ETL pipelines: a SHACL rule that made tripletrail infer look stuck, SHACL-SPARQL constraints that use $this only in a nested group, a missing lift input reported as outside the allowed directories, and CSV results with IRIs holding a comma. Graph grants are tightened for queries with GRAPH patterns. Users of graph grants should upgrade.

Upgrading from 0.3.2

  • Store format. Unchanged: 0.3.3 opens 0.3.2 datasets as they are, and 0.3.2 opens datasets 0.3.3 wrote.
  • Graph grants. Users of graph grants (sg:readGraph) should upgrade.

Fixed

  • A query with a GRAPH pattern from a caller limited to some graphs (sg:readGraph) is answered by the general evaluator, which reads GRAPH within the caller's named graphs.
  • SPARQL CSV results (text/csv) quote an IRI that holds a comma (#714), as RFC 4180 and the SPARQL 1.1 CSV format ask and as literals already were: a client read such a row as having too many fields. ERA's RINF data has such IRIs. A triple term with a comma, a quote or a line break in any part is quoted as one field too.
  • FILTER NOT EXISTS { … } and FILTER EXISTS { … } with a BIND in the pattern are looked up from the row's own values again (#671). The planner orders the triples of such a pattern from the variables the row binds (a rule's $this, say), but left them in their written order when the pattern also had a BIND, as an overlap check of normalised begin and end coordinates does; a pattern starting from every area of the network then ran once per row. A SHACL rule of that form took 1,397 s of a 1,566 s tripletrail infer run on a 20M-triple graph, and looked stuck; on a synthetic graph of 3.6M triples it went from over 15 minutes to 0.12 s, with the same triples.
  • With --allow (and the server's Facade-X allowed directories), a Facade-X location that is missing inside an allowed directory is reported as missing ("cannot read … (os error 2)"), as without --allow (#645). It was refused as outside the allowed directories when the resolved path differed from the one given: on Windows, and on a base reached through a symbolic link. Paths outside the directories, missing or not, and links that leave them are still refused as outside.
  • A SHACL-SPARQL constraint whose $this is used only inside a nested group, such as a UNION branch holding only FILTER NOT EXISTS { $this ex:p ?v }, now reports its focus nodes (#668). $this was bound where the query's outer pattern joins it, so such a group, which SPARQL evaluates on its own, saw it unbound and the constraint gave no result. It is now pre-bound in every group that uses it (the right side of a join, OPTIONAL, UNION branches, GRAPH), as SHACL asks and as pySHACL and TopBraid do. SHACL-AF SPARQL rules get the same fix.

Commits since v0.3.2

Fixes

  • fix(access): answer GRAPH patterns of graph-limited callers with the evaluator (0.3.x) (#713) (c0004f3)
  • fix(shacl): pre-bind $this in the nested groups of a SPARQL constraint (#675) (9dad5ee)
  • fix(fx): report a missing file inside the allowed directories as missing (#667) (a5cb0dc)

Performance

Other changes

v0.3.2

Choose a tag to compare

@MathiasVDA MathiasVDA released this 01 Dec 06:41

A fix for map layers whose facet index the warm-up ran out of time for: on all of RINF, the tunnel tiles took seconds each. It brings two changes that the fix builds on: each dataset keeps its own map caches, and a facet index is built once when several requests ask for it.

Upgrading from 0.3.1

  • Store format. Unchanged: 0.3.2 opens 0.3.1 datasets as they are, and 0.3.1 opens datasets 0.3.2 wrote.
  • Map caches are per dataset. The tile cache's 256 MiB and the other map caches' limits now hold for each dataset, where all datasets shared them. A server with several mapped datasets can hold more for its map.

Changed

  • The map's tile caches belong to their dataset (#584, first step): kept tiles, shape previews, facet value labels, unfiltered and measured facet counts, failed computed facets and class sizes are dropped with the dataset when it is deleted or replaced, where they stayed in process-wide caches until pushed out. The tile cache's 256 MiB and the other caches' limits now hold per dataset, where they were shared by all datasets. mapCaches in /$/stats and /$/metrics now counts the kept measure= facet answers too (#627), which it left out.

Fixed

  • Tiles of a map layer whose facet index the warm-up ran out of time for were read with a query each, until the next write (#643). On all of RINF (101 graphs), the warm-up's five minutes ran out before the tunnels, the last of its 31 collections, whose geometry comes from the section they are part of: their tiles took 2 to 8 s each, empty ones too, and eight asked for at once took the server from 4.3 to 10.8 GB. The warm-up now makes the indexes it had no time for, or whose boxes it ran out of time reading, right after, in the background, one collection at a time, and names them in its log line; a tile that finds a collection without its index starts the same. On RINF's eight countries, z6 tunnel tiles take 1 to 5 ms with the index and 0.5 to 0.6 s without it.
  • A collection's facet index is built once when a measured facets request (measure=length)
    and the warm-up, or several such requests, find none at the same time: the others wait for that
    build instead of reading every feature again each (#628).

v0.3.1

Choose a tag to compare

@MathiasVDA MathiasVDA released this 30 Nov 21:09

Map tiles at PostGIS speed, so that RINF Atlas can draw its whole map from TripleTrail. A warmed dataset draws its tiles, plain, filtered or coloured, from the map's facet index with no SPARQL query, and every uncached z9 and coloured z12 tile measured on RINF's eight countries is faster than PostGIS on the same machine. Tiles carry several facets per feature, can be revalidated with an ETag, and the facets give kilometres and counts per colour class. The server runs under a path behind a reverse proxy, and tripletrail store info and store upgrade show and bring a dataset to the formats a build writes. Writes that break the dataset's shapes are now saved and flagged instead of refused.

Upgrading from 0.3.0

Read this first; everything else in this release works without changes.

  • Writes that break the dataset's shapes are written and flagged, not refused (#624). A REST, Records or GraphQL write whose record breaks the dataset's own shapes was refused with 422; it is now saved, with TripleTrail-Violations (the number of violations) in the answer and the violations in a dry run's violations and beside a GraphQL mutation's record. A client that relied on the 422 to keep data that breaks the shapes out should check that header. Values that cannot be written at all (an unknown or read-only key, a value not of its datatype) are still refused with 422.
  • Store format. Unchanged: 0.3.1 opens 0.3.0 datasets as they are, and 0.3.0 opens datasets 0.3.1 wrote, so you can roll back. tripletrail store info shows the version of each file; there is nothing to upgrade yet. Take a store backup before you upgrade anyway.
  • Memory. The map's facet index now keeps the geometry each feature draws, and the grid that finds features in a tile's window, so a warmed server holds more for the map, and mapCaches in /$/stats counts them (#598, #573).
  • Tiles. A tile answer carries an ETag and Cache-Control: no-cache (private for a caller limited to some graphs or rows), and a matching If-None-Match gets 304 (#595). The map style asks for tiles up to zoom 16 instead of 18; deeper zooms enlarge them (#595). A feature with several values of the facet a tile is coloured by has value __mixed__ (#589).

What you can do now

  • Draw RINF Atlas's whole map from TripleTrail: tiles carry more facets per feature with prop.{collection}={key} (#589), the facets count each colour class of a range facet (#590) and give the kilometres behind each value with measure=length (#591). See carry more facets on each feature and the tiles.
  • Serve TripleTrail under a path of another site: serve --base-path /tt behind a reverse proxy that takes the path off (#588). See under a path behind a reverse proxy.
  • See and bring a store to the formats a build writes: tripletrail store info and tripletrail store upgrade, or /$/datasets/{name}/upgrade on a running server (#516). See upgrading and rolling back.
  • Check what you download: release files, the Docker image and the Helm chart are signed with keyless cosign (#552).

Performance

Uncached map tiles of a warmed dataset are drawn from the facet index without a SPARQL query, plain (#599) or filtered and coloured (#600), and are the same bytes as before. On RINF's eight countries with RINF Atlas's 31 collections, every uncached z9 tile and every z12 tile coloured by speed was faster than PostGIS on the same setup (tracker #555); the entries below give the figures.

The full list of 34 changes is in CHANGELOG.md.

v0.3.0

Choose a tag to compare

@MathiasVDA MathiasVDA released this 29 Nov 21:39
f59ebc9

TripleTrail 0.3.0 brings the map's facets to PostGIS speed, with what RINF Atlas needs to draw its map from TripleTrail alone: a list of the features the filters keep and their extent, a pick of layers on one tile, counts of features without a location, and instances filed under their most specific class. A server other machines reach no longer starts open for changes, every HTML page carries a content security policy, and outbound calls go through your proxy.

Upgrading from 0.2.0

The store format is unchanged, but a server other machines reach now refuses to start open for changes (exit status 2), the Docker image's 0.0.0.0:7878 included. Before you upgrade, choose one:

  • --auth-config to identify callers;
  • both --update-token and --admin-token (TRIPLETRAIL_UPDATE_TOKEN, TRIPLETRAIL_ADMIN_TOKEN), which keeps reads public;
  • --open (TRIPLETRAIL_OPEN=true) to serve it open as before, with a warning. The Helm chart has open: true.

Loopback binds are unchanged. Also check:

  • Memory. After the map's warm-up a server holds more for the facet index (on RINF's eight countries, 2.3 to 2.5 GB instead of 1.35 GB), and maxMemory quotas now count the map's caches.
  • Stale facets. Right after a write, a box's facets are answered from the data before it, marked "stale": true, until the map is warmed again.
  • shapes import-atlas: import RINF Atlas's pack again for 31 layers instead of 45.

The full list is in the CHANGELOG's Upgrading from 0.2.0.

What's new

New

  • GET /{ds}/tiles/features: a page of the features the map's filters keep, with their total and the box around them.
  • Pick the layers of an all tile with collection=, and draw some at every zoom with allZoom=.
  • The map's facets count the features without a geometry (unlocated).
  • tts:mostSpecificOnly files an instance under its most specific collection only; shapes import-atlas sets it.
  • Outbound calls through an HTTP or SOCKS5 proxy (--outbound-proxy), trusting your proxy's CA certificates (--outbound-ca, --outbound-ca-system).
  • ?x tt:hasPeriod ?p reads the period of any OWL-Time, DCAT or schema.org value.
  • tripletrail schema lift writes the Facade-X lift for XML files of a lifted schema.
  • Each release publishes CycloneDX SBOMs; a security model and a compatibility policy.

Improved

  • The map's facets for a new box, a graph filter or the first request after a write answer in tens of milliseconds on RINF's eight countries (31 collections), at PostGIS's speed; after a write the facet index is brought up to date from what the write touched, within seconds for a small change.
  • Bulk loads of N-Triples are about 30 % faster, the spatial index takes half the memory, and the full-text index builds in less than half the memory.

Fixed

  • Every HTML page carries a content security policy, and every answer nosniff.
  • Stale facet answers end once a warm-up is over, even one that could not finish.
  • The count beside a layer on the Map page is what the map draws.
  • A spatial join with many candidate pairs no longer fills the memory.

Install

  • Binaries for Linux (x86_64, aarch64), macOS (Intel, Apple silicon) and Windows below, with SHA256SUMS and CycloneDX SBOMs.
  • Docker: docker pull ghcr.io/matdata-eu/tripletrail:0.3.0
  • JavaScript client: npm install @matdata/tripletrail-client
  • Python: not on PyPI yet; pip install ./python builds it from a checkout.

Full changelog: CHANGELOG.md, 0.3.0

v0.2.0

Choose a tag to compare

@MathiasVDA MathiasVDA released this 28 Nov 20:36

TripleTrail 0.2.0 brings records you can browse and edit from your shapes, Add data for any file, map tools, periods for "valid on a day" queries, AI agents over MCP, schema lifting, and a store that takes about a fifth of the space. The id executor is now the default.

Upgrading from 0.1.0

0.2.0 opens 0.1.0 datasets as they are, but 0.1.0 can't read what 0.2.0 writes: take a store backup before you upgrade. Also check:

  • Host names. Behind a reverse proxy that passes its own host name to a server on 127.0.0.1, add --allowed-host <name>. Changes posted by a page of another site are refused (403) unless that site is in --cors.
  • OGC API items carry only the facets, IRIs shown as labels; properties=* gives what 0.1.0 gave.
  • WKT is kept in binary form in new datasets (--keep-wkt-text keeps the text).
  • The id executor is the default; --executor spareval goes back to the evaluator.

The full list is in the CHANGELOG's Upgrading from 0.1.0.

What's new

New

  • Records page: browse a class's records in a grid, open a record as a form drawn from the shapes, and create, edit or delete it with the server's checks shown as you type.
  • Add data on the Datasets page takes any file: RDF loads, and CSV, JSON, XML and other files open the Import page with a lift drafted in the file's own vocabulary, or with Draft with AI.
  • Map tools: draw an area to filter every layer by, select by another layer's features, measure lengths and areas, read coordinates in any EPSG code, a time slider, PNG export and Cite this map.
  • Periods: tt:period and Allen's relations answer "valid on a day" in one call, over dates and date-times alike.
  • tripletrail serve --mcp serves each dataset to AI agents over the Model Context Protocol.
  • tripletrail schema lifts XML Schema, JSON Schema, OpenAPI, ASN.1 and PostgreSQL schemas to OWL, SHACL and SKOS.
  • Brand your server: name, logo, colour, banner, footer links, start page and example queries for the Query page.
  • Set a dataset's limits from its dialog on the Datasets page; tripletrail disk-usage shows where a store's bytes go.

Improved

  • The id executor is the default: most queries are answered straight from term ids, and more of one query runs on several cores.
  • A new store takes about a fifth of the space: WKT kept in binary form, IRIs sharing their namespace, and four quad indexes instead of eight when everything is in the default graph.
  • OGC API items are up to 3.6 times as fast at half the size, show facet labels, and give numberMatched; map tiles and answers go gzipped.
  • The map's facets roll up from parts to their parent, are labelled in your language, and are ready again 30 s after a load.
  • validate --stats counts distinct focus nodes, names every shape with a stable IRI and gives each result a finding key.

Fixed

  • Changes posted by a page of another site are refused, and a server without sign-in answers only for its own host names.
  • A spatial join stops at the query's timeout.
  • ORDER BY over a mix of numbers, strings and other literals no longer fails.
  • The top bar no longer hides tabs under the search box on wide screens.

Install

  • Binaries for Linux (x86_64, aarch64), macOS (Intel, Apple silicon) and Windows below, with SHA256SUMS.
  • Docker: docker pull ghcr.io/matdata-eu/tripletrail:0.2.0
  • JavaScript client: npm install @matdata/tripletrail-client
  • Python: not on PyPI yet; pip install ./python builds it from a checkout.

Full changelog: CHANGELOG.md, 0.2.0

v0.1.0

Choose a tag to compare

@MathiasVDA MathiasVDA released this 21 Nov 21:07
bb5226b

The first release: an Import page, a faster and richer map, SHACL messages and lookup graphs, the id executor behind --executor ids, and a Docker image published with each version tag.

Added

  • A spatial filter for the map's tiles and facets and the OGC API's items (#33): area (WKT, or the IRI of a resource with a geometry), rel (intersects, within, contains, touches, crosses, overlaps, disjoint, dwithin) and dist (metres, for dwithin). Candidates come from the spatial index. See the guide.

  • --map-basemap 'TITLE|URL|ATTRIBUTION|MAXZOOM' (#52): a base map may give the last zoom its provider has tiles for (0 to 24, default 19), and the Map page enlarges that zoom's tiles beyond it instead of asking for tiles that are not there. metadata."tripletrail:basemaps" in style.json lists each one's maxzoom.

  • Step-by-step provider setups for single sign-on (TripleTrail Enterprise, enterprise #3): Keycloak (the clients, the audience mapper, groups and realm roles, the browser client) and Microsoft Entra ID (the app registration, version 2 tokens, app roles or the groups claim and its 200-group limit, the browser sign-in), in server.md. The Keycloak setup is tested against Keycloak 26 in the enterprise repository.

  • tripletrail validate --lookup FILE (and --lookup-graph IRI with --location) reads vocabularies, code lists and ontologies with the data, for sh:class, paths and SPARQL constraints, without validating them: focus nodes come from the data only (#91). RINF data checked with ERA's vocabularies no longer reports the vocabularies' own resources. Engine::validate_report_with and validate_counted_with take the lookup graphs. See the guide.

  • Map facets of several collections in one request (#92): /{ds}/tiles/facets?collection=A&collection=B answers each collection's counts, their total, and the facets they share (such as a country) summed over them. See the guide.

  • A pack or a dataset's own set can show only its own classes on the map (#92): <urn:my:set> a tts:ShapeSet ; tts:hidesGenerated tts:Reader-Map keeps the generated shapes it does not override or refine from that reader, so the map has no layers for RINF's references and coordinates, while the OGC API and describe pages still have them. See the guide and shapes.

  • serve makes each dataset's map in the background once the datasets are open (#92): its collections and the unfiltered facet counts of each, so the first visitor of a large dataset no longer waits for them (on RINF's eight countries, 40 s for the 31 collections). The log says when it is ready; --no-warm-up turns it off. See the guide and the server options.

  • An Import page in the web UI (/$/ui/import) (#20): drop a file, see it as Facade-X triples, edit the drafted CONSTRUCT that maps every column or key, preview the triples it makes and add them to a named graph, or download the query to run with tripletrail lift. The file stays in the server's memory for an hour, never on its disk, the query can read only that file, and only someone who may write to the dataset can import. Its API is POST /{ds}/import, then /{ds}/import/{id}/preview and /run?graph=. See the guide and Importing files.

  • Map facets and tiles take three more filters (#92): bbox (the features in a map area, through the spatial index), graph (the features of some named graphs) and q (the features whose indexed text holds every word, as the map's search box matches), alone or together with the facet filters. See the guide and the server reference.

  • The legend of a map coloured by a range counts its features (#92): with color={key}, /{ds}/tiles/facets/{collection} gives that facet's colour classes (the shape's tts:colorClasses, else the map's round ones) with the features drawn in each under the filters, and the Map page's key shows them, with the features that have no number. See the guide.

  • Lighter map tiles at low zooms (#92): below zoom 8, a layer of more than 1,000 features in a tile has a 512 extent instead of 4096 and one feature per position (the one drawn on top), as RINF Atlas sends them. Small layers keep every feature. See vector tiles.

  • Data quality on the map (#92): with tts:qualityReport <graph> in the shapes, a stored SHACL validation report becomes a facet of every layer, each feature's worst severity (violation, warning, info or ok), to count, filter and colour by, and shared by a panel of several layers. See the guide.

  • A version tag publishes the Docker image by itself (1.2.3, 1.2 and latest; a pre-release tag such as v0.1.0-rc.3 only 0.1.0-rc.3), so another image can copy the tripletrail command out of it (#93): the binary is /usr/local/bin/tripletrail and /usr/share/doc/tripletrail holds the licence files to ship with it. See the guide.

  • Under row rules (TripleTrail Enterprise, enterprise #5), queries may call the built-in services: st:, the window service, path search and pgr routing read only the rows the caller sees (their sub-selects, the edges path search follows, the networks routing builds, cached apart per rules), and answer as on a store holding only those. Before, a query with SERVICE was refused (400) under row rules. pgr:shapes, pgr:vehicle, pgr:compatibilityShapes, pgr:shaclRules, other services and a service inside another stay refused. See the guide.

  • Access-control tests (enterprise #9): a key rotated in the auth file works without a restart and the old key is a 401 from then on, never anonymous, even with anonymous access on; updates sent while a policy file is swapped back and forth are each applied whole or refused whole.

  • Leak tests under row rules (enterprise #9): in the enterprise build, tests/leaks.rs asks its several hundred requests, twice (queries, explain, RDF4J, Graph Store Protocol, describe, VoID, listings, OGC API Features, tiles, search, GraphQL, workspace samples) of a server where sg:visibleIf hides draft features, people without clearance and secrets (also as objects, and a graph holding only hidden rows) and sg:hideProperties hides properties on targets and everywhere, and of a server holding only what the rules let the caller see; every answer must be the same.

  • Facade-X reads the RDF a web page embeds with html.metadata=true, as SPARQL Anything does with Any23: RDFa (the RDFa 1.1 and 1.0 processors) and Microdata join the page's Facade-X triples, with every literal a plain string (#20). See the guide and the HTML options.

  • Facade-X reads tar archives compressed with bzip2 (.tar.bz2, .tbz2, application/x-bzip-compressed-tar), as listings and with from-archive, as it already did gzip (#20). The decoder is the pure-Rust crabz2 crate (MIT, no dependencies), which also reads blocks that do not compress and files of several streams (as pbzip2 and lbzip2 write). See the guide.

  • --executor ids (and #pragma tt.executor ids for one query) answers a SELECT whose pattern runs on term ids straight from the id tables, without the evaluator (#11): joins, OPTIONAL, MINUS, filters on ids, ORDER BY of variables, DISTINCT, OFFSET and LIMIT, each term of the answer decoded once. On 133k orders a three-pattern join returning every row took 340 ms and takes 164 ms, and an OPTIONAL 129 → 16 ms, with the same answers. spareval, the evaluator, stays the default for now; /{ds}/explain says which one answered. See the guide and the server options.

Fixed

  • A spatial join of a few lines against many more polygons on the tripletrail store no longer runs out of memory (#2). It kept every polygon it tested in the store's cache and read them in the order the sweep met them, at random. It now finds candidates from the lines' segments, then reads each polygon once, in storage order, without keeping it. On 8 million synthetic polygons and 308,000 lines the join answers in 23 to 26 s at 6 GB peak, where it was killed at 15 GB; on 1 million polygons it takes 1.5 to 1.9 s (was 1.8 to 3.8 s) and keeps 32 MB of geometries (was 540 MB).
  • SHACL: solutions of a SPARQL constraint that make the same result (focus node, value, path and message) give one sh:ValidationResult, as pySHACL does, where each gave its own (#91). On one RINF dataset with ERA's shapes, 3,296 of 125,896 results were such repeats, from queries that join through several paths.
  • SHACL: the sh:messages of SPARQL-based constraints and constraint components are filled in (#90): each {$var} and {?var} of a sh:resultMessage takes the value of the solution that made the result, or of the component's parameter (SHACL 5.3.2, 6.4), where they were copied as written. ERA's RINF shapes rely on it. See the guide.
  • With --union-default-graph, a spatial query over data in named ...
Read more