diff --git a/docs/reference/command-line-interface.ttl b/docs/reference/command-line-interface.ttl index 7b9d6be..24cf4db 100644 --- a/docs/reference/command-line-interface.ttl +++ b/docs/reference/command-line-interface.ttl @@ -408,6 +408,22 @@ ldh add file \\ --title "Masala Chai" \\ --slug 78 \\ --primary-topic '#this' +
A container's first content block shows its children, as the dh:Container constructor makes it. --no-children-view leaves it out, and the content is then appended like any other document's: a container whose children are laid out in another mode embeds a view of its own.
container=$(ldh create container \\
+ --parent "$LDH_BASE" \\
+ --title "Products" \\
+ --slug products \\
+ --no-children-view)
+
+ldh add view \\
+ --uri '#children' \\
+ --query https://w3id.org/atomgraph/linkeddatahub#SelectChildren \\
+ --mode https://w3id.org/atomgraph/client#GridMode \\
+ --title "Products" \\
+ "$container"
+
+ldh add object-block --value "${container}#children" "$container"
ldh push replays a directory into the document tree it maps to — the app as a repository convention: one RDF file per document, a folder beside it for the files that document holds, and subfolders for its children.
ldh push "$LDH_BASE" # the current directory diff --git a/docs/reference/configuration.ttl b/docs/reference/configuration.ttl index 7a6a1e7..7b6b76d 100644 --- a/docs/reference/configuration.ttl +++ b/docs/reference/configuration.ttl @@ -196,6 +196,8 @@ HOST=ec2-54-235-229-141.compute-1.amazonaws.comDefaults to true.
The varnish-admin and varnish-end-user services keep SPARQL results in a store of their own, apart from the main one:
+varnish-frontend also caches anonymous SPARQL queries on their body, so the same query from different visitors reaches the platform once.
The <#select-children> resource is an ldh:Object content block whose rdf:value ldh:ChildrenView renders the container's children listing.
The <#select-children> resource is an ldh:Object content block whose rdf:value ldh:ChildrenView renders the container's children listing. The container constructor and ldh create container write it as the first block; the command's --no-children-view leaves it out.
Live: /categories/ (the demo's version composes further blocks on top of this shape)
Source: categories.ttl · Live: /categories/
-Multiple ldh:seriesVarName values plot one series per named result variable — see the
+
Multiple ldh:seriesVarName values (ldh add result-set-chart takes --series-var-name once per series) plot one series per named result variable, in the order the query's SELECT projects them — see the
demo's revenue-by-carrier chart,
which pivots three carriers into three series with conditional aggregation.
GET and HEAD RDF responses from the backend triplestores (not LinkedDataHub responses) are cached automatically by LinkedDataHub using Varnish
- as an HTTP proxy cache. You can check the age of the response by inspecting the Age response header (the value is in seconds).
Age response header (the value is in seconds).
+ Anonymous SPARQL queries are cached too, on their body.
LinkedDataHub sends ETag response headers derived from a digest of the document's URL and its RDF content. Every representation (HTML, RDF/XML, Turtle, etc.) gets a distinct ETag value, and language-negotiated HTML representations factor the accepted languages into the tag. Treat the value as opaque: it is a validator to quote back in a conditional request, and nothing about the document can be read from it.
HTML responses carry a Content-Language negotiated against the languages the UI ships with, and advertise Vary: Accept-Language so shared caches keep the renderings apart.
Caching of LinkedDataHub responses can be enabled on the nginx HTTP proxy server by uncommenting the add_header Cache-Control directives in the platform/nginx.conf.template file.
diff --git a/docs/reference/http-api/sparql.ttl b/docs/reference/http-api/sparql.ttl
index 0a970f7..eaadff1 100644
--- a/docs/reference/http-api/sparql.ttl
+++ b/docs/reference/http-api/sparql.ttl
@@ -22,6 +22,10 @@
documents are written through the Graph Store Protocol, not SPARQL Update.
External clients are limited in how many queries they may have in flight and how often they may send them; a query beyond the
limits is answered with 429 Too Many Requests.
A query result is bounded by MAX_QUERY_RESPONSE_LENGTH (5 MiB by default). A longer one is refused, not truncated:
+ the response is 502 Bad Gateway with a body typed ldh:ResponseTooLarge, and a client that needs the whole result pages through it with
+ LIMIT/OFFSET. Behind the platform, the triplestore abandons such a query once its result outgrows the
+ Varnish store kept for SPARQL results.
The protocol's dataset parameters can be used to scope a query to a single document's graph: passing default-graph-uri=<document-uri>
makes that document's named graph the query's default graph. The dataset specified this way overrides any FROM/FROM NAMED
clauses in the query, and GRAPH patterns match nothing since no named graphs are part of the dataset. This is the read-side counterpart
@@ -31,6 +35,13 @@
--data-urlencode 'query=PREFIX schema: <https://schema.org/> SELECT ?name WHERE { ?product a schema:Product ; schema:name ?name }' \\
--data-urlencode 'default-graph-uri=https://localhost:4443/products/1/'
An anonymous query — one sent without a WebID certificate or an authenticated session — is cached by the front Varnish on its body as well as its URL, whether it arrives as
+ GET or as the protocol's POST forms, so the views of a public dataspace reach the platform once per query rather than once per visitor.
+ A result is kept for an hour at most, and any write through the platform drops every cached result. Authenticated queries are not cached, since their results
+ depend on the agent's access.