You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: eventstreams.bs
+22-22Lines changed: 22 additions & 22 deletions
Original file line number
Diff line number
Diff line change
@@ -16,7 +16,7 @@ An **LDES client** is a piece of software used by a *consumer* that accepts the
16
16
The data stream emits the history that is available from this entry point, and once the consumer has caught up with the stream, it remains synchronized as new members are published.
17
17
18
18
The client does this by extending upon a subset of [the W3C TREE hypermedia specification](https://w3id.org/tree/specification).
19
-
The *extension* is that the Linked Data Event Streams specification introduces specialized terms for dealing with append-only collections, or *event streams*.
19
+
This *extension* introduces specialized terms for dealing with append-only collections, referred to as *event streams*.
20
20
For example, one can indicate what time-based property in the member is used for indicating the order of the event stream, indicate the retention policy as a promise from the producer to the consumer, or detail how to deal with version-based members.
21
21
22
22
Issue: More extensions should be specified w.r.t. [HTTP status codes](https://github.com/SEMICeu/LinkedDataEventStreams/issues/69), or [keeping state](https://github.com/SEMICeu/LinkedDataEventStreams/issues/31). This should be further detailled in a chapter after the overview.
@@ -29,23 +29,23 @@ A Linked Data Event Stream (LDES) (`ldes:EventStream`) is a collection (`rdfs:su
29
29
This way, the collection of members becomes an append-only log or *event stream*.
30
30
31
31
Following the [TREE specification](https://w3id.org/tree/specification), this event stream is published using one or more HTTP resources.
32
-
When more resources are used, these pages, or `tree:Node`s will be structured according to a search tree.
32
+
When more resources are used, these pages, or `tree:Node`s, will be structured according to a search tree.
33
33
Therefore we will use the terms *root node* for the first page, and *subsequent node* for every next page in the structure.
34
34
35
35
In the root node, the client will expect these properties to be described on the `ldes:EventStream` entity:
36
36
* `ldes:timestampPath`: this is a [SHACL property path](https://www.w3.org/TR/shacl/#property-paths) that identifies an `xsd:dateTime` literal within each member. This timestamp determines the chronological order in which members of the event stream are added. When `ldes:timestampPath` is set, no member can be added to the LDES with a timestamp earlier than the latest published member.
37
-
* `ldes:versionOfPath`: when your entities are versioned, this property points at the object that tells you the entity is a version of (e.g., `dcterms:isVersionOf`).
38
-
* `tree:shape`: a [[!SHACL]] shape that can be used for selection a search tree in the discovery phase, as well as to validate the members in the event stream.
37
+
* `ldes:versionOfPath`: when your entities are versioned, this property points at the object that tells you what entity it is a version of (e.g., `dcterms:isVersionOf`).
38
+
* `tree:shape`: a [[!SHACL]] shape that can be used to select a search tree in the discovery phase, as well as to validate the members in the event stream.
39
39
* `tree:view`: connects the collection to the current page, or points to one specific root node after dereferencing the `ldes:EventStream` identifier.
40
40
41
41
In the root node, the current node identified by the URL of the page (a provider can achieve this simply by using a relative IRI `<>`) will be further described using these properties:
42
-
* `ldes:retentionPolicy`: indicates 0 or more retention policies (see next chapter).
42
+
* `ldes:retentionPolicy`: indicates 0 or more retention policies (see [[#retention]]).
43
43
* `tree:viewDescription`: can as well contain the retention policy, or other context data about this view of the LDES (e.g., the `dcat:Distribution`, the `tree:SearchTree`, or the `ldes:EventSource`) as a named entity. This is useful for example if a producer would like to disambiguate the IRI for the `ldes:EventSource` from the root `tree:Node`. By default, the `tree:viewDescription` points at the root node.
44
44
45
-
The client MUST implement the [initialization of the TREE specification](https://w3id.org/tree/specification#init), although it is not required to extract the `tree:search` form.
45
+
The client MUST implement the [initialization of the TREE specification](https://w3id.org/tree/specification#init), and they MAY extract the `tree:search` form.
46
46
47
47
In any `tree:Node` – root node or subsequent node – the client expects to find 0 or more members of the `ldes:EventStream` using the `tree:member` property.
48
-
The subject is the event stream instance, and the object is the root focus node of a member.
48
+
The subject is the event stream instance and the object is the root focus node of a member.
49
49
An LDES client MUST implement the [Member Extraction Algorithm of the TREE specification](https://w3id.org/tree/specification#member-extraction-algorithm) to retrieve the full set of quads of the member.
50
50
In an `ldes:EventStream`, the object of the `tree:member` triple can only be an IRI as this IRI will be used in the state to check whether the member has already been emitted or not.
51
51
@@ -75,10 +75,10 @@ ex:AddressRecords a ldes:EventStream ;
adms:versionNotes "First version of this address" ;
79
-
dcterms:isVersionOf ex:AddressRecord1 .
78
+
adms:versionNotes "First version of this address" ;
79
+
dcterms:isVersionOf ex:AddressRecord1 .
80
80
81
-
ex:AddressRecord1-activity1 {
81
+
ex:AddressRecord1-activity1 {
82
82
ex:AddressRecord1 dcterms:title "Streetname X, ZIP Municipality, Country" .
83
83
}
84
84
```
@@ -94,18 +94,18 @@ Issue: More specific server documentation should be found in a Server Primer (to
94
94
95
95
# Retention policies # {#retention}
96
96
97
-
The goal of the retention policies is to indicate that, a client should not rely on finding members that fall outside the retention policies.
97
+
The goal of the retention policies is to indicate that a client should not rely on finding members that fall outside the retention policies.
98
98
This can help a consumer in the discovery phase to pick the right LDES, or help the consumer to detect non-viable synchronization set-ups.
99
99
100
100
<img height="400" src="retentionpolicies.svg" alt="An overview of the existing retention policies in LDES">
101
101
102
102
When no retention policy is provided in the root node, the client MUST assume all members that have been added to the `ldes:EventStream` are still available from this root node.
103
-
When one or more retention policies are provided, a client MUST assume it will not be able to find members outside of the retention policy, or outside of the union of the retention policies when multiple are provided.
103
+
When one or more retention policies are provided, a client MUST assume it will not be able to find members outside of the union of the retention policies.
104
104
105
-
In the LDES specification, four types of retention policies are defined which can be used with a `ldes:retentionPolicy`:
105
+
In the LDES specification, three types of retention policies are defined which can be used with a `ldes:retentionPolicy`:
106
106
1. `ldes:DurationAgoPolicy`: a time-based retention policy in which data generated before a specified duration is removed
107
107
2. `ldes:LatestVersionSubset`: a version subset based on the latest versions of an entity in the stream
108
-
3. `ldes:PointInTimePolicy`: a point-in-time retention policy in which data generated before a specific time is removed
108
+
3. `ldes:PointInTimePolicy`: a point-in-time retention policy in which data generated before a specific datetime is removed
109
109
110
110
A consumer MUST interpret the retention policies to understand whether the goal of the client can be reached.
111
111
For example, an LDES client can work with a configured polling interval, or can be executed on a schedule.
@@ -129,12 +129,12 @@ ex:P1 a ldes:DurationAgoPolicy ;
129
129
```
130
130
</div>
131
131
132
-
A `ldes:DurationAgoPolicy` uses a `tree:value` with an `xsd:duration`-typed literal to indicate how long ago the timestamp.
132
+
A `ldes:DurationAgoPolicy` uses a `tree:value` with an `xsd:duration`-typed literal to denote the temporal extent to which data can be retrieved.
133
133
When the `ldes:timestampPath` is redefined on the policy itself, a client MUST interpret the retention policy on this path instead.
In order to indicate you only keep 2 versions of an object referred to using `dcterms:isVersionOf`:
137
+
A version-based retention policy can be defined as follows, with the example configured to only retain 2 versions of an object referred to using `dcterms:isVersionOf`:
138
138
139
139
<div class="example" highlight="turtle">
140
140
```turtle
@@ -147,14 +147,14 @@ ex:C2 a ldes:EventStream ;
147
147
148
148
ex:P2 a ldes:LatestVersionSubset;
149
149
ldes:amount 2 ;
150
-
#If different from the Event Stream, this can optionally be overwritten here
150
+
#If different from the Event Stream, this can optionally be overwritten here
151
151
ldes:timestampPath dcterms:created ;
152
152
ldes:versionOfPath dcterms:isVersionOf .
153
153
```
154
154
</div>
155
155
156
-
A `ldes:LatestVersionSubset` has the property `ldes:amount` and MAY redefine the `ldes:timestampPath` and/or `ldes:versionOfPath`. It MAY also define a compound version key using `ldes:versionKey` (see example below) instead of `ldes:versionOfPath`.
157
-
The `ldes:amount` has a `xsd:integer` datatype and indicated how many to keep that defaults to 1.
156
+
A `ldes:LatestVersionSubset` SHOULD have the property `ldes:amount` and MAY redefine the `ldes:timestampPath` and/or `ldes:versionOfPath`. It MAY also define a compound version key using `ldes:versionKey` (see example below) instead of `ldes:versionOfPath`.
157
+
The `ldes:amount` has an `xsd:integer` datatype, indicating the number of versions to keep. By default, this value is set to 1.
158
158
The `ldes:versionKey` is an `rdf:List` of [SHACL property path](https://www.w3.org/TR/shacl/#property-paths)s indicating objects that MUST be concatenated together to find the key on which versions are matched.
159
159
When the `ldes:versionKey` is set to an empty path `()`, all members MUST be seen as a version of the same thing.
160
160
@@ -196,7 +196,7 @@ A `ldes:PointInTimePolicy` uses a `ldes:pointInTime` with an `xsd:dateTime`-type
196
196
197
197
Next to re-using terms from the `tree:` vocabulary, the `ldes:` namespace introduced in this document provides a couple of new terms.
198
198
The base IRI for LDES is `https://w3id.org/ldes#`, and the preferred prefix is `ldes:`.
199
-
There is a Turtle version available at [https://w3id.org/ldes#Vocabulary](https://w3id.org/ldes)
199
+
There is a Turtle version available at [https://w3id.org/ldes#Vocabulary](https://w3id.org/ldes).
200
200
201
201
## ldes:EventStream ## {#voc-eventstream}
202
202
@@ -242,7 +242,7 @@ A retention policy that uses an `xsd:duration` literal to document a sliding win
0 commit comments