Repository navigation
v0.1.0
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) anddist(metres, fordwithin). 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"instyle.jsonlists each one'smaxzoom. -
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 IRIwith--location) reads vocabularies, code lists and ontologies with the data, forsh: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_withandvalidate_counted_withtake the lookup graphs. See the guide. -
Map facets of several collections in one request (#92):
/{ds}/tiles/facets?collection=A&collection=Banswers 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-Mapkeeps 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. -
servemakes 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-upturns 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 draftedCONSTRUCTthat maps every column or key, preview the triples it makes and add them to a named graph, or download the query to run withtripletrail 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 isPOST /{ds}/import, then/{ds}/import/{id}/previewand/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) andq(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'stts: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,infoorok), 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.2andlatest; a pre-release tag such asv0.1.0-rc.3only0.1.0-rc.3), so another image can copy thetripletrailcommand out of it (#93): the binary is/usr/local/bin/tripletrailand/usr/share/doc/tripletrailholds 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 andpgrrouting 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 withSERVICEwas 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.rsasks 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 wheresg:visibleIfhides draft features, people without clearance and secrets (also as objects, and a graph holding only hidden rows) andsg:hidePropertieshides 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 withfrom-archive, as it already did gzip (#20). The decoder is the pure-Rustcrabz2crate (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 idsfor one query) answers aSELECTwhose pattern runs on term ids straight from the id tables, without the evaluator (#11): joins,OPTIONAL,MINUS, filters on ids,ORDER BYof variables,DISTINCT,OFFSETandLIMIT, 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 anOPTIONAL129 → 16 ms, with the same answers.spareval, the evaluator, stays the default for now;/{ds}/explainsays 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 ash:resultMessagetakes 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 graphs uses the spatial index again (#89). The rewrite estimated?x geo:asWKT ?wfrom the real default graph, which is usually empty, so it left every window to theFILTERand scanned every geometry: map tiles of named-graph data were 30 to 100 times slower than the same data in the default graph. It now estimates over every graph, as the query reads them. ORDER BYover dates, times or dateTimes with and without a timezone no longer panics ("user-provided comparison function does not correctly implement a total order"; the server answered 500) (#78). A value without a timezone is read as UTC, as Jena's F&O comparison does, where XSD leaves values less than 14 hours apart unordered; values of the same instant come in the order of their text, andNaNafter every other number.MINandMAXorder the same way. See the guide.- Query page: MatGUI's Explain tab of the results showed no plan and said "No engine recognised for this endpoint", as it knows only QLever, GraphDB, Stardog, Blazegraph and Neptune. For this server's own endpoints it now asks
/{ds}/explain(the Engine list reads "Detect (TripleTrail)") and draws the plan as a tree with the rows and time of each step. See the guide. - A dataset's turn (
maxConcurrent) ends once its answer is read to its end, before the last bytes are written, as the caller's turn already did: a client that sends its next request as soon as an answer is in no longer waits for, or is refused for, the turn the answer still held, and/$/statsno longer shows it running. - A division of decimals or integers,
AVGandwin:avgkeep the digits Jena keeps (#8): the exact quotient when it ends, else 24 digits after the point rounded half to even (2 / 3is0.666666666666666666666667). They were cut, not rounded, after 18 digits. Anxsd:decimalwith more than 18 digits after the point, such as one Fuseki wrote, is now a number in arithmetic and comparisons (read at 18 digits) instead of an unknown literal. See the guide. - Result tables of the id rewrites are numbered over the whole process instead of per thread, so two queries evaluated at the same time (the map's facets, four at once) never name the same table. A view that held another query's tables could otherwise have answered one query's columns from the other's rows: a likely cause of the map facets that once came back with each other's counts (#7).
- A vector graph saved to its file (
<ds>.networks/vectors/) counts as being made until the file is written: once its status says done, nothing writes to the folder any more. - Installing, replacing or removing a shape pack changes the map, the OGC API's collections and their tiles at once; before, they kept the shapes of the pack before until the data or the dataset's own shapes changed. The guide's example packs now
tts:refinesthe generated station shape, so the stations stay on the map as the guide says.
Changed
- Row filters can hide a shared set of resources but for a few of each filter's own (
RowFilter::hide_shared,SharedHidden, enterprise #7), held as a bitmap when the ids are dense. An "own records" rule (sh:hasValue sg:requestingAgent) uses it in TripleTrail Enterprise: every agent's filter shares the targets and lists only the agent's records, instead of holding every hidden target (about 4.5 MB per agent on 200,000 offers). A row filter skips its empty sets when testing a quad.Snapshot::store_idandRowShapes::idgive keys for caches of what is derived from a store version and a set of shapes. - Under
--executor ids,BINDandSELECT (expr AS ?v)run on term ids too (#11): copies, constants and+ - *,ABS,ROUNDand the other number kernels, with the literals the evaluator writes. AFILTERon a computed value is computed from its expression. On 133k orders,BIND(?a * ?q AS ?g) FILTER(?g > 400000)took 222 ms and takes 49 ms, and a select expression over a join 197 → 59 ms. Decimal products no longer give up past about 170 (they are exact on 256 bits), and numeric constants such as2.5e0are read by value, so more filters and sums run on ids in either executor. See the store. - Under
--executor ids,VALUESruns on term ids too (#11), and aBINDthe ids can't compute (STR, a division) is found before the patterns run, not after: on a production rule set of 55 queries, the two that took 1.4 s and 3.1 s underidstake 0.67 s and 1.2 s again, as underspareval. A computed number the store inlines is made straight into its id, without a literal or a lookup:BIND(?a + 1 AS ?b)over 133k doubles 116 → 77 ms. ABINDorVALUESconstant the store doesn't hold (2.5e0when it holds2.5) compared by value in a filter is left to the evaluator. - Under
--executor ids, aGROUP BYwith 1,024 groups or more is answered from the table of ids its counts and sums are kept in (#11), and so is any sub-select whose pattern runs on ids. Over 10,000 customers of 133k orders,GROUP BY ?c ?namewith a count takes 11 ms instead of 20, andSUMwithORDER BYandLIMIT20 instead of 27. - Under
--executor ids, sub-selects withDISTINCT,REDUCED, anORDER BYof variables, orLIMITandOFFSETunder an order run on term ids too (#11). On 133k orders,{ SELECT DISTINCT ?c ?q … }takes 49 ms instead of 214, and aDISTINCTsub-select joined with a pattern 17 ms instead of 37. - Under
--executor ids, SPARQL JSON, CSV and TSV answers are written straight from the term ids (#11): each distinct term of the answer is decoded and written once, on the query threads, and copied into the rows where it occurs, byte for byte as before. A three-pattern join returning 133k rows went from 142 to 88 ms as CSV and from 228 to 119 ms as JSON (from 333 and 402 ms with the evaluator). The result cache keeps such answers as they are. See the server options. - Filters that compare or compute on stored
xsd:doublevalues (FILTER(?a > 4000),?a * 1.21 > 5000) run on term ids (#11): over 133k doubles, 60 → 15 ms and 89 → 27 ms, with the same answers. Integers and decimals are turned into doubles as before.SUM(?a * 1.21)runs on ids too (210 → 102 ms grouped); like the other double sums, it is summed exactly and rounded once, so its last digit can differ from before. ORDER BY ?v LIMIT kover inline doubles, decimals, dates and date-times is ordered on term ids (#64), and only the first rows are read back: the top 50 of 133k double amounts took 54 ms and now take 17 ms, and 319 → 34 ms with a three-pattern join. Rows with equal values keep the order they were found in.SUMandAVGover storedxsd:doublevalues (also mixed with integers and decimals) run on term ids (#62): aGROUP BYof 133k doubles into 10k groups took 170 ms and now takes 50 ms. The sum is exact and rounded once, so it no longer depends on the order of the rows; it can differ from Fuseki's, which rounds after each addition, in the last digit (ten times0.1is1, not0.9999999999999999). See the guide.FILTER(?v IN (…))andNOT INwith a list of IRIs and literals look each row up in a hash set of the items' term ids (#63) instead of comparing it with every item: 1,000 IRIs over 133k rows took 933 ms and now take 16 ms, close to the 11 ms of the same list asVALUES. Answers are unchanged: numbers of different datatypes still compare by value.- A caller limited by graph grants or row rules keeps the count and id-row shortcuts the whole store has (tripletrail-enterprise#7): they read a view without the other graphs, the copies of a triple in several granted graphs and the hidden rows. On 200,000 offers in 10 graphs, a range count took 95 ms for a caller granted half of the graphs and 190 ms under a row rule, and now takes 8 and 13 ms (11 ms for a caller who sees everything);
COUNT(*)of a class went from 10-16 ms to 2-4 ms. Answers are unchanged. - Every answer carries
Server: TripleTrail/<version>instead oftiny-http (Rust), and--corslets pages read it, so query tools can recognise the engine by it. The Explain plugin of MatGUI and YASGUI does not yet: its TripleTrail engine waits for a plugin release.
Commits
Features
- feat(map): filter tiles, facets and items by a spatial relation to an area (#128) (647fff5)
- feat(map): a base map may give the last zoom of its tiles (#127) (cee8c3c)
- feat(store): row filters share a hidden set but for each filter's own resources (#122) (f85a131)
- feat(map): a stored validation report as a data-quality facet (#120) (8037028)
- feat(server): make each dataset's map in the background once the datasets are open (#115) (3a4f35d)
- feat(map): lighter tiles of crowded layers below zoom 8 (#117) (2017ad9)
- feat(map): count the features of each class of a map coloured by a range (#110) (4ae2822)
- feat(shapes): a set can hide the generated shapes from a reader, such as the map (#111) (ce41ece)
- feat(shacl): one result per repeated SPARQL solution, and lookup data for validate (#108) (425332e)
- feat(map): facets of several collections in one request, shared facets summed (#109) (f2adffc)
- feat(server): an Import page turns a dropped file into RDF and adds it to a graph (#103) (2f2a27f)
- feat(map): facets and tiles filter by bbox, graph and text (#106) (86214e6)
- feat(access): built-in services read only the rows the caller sees (#102) (ddc04a5)
- feat(query): id executor answers whole SELECTs from term ids (#95) (2a1b877)
- feat(fx): html.metadata=true reads the RDFa and Microdata a page embeds (#77) (92aa081)
- feat(fx): read tar archives compressed with bzip2 (#73) (5f183ce)
- feat(server): accept POST forms on /{ds}/search/similar (#49) (4379973)
- feat(map): layer eyes, filter icon, outlines, base map menu, fullscreen and full extent (#30) (8928675)
- feat(ui): find similar resources by text or IRI on the Search page (#38) (c56d971)
- feat(describe): lay out describe pages with tabs, graph, data model and RDF (#32) (2c40dc7)
- feat(ui): add full-width pages, copy buttons beside IRIs and a Share link (#29) (fe76a7a)
- feat(text): answer Stardog, Virtuoso, QLever, GraphDB and Jena apf full-text syntaxes (#28) (b415948)
- feat: TripleTrail open core (e36d3ba)
Fixes
- fix(docker): a crate cache per architecture, so a two-platform build no longer races (#133) (bb5226b)
- fix(map): a year at the end of a base map's credit is not its zoom (#129) (1496ec1)
- fix(store): row filters with shared sets are equal only when the sets hold the same ids (#123) (58ab120)
- fix(access): name row rules when a SERVICE is refused under them (#105) (6eefa09)
- fix(shacl): fill in the {$var} and {?var} of SPARQL-based messages (#101) (1f9002e)
- fix(spatial): estimate over every graph under the union default graph (#99) (7963669)
- fix(query): order dates and times with and without a timezone in a total order (#96) (189eb46)
- fix(store): number result tables over the whole process, not per thread (#74) (a575e71)
- fix(query): divide decimals and average as Jena does, with 24 fraction digits (#69) (9b2088f)
- fix(ui): show TripleTrail's plan in MatGUI's Explain tab (#67) (53a8ae3)
- fix(server): end a dataset's turn when its answer is read, and keep a vector graph being made until it is saved (#68) (183879c)
- fix(release): download only the release's own artifacts (#66) (ae9e3c1)
- fix(ci): treat an item already on the project as added in the backfill (#60) (e875bae)
- fix(describe): order the data model the same on every store (#58) (6a2fb7f)
- fix(spatial): infer relation triples inside EXISTS (#57) (1430024)
- fix(spatial): keep a path joined to a relation triple through its blank node (#55) (b75e5bf)
- fix(spatial): keep a property path joined through its blank node (#53) (6e6a490)
- fix: release the caller's permit at the end of the body and make three tests independent of timing (#1) (3adfe95)
Performance
- perf(query): a top-level OFFSET without an order runs on term ids again (#126) (9a52892)
- perf(query): sub-selects with DISTINCT, an order and a slice on term ids (#124) (4ed773d)
- perf(query): grouped tables and sub-selects answered on term ids (#119) (8955bd8)
- perf(spatial): test id-join candidates polygon by polygon, without caching them (#118) (e124db0)
- perf(query): VALUES on term ids, BIND checked up front and cheaper (#113) (db2edf8)
- perf(query): BIND and select expressions on term ids (#107) (4e6865a)
- perf(server): write JSON, CSV and TSV answers straight from term ids (#104) (f987791)
- perf(access): keep the count and id-row shortcuts under graph grants and row rules (#86) (dce5093)
- perf(query): compare and compute on inline doubles on term ids (#87) (1cb13fe)
- perf(query): SUM and AVG over doubles and top-k ORDER BY on numbers and dates, on term ids (#75) (0207958)
- perf(query): keep the short quotient of a decimal division when it is exact (#76) (3821999)
- perf(query): evaluate FILTER IN lists as a hash set of term ids (#71) (e9632b1)
- perf(paths): evaluate transitive paths on term ids (#31) (b589655)
Other changes
- chore(release): prepare 0.1.0 and fill releases made on the Releases page (685fd86)
- ci(docker): publish the image on version tags and document copying the command out of it (#121) (cd3d7b4)
- docs(sso): set up Keycloak and Microsoft Entra ID for single sign-on (#125) (b0e9039)
- docs(changelog): neutral wording for the SHACL repeated-results entry (#116) (71fb551)
- test(access): map facets and the REST API in the leak tests (#114) (06c169c)
- docs(server): row filters follow sequence paths after a write (#112) (3f37e5e)
- ci: run the W3C suites a second time under the id executor (#98) (28b8cff)
- test(server): neutral dataset, group and graph names in the access tests (#97) (cc8c2f4)
- test(server): key rotation and updates during a policy swap (#94) (e292fb3)
- test(server): leak tests under row rules (#88) (f1fcfcb)
- test: fix three flaky or order-dependent tests (#72) (edc9caa)
- ci: set and read board fields through a Board workflow (#65) (a2d5f92)
- chore(release): prepare 0.1.0-rc.2 (#61) (7138bd0)
- ci: add issues and pull requests to the TripleTrail project (#59) (51c30cd)