Skip to content

Commit 1ddb27a

Browse files
authored
Clarify federation extension fields
1 parent da9bf27 commit 1ddb27a

File tree

1 file changed

+23
-14
lines changed

1 file changed

+23
-14
lines changed

extensions/federation/README.md

Lines changed: 23 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -106,12 +106,14 @@ schema:
106106
}
107107
```
108108

109-
## Lists of resources
109+
## Temporarily uavailable resources
110110

111+
Resources and back-ends can be temporarily be unavailable.
112+
It is especially important to communicate to users missing resources when compiling lists of resources across multiple back-ends.
111113
Clients will assume that all lists of resources are the a combination of all back-ends listed in `GET /`.
112-
Federated APIs can expose if any of the back-ends is not available and thus is not part of the response.
114+
Federated APIs can expose if any of the back-ends is temporarily not available and thus is not part of the response.
113115

114-
Applies to:
116+
Examples of where this could apply to (**not** comprehensive):
115117

116118
- `GET /collections`
117119
- `GET /processes`
@@ -124,12 +126,6 @@ Applies to:
124126
- `GET /jobs/{job_id}/logs`
125127
- `GET /services`
126128

127-
The following endpoints define the resources (UDF runtimes / service types) at the top level of their response as key-value pairs.
128-
Consequently, they are not extensible with additional properties for federation purposes.
129-
130-
- `GET /udf_runtimes`
131-
- `GET /service_types`
132-
133129
### OpenAPI fragment
134130

135131
```yaml
@@ -138,8 +134,8 @@ schema:
138134
properties:
139135
'federation:missing':
140136
description: >-
141-
Lists all back-ends that were not considered in the response (e.g. because they were not accessible).
142-
If not given or empty, all back-ends were considered for creating the response.
137+
Lists all back-ends that were temporarily not considered in the response (e.g. because they were not accessible).
138+
If not given or empty, all back-ends supporting this endpoint were considered for creating the response.
143139
Back-ends that were listed as offline in the capabilities still need to be listed here.
144140
type: array
145141
items:
@@ -159,18 +155,23 @@ schema:
159155

160156
## Resources supported only by a subset of back-ends
161157

162-
Every discoverable resource that is defined as an object and allows to contain additional properties, can list the subset of back-ends that support or host the exposed resource/functionality.
158+
Every discoverable resource that is defined as an object and allows to contain additional properties, can list the subset of back-ends that permanently support or host the exposed resource/functionality.
163159
Examples of where this could apply to (**not** comprehensive):
164160

161+
- `GET /collctions`
165162
- `GET /collections/{id}`
166-
- `GET /processes` (per process, per parameter)
167-
- `GET /file_formats` (per file format)
163+
- `GET /processes` (global, per process, per parameter)
164+
- `GET /file_formats` (global, per file format)
168165
- `GET /service_types` (per service)
169166
- `GET /udf_runtimes` (per UDF runtime, per version)
170167
- `POST /validation` (the back-ends that can run the process, see below)
168+
- `GET /files`
169+
- `GET /process_graphs`
171170
- `GET /process_graphs/{id}`
171+
- `GET /jobs`
172172
- `GET /jobs/{job_id}` (the back-ends that generated the result)
173173
- `GET /jobs/{job_id}/results` (the back-ends that generated the result)
174+
- `GET /services`
174175
- `GET /services/{id}` (the back-ends that host the service)
175176

176177
This can also be embedded deeply into a hierarchical structure, e.g. for process or file format parameters.
@@ -240,3 +241,11 @@ This also covers the case where the federation supports splitting a process into
240241
...
241242
}
242243
```
244+
245+
## Endpoints that can't list federation details
246+
247+
The following endpoints define the resources (UDF runtimes / service types) at the top level of their response as key-value pairs.
248+
Consequently, they are not extensible with additional properties for federation purposes.
249+
250+
- `GET /udf_runtimes`
251+
- `GET /service_types`

0 commit comments

Comments
 (0)