Skip to content

Commit a1b83d3

Browse files
deploy: 827af76
1 parent 6c9f247 commit a1b83d3

File tree

2 files changed

+48
-48
lines changed

2 files changed

+48
-48
lines changed

eventstreams.bs

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ An **LDES client** is a piece of software used by a *consumer* that accepts the
1616
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.
1717

1818
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*.
2020
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.
2121

2222
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
2929
This way, the collection of members becomes an append-only log or *event stream*.
3030

3131
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.
3333
Therefore we will use the terms *root node* for the first page, and *subsequent node* for every next page in the structure.
3434

3535
In the root node, the client will expect these properties to be described on the `ldes:EventStream` entity:
3636
* `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.
3939
* `tree:view`: connects the collection to the current page, or points to one specific root node after dereferencing the `ldes:EventStream` identifier.
4040

4141
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]]).
4343
* `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.
4444

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.
4646

4747
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.
4949
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.
5050
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.
5151

@@ -75,10 +75,10 @@ ex:AddressRecords a ldes:EventStream ;
7575
tree:member ex:AddressRecord1-activity1 .
7676

7777
ex:AddressRecord1-activity1 dcterms:created "2026-01-01T00:00:00Z"^^xsd:dateTime ;
78-
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 .
8080

81-
ex:AddressRecord1-activity1 {
81+
ex:AddressRecord1-activity1 {
8282
ex:AddressRecord1 dcterms:title "Streetname X, ZIP Municipality, Country" .
8383
}
8484
```
@@ -94,18 +94,18 @@ Issue: More specific server documentation should be found in a Server Primer (to
9494

9595
# Retention policies # {#retention}
9696

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.
9898
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.
9999

100100
<img height="400" src="retentionpolicies.svg" alt="An overview of the existing retention policies in LDES">
101101

102102
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.
104104

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`:
106106
1. `ldes:DurationAgoPolicy`: a time-based retention policy in which data generated before a specified duration is removed
107107
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
109109

110110
A consumer MUST interpret the retention policies to understand whether the goal of the client can be reached.
111111
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 ;
129129
```
130130
</div>
131131

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.
133133
When the `ldes:timestampPath` is redefined on the policy itself, a client MUST interpret the retention policy on this path instead.
134134

135135
## Version-based retention policies ## {#version-subsets}
136136

137-
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`:
138138

139139
<div class="example" highlight="turtle">
140140
```turtle
@@ -147,14 +147,14 @@ ex:C2 a ldes:EventStream ;
147147

148148
ex:P2 a ldes:LatestVersionSubset;
149149
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
151151
ldes:timestampPath dcterms:created ;
152152
ldes:versionOfPath dcterms:isVersionOf .
153153
```
154154
</div>
155155

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.
158158
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.
159159
When the `ldes:versionKey` is set to an empty path `()`, all members MUST be seen as a version of the same thing.
160160

@@ -196,7 +196,7 @@ A `ldes:PointInTimePolicy` uses a `ldes:pointInTime` with an `xsd:dateTime`-type
196196

197197
Next to re-using terms from the `tree:` vocabulary, the `ldes:` namespace introduced in this document provides a couple of new terms.
198198
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).
200200

201201
## ldes:EventStream ## {#voc-eventstream}
202202

@@ -242,7 +242,7 @@ A retention policy that uses an `xsd:duration` literal to document a sliding win
242242

243243
## ldes:LatestVersionSubset ## {#voc-latestversionsubset}
244244

245-
A retention policy that select an amount of versions based on the versionOfPath, or a more advanced version key that can be configured.
245+
A retention policy that selects an amount of versions based on the versionOfPath, or a more advanced version key that can be configured.
246246

247247
### ldes:versionKey ### {#voc-versionkey}
248248

@@ -262,7 +262,7 @@ The number of versions to keep. This MUST be a number greater than 0.
262262

263263
## ldes:PointInTimePolicy ## {#voc-pointintimepolicy}
264264

265-
A retention policy that indicates members are kept starting on a certain point in time.
265+
A retention policy that indicates that members are kept starting from a certain point in time.
266266

267267
### ldes:pointInTime ### {#voc-pointintime}
268268

0 commit comments

Comments
 (0)