mqtt-plus 0.9.6 → 0.9.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/README.md +83 -93
  2. package/doc/mqtt-plus-3-resource-transfer.d2 +32 -0
  3. package/doc/mqtt-plus-3-resource-transfer.svg +116 -0
  4. package/dst-stage1/mqtt-plus-api.d.ts +1 -6
  5. package/dst-stage1/mqtt-plus-base.js +1 -1
  6. package/dst-stage1/mqtt-plus-info.d.ts +4 -5
  7. package/dst-stage1/mqtt-plus-msg.d.ts +8 -13
  8. package/dst-stage1/mqtt-plus-msg.js +11 -30
  9. package/dst-stage1/mqtt-plus-resource.d.ts +31 -5
  10. package/dst-stage1/mqtt-plus-resource.js +205 -68
  11. package/dst-stage1/mqtt-plus-service.d.ts +2 -2
  12. package/dst-stage1/mqtt-plus-service.js +2 -2
  13. package/dst-stage1/mqtt-plus-stream.d.ts +4 -0
  14. package/dst-stage1/mqtt-plus-stream.js +54 -15
  15. package/dst-stage1/mqtt-plus-util.d.ts +2 -0
  16. package/dst-stage1/mqtt-plus-util.js +34 -0
  17. package/dst-stage1/mqtt-plus.d.ts +1 -0
  18. package/dst-stage1/mqtt-plus.js +1 -0
  19. package/dst-stage2/mqtt-plus.cjs.js +230 -192
  20. package/dst-stage2/mqtt-plus.esm.js +231 -193
  21. package/dst-stage2/mqtt-plus.umd.js +14 -14
  22. package/etc/stx.conf +2 -3
  23. package/etc/tsc.tsbuildinfo +1 -1
  24. package/package.json +3 -2
  25. package/src/mqtt-plus-api.ts +0 -8
  26. package/src/mqtt-plus-base.ts +1 -3
  27. package/src/mqtt-plus-codec.ts +1 -1
  28. package/src/mqtt-plus-info.ts +8 -6
  29. package/src/mqtt-plus-msg.ts +17 -46
  30. package/src/mqtt-plus-resource.ts +312 -82
  31. package/src/mqtt-plus-service.ts +2 -2
  32. package/src/mqtt-plus.ts +1 -0
  33. package/tst/mqtt-plus.spec.ts +70 -62
  34. package/doc/mqtt-plus-2-stream-transfer.d2 +0 -22
  35. package/doc/mqtt-plus-2-stream-transfer.svg +0 -108
  36. package/doc/mqtt-plus-4-resource-transfer.d2 +0 -23
  37. package/doc/mqtt-plus-4-resource-transfer.svg +0 -109
  38. package/src/mqtt-plus-stream.ts +0 -222
  39. /package/doc/{mqtt-plus-3-service-call.d2 → mqtt-plus-2-service-call.d2} +0 -0
  40. /package/doc/{mqtt-plus-3-service-call.svg → mqtt-plus-2-service-call.svg} +0 -0
package/README.md CHANGED
@@ -42,22 +42,6 @@ communication patterns with type safety:
42
42
 
43
43
  ![Event Emission](doc/mqtt-plus-1-event-emission.svg)
44
44
 
45
- - **Stream Transfer**:
46
-
47
- Stream Transfer is a *uni-directional* communication pattern.
48
- A stream is the combination of a stream name, a `Readable` stream object and optionally zero or more arguments.
49
- You *attach* to a stream.
50
- When a stream is *transferred*, either a single particular attacher (in case of
51
- a directed stream transfer) or all attachers are called and receive the
52
- arguments as extra information. The `Readable` stream is available via
53
- `info.stream` in the attacher callback.
54
-
55
- In contrast to the regular MQTT message publish/subscribe, this
56
- pattern allows to transfer arbitrary amounts of arbitrary data by
57
- chunking the data via a stream.
58
-
59
- ![Stream Transfer](doc/mqtt-plus-2-stream-transfer.svg)
60
-
61
45
  - **Service Call**:
62
46
 
63
47
  Service Call is a *bi-directional* communication pattern.
@@ -73,18 +57,24 @@ communication patterns with type safety:
73
57
  Procedure Call](https://en.wikipedia.org/wiki/Remote_procedure_call)
74
58
  (RPC) style communication.
75
59
 
76
- ![Service Call](doc/mqtt-plus-3-service-call.svg)
60
+ ![Service Call](doc/mqtt-plus-2-service-call.svg)
77
61
 
78
62
  - **Resource Transfer**:
79
63
 
80
64
  Resource Transfer is a *bi-directional* communication pattern.
81
65
  A Resource is the combination of a resource name and optionally zero or more arguments.
82
66
  You *provision* for a resource transfer.
83
- When a resource is *fetched* or *pushed*, a single particular provisioner (in case
67
+ When a resource is *fetched*, a single particular provisioner (in case
84
68
  of a directed resource transfer) or one arbitrary provisioner is called and
85
- sends or receives the resource and its arguments.
69
+ sends the resource and its arguments.
70
+ When a resource is *pushed*, the provisioner receives the resource data
71
+ as a stream with arguments.
86
72
 
87
- ![Resource Transfer](doc/mqtt-plus-4-resource-transfer.svg)
73
+ In contrast to the regular MQTT message publish/subscribe, this
74
+ pattern allows to transfer arbitrary amounts of arbitrary data by
75
+ chunking the data via a stream.
76
+
77
+ ![Resource Transfer](doc/mqtt-plus-3-resource-transfer.svg)
88
78
 
89
79
  Usage
90
80
  -----
@@ -92,7 +82,7 @@ Usage
92
82
  ### API:
93
83
 
94
84
  The API type defines the available endpoints. Use the marker types
95
- `Event<T>`, `Stream<T>`, and `Service<T>` to declare the communication
85
+ `Event<T>`, `Service<T>`, and `Resource<T>` to declare the communication
96
86
  pattern of each endpoint:
97
87
 
98
88
  ```ts
@@ -100,16 +90,15 @@ import type * as MQTTpt from "mqtt-plus"
100
90
 
101
91
  export type API = {
102
92
  "example/sample": MQTTpt.Event<(a1: string, a2: number) => void>
103
- "example/upload": MQTTpt.Stream<(name: string) => void>
104
93
  "example/hello": MQTTpt.Service<(a1: string, a2: number) => string>
105
94
  "example/resource": MQTTpt.Resource<(filename: string) => void>
106
95
  }
107
96
  ```
108
97
 
109
98
  The marker types ensure that `subscribe()` and `emit()` only accept
110
- `Event<T>` endpoints, `attach()` and `transfer()` only accept
111
- `Stream<T>` endpoints, and `register()` and `call()` only accept
112
- `Service<T>` endpoints.
99
+ `Event<T>` endpoints, `register()` and `call()` only accept
100
+ `Service<T>` endpoints, and `provision()`, `fetch()` and `push()` only
101
+ accept `Resource<T>` endpoints.
113
102
 
114
103
  ### Server:
115
104
 
@@ -178,18 +167,27 @@ The **MQTT+** API provides the following methods:
178
167
  The `mqtt` is the [MQTT.js](https://www.npmjs.com/package/mqtt) instance,
179
168
  which has to be established separately.
180
169
 
170
+ Use `destroy()` to clean up when the instance is no longer needed.
171
+
181
172
  The optional `options` object supports the following fields:
182
173
  - `id`: Custom MQTT peer identifier (default: auto-generated NanoID).
183
174
  - `codec`: Encoding format (default: `cbor`).
184
175
  - `timeout`: Communication timeout in milliseconds (default: `10000`).
185
- - `chunkSize`: Chunk size in bytes for stream transfers (default: `16384`).
176
+ - `chunkSize`: Chunk size in bytes for resource transfers (default: `16384`).
186
177
  - `topicMake`: Custom topic generation function.
187
- The `operation` parameter is one of: `event-emission`, `stream-transfer`, `service-call-request`, `service-call-response`, `resource-transfer-request`, `resource-transfer-response`.
178
+ The `operation` parameter is one of: `event-emission`, `service-call-request`, `service-call-response`, `resource-transfer-request`, `resource-transfer-response`.
188
179
  (default: `` (name, operation, peerId) => `${name}/${operation}` + (peerId ? `/${peerId}` : "/any") ``)
189
180
  - `topicMatch`: Custom topic matching function.
190
181
  Returns `{ name, operation, peerId? }` or `null` if no match. The `peerId` is `undefined` for broadcast topics (ending with `/any`).
191
182
  (default: `` (topic) => { const m = topic.match(/^(.+)\/([^/]+)\/([^/]+)$/); return m ? { name: m[1], operation: m[2], peerId: m[3] === "any" ? undefined : m[3] } : null } ``)
192
183
 
184
+ - **Destruction**:<br/>
185
+
186
+ destroy(): void
187
+
188
+ Clean up the MQTT+ instance by removing all event listeners.
189
+ Call this method when the instance is no longer needed.
190
+
193
191
  - **Event Subscription**:<br/>
194
192
 
195
193
  /* (simplified TypeScript API method signature) */
@@ -213,30 +211,6 @@ The **MQTT+** API provides the following methods:
213
211
  `${event}/event-emission/${peerId}`) are subscribed. Returns a
214
212
  `Subscription` object with an `unsubscribe()` method.
215
213
 
216
- - **Stream Attachment**:<br/>
217
-
218
- /* (simplified TypeScript API method signature) */
219
- attach(
220
- stream: string,
221
- options?: MQTT::IClientSubscribeOptions
222
- callback: (
223
- ...params: any[],
224
- info: { sender: string, receiver?: string, stream: stream.Readable }
225
- ) => void
226
- ): Promise<Attachment>
227
-
228
- Attach to (observe) a stream.
229
- The `stream` has to be a valid MQTT topic name.
230
- The optional `options` allows setting MQTT.js `subscribe()` options like `qos`.
231
- The `callback` is called with the `params` passed to a remote `transfer()`.
232
- The `info.stream` provides a Node.js `Readable` stream for consuming the transferred data.
233
- There is no return value of `callback`.
234
-
235
- Internally, on the MQTT broker, the topics generated by
236
- `topicMake(stream, "stream-transfer")` (default: `${stream}/stream-transfer/any` and
237
- `${stream}/stream-transfer/${peerId}`) are subscribed. Returns an
238
- `Attachment` object with an `unattach()` method.
239
-
240
214
  - **Service Registration**:<br/>
241
215
 
242
216
  /* (simplified TypeScript API method signature) */
@@ -268,20 +242,32 @@ The **MQTT+** API provides the following methods:
268
242
  options?: MQTT::IClientSubscribeOptions
269
243
  callback: (
270
244
  ...params: any[],
271
- info: { sender: string, receiver?: string, resource: Buffer | null }
245
+ info: {
246
+ sender: string,
247
+ receiver?: string,
248
+ resource: Buffer | Readable | null,
249
+ stream?: Readable,
250
+ buffer?: Promise<Buffer>
251
+ }
272
252
  ) => void
273
253
  ): Promise<Provisioning>
274
254
 
275
- Provision a resource.
255
+ Provision a resource for both fetch requests and pushed data.
276
256
  The `resource` has to be a valid MQTT topic name.
277
257
  The optional `options` allows setting MQTT.js `subscribe()` options like `qos`.
278
- The `callback` is called with the `params` passed to a remote `fetch()`.
279
- The `callback` should set `info.resource` to a `Buffer` containing the resource data.
258
+
259
+ For **fetch requests**: The `callback` is called with the `params` passed to a remote `fetch()`.
260
+ The `callback` should set `info.resource` to a `Buffer` or `Readable` containing the resource data.
261
+
262
+ For **pushed data**: The `callback` is called with the `params` passed to a remote `push()`.
263
+ The `info.stream` provides a Node.js `Readable` stream for consuming the pushed data.
264
+ The `info.buffer` provides a lazy `Promise<Buffer>` that resolves to the complete data once the stream ends.
280
265
 
281
266
  Internally, on the MQTT broker, the topics by
282
- `topicMake(resource, "resource-transfer-request")` (default: `${resource}/resource-transfer-request/any` and
283
- `${resource}/resource-transfer-request/${peerId}`) are subscribed. Returns a
284
- `Provisioning` object with an `unprovision()` method.
267
+ `topicMake(resource, "resource-transfer-request")` and `topicMake(resource, "resource-transfer-response")`
268
+ (default: `${resource}/resource-transfer-request/any`, `${resource}/resource-transfer-request/${peerId}`,
269
+ `${resource}/resource-transfer-response/any`, and `${resource}/resource-transfer-response/${peerId}`)
270
+ are subscribed. Returns a `Provisioning` object with an `unprovision()` method.
285
271
 
286
272
  - **Event Emission**:<br/>
287
273
 
@@ -303,33 +289,6 @@ The **MQTT+** API provides the following methods:
303
289
  Internally, publishes to the MQTT topic by `topicMake(event, "event-emission", peerId)`
304
290
  (default: `${event}/event-emission/any` or `${event}/event-emission/${peerId}`).
305
291
 
306
- - **Stream Transfer**:<br/>
307
-
308
- /* (simplified TypeScript API method signature) */
309
- transfer(
310
- stream: string,
311
- readable: stream.Readable,
312
- receiver?: Receiver,
313
- options?: MQTT::IClientPublishOptions,
314
- ...params: any[]
315
- ): Promise<void>
316
-
317
- Transfer a stream to all attachers or a specific attacher.
318
- The `readable` is a Node.js `Readable` stream providing the data to transfer.
319
- The optional `receiver` directs the transfer to a specific attacher only.
320
- The optional `options` allows setting MQTT.js `publish()` options like `qos` or `retain`.
321
-
322
- The data is read from `readable` in chunks (default: 16KB,
323
- configurable via `chunkSize` option) and sent over MQTT until the
324
- stream is closed. The returned `Promise` resolves when the entire
325
- stream has been transferred.
326
-
327
- The remote `attach()` `callback` is called with `params` and an `info` object
328
- containing a `stream.Readable` for consuming the transferred data.
329
-
330
- Internally, publishes to the MQTT topic by `topicMake(stream, "stream-transfer", peerId)`
331
- (default: `${stream}/stream-transfer/any` or `${stream}/stream-transfer/${peerId}`).
332
-
333
292
  - **Service Call**:<br/>
334
293
 
335
294
  /* (simplified TypeScript API method signature) */
@@ -352,36 +311,67 @@ The **MQTT+** API provides the following methods:
352
311
  (default: `${service}/service-call-response/${peerId}`) is temporarily subscribed
353
312
  for receiving the response.
354
313
 
355
- - **Resource Transfer**:<br/>
314
+ - **Resource Fetch**:<br/>
356
315
 
357
316
  /* (simplified TypeScript API method signature) */
358
317
  fetch(
359
- blob: string,
318
+ resource: string,
360
319
  receiver?: Receiver,
361
320
  options?: MQTT::IClientSubscribeOptions,
362
321
  ...params: any[]
363
- ): Promise<Buffer>
322
+ ): Promise<{ stream: Readable, buffer: Promise<Buffer> }>
364
323
 
365
324
  Fetches a resource from any resource provisioner or from a specific provisioner.
366
325
  The optional `receiver` directs the call to a specific provisioner only.
367
326
  The optional `options` allows setting MQTT.js `publish()` options like `qos` or `retain`.
368
327
 
369
- The remote `provision()` `callback` is called with `params` and its
370
- return value resolves the returned `Promise`. If the remote `callback`
371
- throws an exception, this rejects the returned `Promise`.
328
+ Returns an object with a `stream` (`Readable`) for consuming the transferred data
329
+ and a lazy `buffer` (`Promise<Buffer>`) that resolves to the complete data once the stream ends.
330
+
331
+ The remote `provision()` `callback` is called with `params` and
332
+ should set `info.resource` to a `Buffer` or `Readable` containing the resource data.
333
+ If the remote `callback` throws an exception, this destroys the stream with the error.
372
334
 
373
335
  Internally, on the MQTT broker, the topic by
374
336
  `topicMake(resource, "resource-transfer-response", peerId)` (default:
375
337
  `${resource}/resource-transfer-response/${peerId}`) is temporarily subscribed
376
338
  for receiving the response.
377
339
 
340
+ - **Resource Push**:<br/>
341
+
342
+ /* (simplified TypeScript API method signature) */
343
+ push(
344
+ resource: string,
345
+ streamOrBuffer: Readable | Buffer,
346
+ receiver?: Receiver,
347
+ options?: MQTT::IClientPublishOptions,
348
+ ...params: any[]
349
+ ): Promise<void>
350
+
351
+ Pushes a resource to all provisioners or a specific provisioner.
352
+ The `streamOrBuffer` is either a Node.js `Readable` stream or a `Buffer` providing the data to push.
353
+ The optional `receiver` directs the push to a specific provisioner only.
354
+ The optional `options` allows setting MQTT.js `publish()` options like `qos` or `retain`.
355
+
356
+ The data is read from `streamOrBuffer` in chunks (default: 16KB,
357
+ configurable via `chunkSize` option) and sent over MQTT until the
358
+ stream is closed or the buffer is fully transferred.
359
+ The returned `Promise` resolves when the entire data has been pushed.
360
+
361
+ The remote `provision()` `callback` is called with `params` and an `info` object
362
+ containing `stream` (`Readable`) for consuming the pushed data and
363
+ `buffer` (lazy `Promise<Buffer>`) that resolves to the complete data once the stream ends.
364
+
365
+ Internally, publishes to the MQTT topic by `topicMake(resource, "resource-transfer-response", peerId)`
366
+ (default: `${resource}/resource-transfer-response/any` or `${resource}/resource-transfer-response/${peerId}`).
367
+
378
368
  - **Receiver Wrapping**:<br/>
379
369
 
380
370
  receiver(
381
371
  id: string
382
372
  ): Receiver
383
373
 
384
- Wrap a receiver ID string for use with `emit()` or `call()` to direct the
374
+ Wrap a receiver ID string for use with `emit()`, `call()`, `fetch()` or `push()` to direct the
385
375
  message to a specific receiver. Returns a `Receiver` object.
386
376
 
387
377
  Internals
@@ -583,7 +573,7 @@ Notice
583
573
  > or CBOR (default), uses an own packet format (allowing sender and
584
574
  > receiver information), uses shorter NanoIDs instead of longer UUIDs
585
575
  > for identification of sender, receiver and requests, and additionally
586
- > provides stream transfer and resource transfer support.
576
+ > provides resource transfer support (with fetch and push capabilities).
587
577
 
588
578
  License
589
579
  -------
@@ -0,0 +1,32 @@
1
+
2
+ shape: sequence_diagram
3
+
4
+ client: "Client"
5
+ broker: "Broker"
6
+ server: "Server"
7
+
8
+ broker.class: brown
9
+
10
+ provision("foo/bar") {
11
+ server -> broker: "op: subscribe\ntopic: foo/bar/resource-transfer-request/any"
12
+ server -> broker: "op: subscribe\ntopic: foo/bar/resource-transfer-response/any"
13
+ }
14
+
15
+ push("foo/bar") {
16
+ client -> broker: "op: publish\ntopic: foo/bar/resource-transfer-response/any\ndata: Resource-Transfer-Response #1"
17
+ broker -> server: "op: publish\ntopic: foo/bar/resource-transfer-response/any\ndata: Resource-Transfer-Response #1"
18
+ client -> broker: "op: publish\ntopic: foo/bar/resource-transfer-response/any\ndata: Resource-Transfer-Response #N"
19
+ broker -> server: "op: publish\ntopic: foo/bar/resource-transfer-response/any\ndata: Resource-Transfer-Response #N"
20
+ client -> broker: "op: publish\ntopic: foo/bar/resource-transfer-response/any\ndata: Resource-Transfer-Response EoS"
21
+ broker -> server: "op: publish\ntopic: foo/bar/resource-transfer-response/any\ndata: Resource-Transfer-Response EoS"
22
+ }
23
+
24
+ fetch("foo/bar") {
25
+ client -> broker: "op: subscribe\ntopic: foo/bar/resource-transfer-response/XXX"
26
+ client -> broker: "op: publish\ntopic: foo/bar/resource-transfer-request/any\ndata: Resource-Transfer-Request"
27
+ broker -> server: "op: publish\ntopic: foo/bar/resource-transfer-request/any\ndata: Resource-Transfer-Request"
28
+ broker <- server: "op: publish\ntopic: foo/bar/resource-transfer-response/XXX\ndata: Resource-Transfer-Response #1"
29
+ client <- broker: "op: publish\ntopic: foo/bar/resource-transfer-response/XXX\ndata: Resource-Transfer-Response #1"
30
+ broker <- server: "op: publish\ntopic: foo/bar/resource-transfer-response/XXX\ndata: Resource-Transfer-Response #N"
31
+ client <- broker: "op: publish\ntopic: foo/bar/resource-transfer-response/XXX\ndata: Resource-Transfer-Response #N"
32
+ }
@@ -0,0 +1,116 @@
1
+ <?xml version="1.0" encoding="utf-8"?><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" data-d2-version="v0.7.0-HEAD" preserveAspectRatio="xMinYMin meet" viewBox="0 0 826 1987"><svg class="d2-3815173987 d2-svg" width="826" height="1987" viewBox="11 51 826 1987"><rect x="11.000000" y="51.000000" width="826.000000" height="1987.000000" rx="0.000000" fill="#ffffff" class=" fill-N7" stroke-width="0" /><style type="text/css"><![CDATA[
2
+ .d2-3815173987 .text {
3
+ font-family: "d2-3815173987-font-regular";
4
+ }
5
+ @font-face {
6
+ font-family: d2-3815173987-font-regular;
7
+ src: url("data:application/font-woff;base64,d09GRgABAAAAAA8YAAoAAAAAFvgAAguFAAAAAAAAAAAAAAAAAAAAAAAAAABPUy8yAAAA9AAAAGAAAABgXd/Vo2NtYXAAAAFUAAAAuAAAAQAFBgV+Z2x5ZgAAAgwAAAhXAAALPL7oEixoZWFkAAAKZAAAADYAAAA2G4Ue32hoZWEAAAqcAAAAJAAAACQKhAXsaG10eAAACsAAAACaAAAAqEcUCPhsb2Nh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CE+36czt8K1yxh7tXf9aZfLhHsf5XqnzKufSPpVQmJhnObdEhlINC9wTHgdZdQnXke7oMeEOPdwy07tCnT4cTBnR5rdwefRxf0+OEQ2V0hRd7R3LMCT/i+IauYnztxPqzUCzhFwpzdymOc91jRqGee+aB7prohndX2M9QvuaOUjlDzZGPdNIv05xFjM0VhRjO1MulN0rrX2yOmOkuXtubfT8NFzZ7yym+ItcMe7cuOHnlFow+pGpwyzOX+gmIiMk5VcSQnBktKq7E+y0R56Q4DtW9N5qSis51jj/nSi5JmIlBl0x15hT6G5lvQuM+XPO9s7ckVr5nenZ9q/uc4tSrG43eqXvLvdC6nKwo0DJV8xU3DcU1M+8nmqlV/qFyS71uOc/ok0j1VDe4/Q48J6DNDrvsM9E5Q+1c2BvR1jvR5hX76sEZiaJGcnViFXYJeMEuu7zixVrNDocc0GP/DhwXWT0OeH1rZ12nZRVndf4Um7b4Op5dr17eW6/P7+DLLzRRNy9jX9r4bl9YtRv/nxAx81zc1uqd3BOC/wAAAP//AQAA//8HW0wwAHicYmBmAIP/5xiMGLAAAAAAAP//AQAA//8vAQIDAAAA");
8
+ }
9
+ .d2-3815173987 .text-italic {
10
+ font-family: "d2-3815173987-font-italic";
11
+ }
12
+ @font-face {
13
+ font-family: d2-3815173987-font-italic;
14
+ src: url("data:application/font-woff;base64,d09GRgABAAAAAA+AAAoAAAAAF9gAARhRAAAAAAAAAAAAAAAAAAAAAAAAAABPUy8yAAAA9AAAAGAAAABgW1SVeGNtYXAAAAFUAAAAuAAAAQAFBgV+Z2x5ZgAAAgwAAAivAAAL/I4FX69oZWFkAAAKvAAAADYAAAA2G7Ur2mhoZWEAAAr0AAAAJAAAACQLeAjOaG10eAAACxgAAACmAAAAqETBBT5sb2NhAAALwAAAAFYAAABWSChFDG1heHAAAAwYAAAAIAAAACAAQgD2bmFtZQAADDgAAAMmAAAIMgntVzNwb3N0AAAPYAAAACAAAAAg/8YAMgADAeEBkAAFAAACigJY//EASwKKAlgARAFeADIBIwA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f55BIHfmJkB6v6PCGns5tunRpc0yPkJfy7dDF8R0djjmQRyi8uDuUYo75Bcf3hLLxsRPrz2JiCb9TmLpLcZypjimFeu6ZB6o1UYU3n7DfoXxNHaV8+tojb+k0v0x7FjMyVRRiOFUvl9oorX8DU8RUtfjZXt37bZjb7i23+IJcO+zVuuDkJ7dgdN1Ug/c0c66fgJgBOSey6JMzpUXFhXi/JuaMFMeBuvdKW1LRvvTxeS6kkoSpGIRkijOj0N/YdBMZ9/6a7p29JQP5e6anl1XdJotTr65m9EbdW95F1uVkZQItm2q+oqa+uGam/UQ7tco/km+p1y3nEaHiLnb7Q6/ADs/ZZY+xsvR1M7+886+Et9hTB05JZDWUpn0NjwnYJeApu+zynKfv9XLJxhkft8ZnNX+bA/bpsHdtNQvbDvu8XIv28cx/ie2O6nE8ujw9u/U0H9xAtd9o367eza4m56cxt2hX23FMzNRzcVurNbn7BP8DAAD//wEAAP//cqFRQAAAAAMAAP/1AAD/zgAyAAAAAAAAAAAAAAAAAAAAAAAAAAA=");
15
+ }]]></style><style type="text/css"><![CDATA[.shape {
16
+ shape-rendering: geometricPrecision;
17
+ stroke-linejoin: round;
18
+ }
19
+ .connection {
20
+ stroke-linecap: round;
21
+ stroke-linejoin: round;
22
+ }
23
+ .blend {
24
+ mix-blend-mode: multiply;
25
+ opacity: 0.5;
26
+ }
27
+
28
+ .d2-3815173987 .fill-N1{fill:#303030;}
29
+ .d2-3815173987 .fill-N2{fill:#606060;}
30
+ .d2-3815173987 .fill-N3{fill:#909090;}
31
+ .d2-3815173987 .fill-N4{fill:#c0c0c0;}
32
+ .d2-3815173987 .fill-N5{fill:#e0e0e0;}
33
+ .d2-3815173987 .fill-N6{fill:#f0f0f0;}
34
+ .d2-3815173987 .fill-N7{fill:#ffffff;}
35
+ .d2-3815173987 .fill-B1{fill:#336699;}
36
+ .d2-3815173987 .fill-B2{fill:#6699cc;}
37
+ .d2-3815173987 .fill-B3{fill:#99ccff;}
38
+ .d2-3815173987 .fill-B4{fill:#c0d0ff;}
39
+ .d2-3815173987 .fill-B5{fill:#e0f0ff;}
40
+ .d2-3815173987 .fill-B6{fill:#f0f8ff;}
41
+ .d2-3815173987 .fill-AA2{fill:#cfb098;}
42
+ .d2-3815173987 .fill-AA4{fill:#efd0b8;}
43
+ .d2-3815173987 .fill-AA5{fill:#ffe0c8;}
44
+ .d2-3815173987 .fill-AB4{fill:#efd0b8;}
45
+ .d2-3815173987 .fill-AB5{fill:#ffe0c8;}
46
+ .d2-3815173987 .stroke-N1{stroke:#303030;}
47
+ .d2-3815173987 .stroke-N2{stroke:#606060;}
48
+ .d2-3815173987 .stroke-N3{stroke:#909090;}
49
+ .d2-3815173987 .stroke-N4{stroke:#c0c0c0;}
50
+ .d2-3815173987 .stroke-N5{stroke:#e0e0e0;}
51
+ .d2-3815173987 .stroke-N6{stroke:#f0f0f0;}
52
+ .d2-3815173987 .stroke-N7{stroke:#ffffff;}
53
+ .d2-3815173987 .stroke-B1{stroke:#336699;}
54
+ .d2-3815173987 .stroke-B2{stroke:#6699cc;}
55
+ .d2-3815173987 .stroke-B3{stroke:#99ccff;}
56
+ .d2-3815173987 .stroke-B4{stroke:#c0d0ff;}
57
+ .d2-3815173987 .stroke-B5{stroke:#e0f0ff;}
58
+ .d2-3815173987 .stroke-B6{stroke:#f0f8ff;}
59
+ .d2-3815173987 .stroke-AA2{stroke:#cfb098;}
60
+ .d2-3815173987 .stroke-AA4{stroke:#efd0b8;}
61
+ .d2-3815173987 .stroke-AA5{stroke:#ffe0c8;}
62
+ .d2-3815173987 .stroke-AB4{stroke:#efd0b8;}
63
+ .d2-3815173987 .stroke-AB5{stroke:#ffe0c8;}
64
+ .d2-3815173987 .background-color-N1{background-color:#303030;}
65
+ .d2-3815173987 .background-color-N2{background-color:#606060;}
66
+ .d2-3815173987 .background-color-N3{background-color:#909090;}
67
+ .d2-3815173987 .background-color-N4{background-color:#c0c0c0;}
68
+ .d2-3815173987 .background-color-N5{background-color:#e0e0e0;}
69
+ .d2-3815173987 .background-color-N6{background-color:#f0f0f0;}
70
+ .d2-3815173987 .background-color-N7{background-color:#ffffff;}
71
+ .d2-3815173987 .background-color-B1{background-color:#336699;}
72
+ .d2-3815173987 .background-color-B2{background-color:#6699cc;}
73
+ .d2-3815173987 .background-color-B3{background-color:#99ccff;}
74
+ .d2-3815173987 .background-color-B4{background-color:#c0d0ff;}
75
+ .d2-3815173987 .background-color-B5{background-color:#e0f0ff;}
76
+ .d2-3815173987 .background-color-B6{background-color:#f0f8ff;}
77
+ .d2-3815173987 .background-color-AA2{background-color:#cfb098;}
78
+ .d2-3815173987 .background-color-AA4{background-color:#efd0b8;}
79
+ .d2-3815173987 .background-color-AA5{background-color:#ffe0c8;}
80
+ .d2-3815173987 .background-color-AB4{background-color:#efd0b8;}
81
+ .d2-3815173987 .background-color-AB5{background-color:#ffe0c8;}
82
+ .d2-3815173987 .color-N1{color:#303030;}
83
+ .d2-3815173987 .color-N2{color:#606060;}
84
+ .d2-3815173987 .color-N3{color:#909090;}
85
+ .d2-3815173987 .color-N4{color:#c0c0c0;}
86
+ .d2-3815173987 .color-N5{color:#e0e0e0;}
87
+ .d2-3815173987 .color-N6{color:#f0f0f0;}
88
+ .d2-3815173987 .color-N7{color:#ffffff;}
89
+ .d2-3815173987 .color-B1{color:#336699;}
90
+ .d2-3815173987 .color-B2{color:#6699cc;}
91
+ .d2-3815173987 .color-B3{color:#99ccff;}
92
+ .d2-3815173987 .color-B4{color:#c0d0ff;}
93
+ .d2-3815173987 .color-B5{color:#e0f0ff;}
94
+ .d2-3815173987 .color-B6{color:#f0f8ff;}
95
+ .d2-3815173987 .color-AA2{color:#cfb098;}
96
+ .d2-3815173987 .color-AA4{color:#efd0b8;}
97
+ .d2-3815173987 .color-AA5{color:#ffe0c8;}
98
+ .d2-3815173987 .color-AB4{color:#efd0b8;}
99
+ .d2-3815173987 .color-AB5{color:#ffe0c8;}.appendix text.text{fill:#303030}.md{--color-fg-default:#303030;--color-fg-muted:#606060;--color-fg-subtle:#909090;--color-canvas-default:#ffffff;--color-canvas-subtle:#f0f0f0;--color-border-default:#336699;--color-border-muted:#6699cc;--color-neutral-muted:#f0f0f0;--color-accent-fg:#6699cc;--color-accent-emphasis:#6699cc;--color-attention-subtle:#606060;--color-danger-fg:red;}.sketch-overlay-B1{fill:url(#streaks-dark-d2-3815173987);mix-blend-mode:overlay}.sketch-overlay-B2{fill:url(#streaks-normal-d2-3815173987);mix-blend-mode:color-burn}.sketch-overlay-B3{fill:url(#streaks-normal-d2-3815173987);mix-blend-mode:color-burn}.sketch-overlay-B4{fill:url(#streaks-normal-d2-3815173987);mix-blend-mode:color-burn}.sketch-overlay-B5{fill:url(#streaks-bright-d2-3815173987);mix-blend-mode:darken}.sketch-overlay-B6{fill:url(#streaks-bright-d2-3815173987);mix-blend-mode:darken}.sketch-overlay-AA2{fill:url(#streaks-normal-d2-3815173987);mix-blend-mode:color-burn}.sketch-overlay-AA4{fill:url(#streaks-normal-d2-3815173987);mix-blend-mode:color-burn}.sketch-overlay-AA5{fill:url(#streaks-bright-d2-3815173987);mix-blend-mode:darken}.sketch-overlay-AB4{fill:url(#streaks-normal-d2-3815173987);mix-blend-mode:color-burn}.sketch-overlay-AB5{fill:url(#streaks-bright-d2-3815173987);mix-blend-mode:darken}.sketch-overlay-N1{fill:url(#streaks-darker-d2-3815173987);mix-blend-mode:lighten}.sketch-overlay-N2{fill:url(#streaks-dark-d2-3815173987);mix-blend-mode:overlay}.sketch-overlay-N3{fill:url(#streaks-normal-d2-3815173987);mix-blend-mode:color-burn}.sketch-overlay-N4{fill:url(#streaks-normal-d2-3815173987);mix-blend-mode:color-burn}.sketch-overlay-N5{fill:url(#streaks-normal-d2-3815173987);mix-blend-mode:color-burn}.sketch-overlay-N6{fill:url(#streaks-bright-d2-3815173987);mix-blend-mode:darken}.sketch-overlay-N7{fill:url(#streaks-bright-d2-3815173987);mix-blend-mode:darken}.light-code{display: block}.dark-code{display: none}]]></style><g class="Y2xpZW50"><g class="shape" ><rect x="12.000000" y="52.000000" width="100.000000" height="66.000000" stroke="#336699" fill="#e0f0ff" class=" stroke-B1 fill-B5" style="stroke-width:2;" /></g><text x="62.000000" y="90.500000" fill="#303030" class="text fill-N1" style="text-anchor:middle;font-size:16px">Client</text></g><g class="YnJva2Vy brown"><g class="shape" ><rect x="374.000000" y="52.000000" width="100.000000" height="66.000000" stroke="#cfb098" fill="#ffe0c9" style="stroke-width:2;" /></g><text x="424.000000" y="90.500000" fill="#303030" class="text fill-N1" style="text-anchor:middle;font-size:16px">Broker</text></g><g class="c2VydmVy"><g class="shape" ><rect x="736.000000" y="52.000000" width="100.000000" height="66.000000" stroke="#336699" fill="#e0f0ff" class=" stroke-B1 fill-B5" style="stroke-width:2;" /></g><text x="786.000000" y="90.500000" fill="#303030" class="text fill-N1" style="text-anchor:middle;font-size:16px">Server</text></g><g class="KGNsaWVudCAtLSApWzBd"><path d="M 62.000000 120.000000 L 62.000000 2036.000000" stroke="#6699cc" fill="none" class="connection stroke-B2" style="stroke-width:2;stroke-dasharray:12.000000,11.838767;" mask="url(#d2-3815173987)" /></g><g class="KGJyb2tlciAtLSApWzBd"><path d="M 424.000000 120.000000 L 424.000000 2036.000000" stroke="#cfb098" fill="none" class="connection" style="stroke-width:2;stroke-dasharray:12.000000,11.838767;" mask="url(#d2-3815173987)" /></g><g class="KHNlcnZlciAtLSApWzBd"><path d="M 786.000000 120.000000 L 786.000000 2036.000000" stroke="#6699cc" fill="none" class="connection stroke-B2" style="stroke-width:2;stroke-dasharray:12.000000,11.838767;" mask="url(#d2-3815173987)" /></g><g class="JiMzOTtwcm92aXNpb24oJiMzNDtmb28vYmFyJiMzNDspJiMzOTs="><g class="shape blend" ><rect x="384.000000" y="175.000000" width="442.000000" height="198.000000" stroke="#336699" fill="#e0e0e0" class=" stroke-B1 fill-N5" style="stroke-width:0;" /></g><rect x="389.000000" y="180.000000" width="135.000000" height="21.000000" fill="#e0e0e0" class=" fill-N5" /><text x="456.500000" y="196.000000" fill="#303030" class="text fill-N1" style="text-anchor:middle;font-size:16px">provision(&#34;foo/bar&#34;)</text></g><g class="JiMzOTtwdXNoKCYjMzQ7Zm9vL2JhciYjMzQ7KSYjMzk7"><g class="shape blend" ><rect x="22.000000" y="418.000000" width="804.000000" height="718.000000" stroke="#336699" fill="#e0e0e0" class=" stroke-B1 fill-N5" style="stroke-width:0;" /></g><rect x="27.000000" y="423.000000" width="105.000000" height="21.000000" fill="#e0e0e0" class=" fill-N5" /><text x="79.500000" y="439.000000" fill="#303030" class="text fill-N1" style="text-anchor:middle;font-size:16px">push(&#34;foo/bar&#34;)</text></g><g class="JiMzOTtmZXRjaCgmIzM0O2Zvby9iYXImIzM0OykmIzM5Ow=="><g class="shape blend" ><rect x="22.000000" y="1181.000000" width="804.000000" height="824.000000" stroke="#336699" fill="#e0e0e0" class=" stroke-B1 fill-N5" style="stroke-width:0;" /></g><rect x="27.000000" y="1186.000000" width="107.000000" height="21.000000" fill="#e0e0e0" class=" fill-N5" /><text x="80.500000" y="1202.000000" fill="#303030" class="text fill-N1" style="text-anchor:middle;font-size:16px">fetch(&#34;foo/bar&#34;)</text></g><g class="KHNlcnZlciAtJmd0OyBicm9rZXIpWzBd"><marker id="mk-d2-3815173987-3488378134" markerWidth="10.000000" markerHeight="12.000000" refX="7.000000" refY="6.000000" viewBox="0.000000 0.000000 10.000000 12.000000" orient="auto" markerUnits="userSpaceOnUse"> <polygon points="0.000000,0.000000 10.000000,6.000000 0.000000,12.000000" fill="#336699" class="connection fill-B1" stroke-width="2" /> </marker><path d="M 784.000000 237.000000 L 428.000000 237.000000" stroke="#336699" fill="none" class="connection stroke-B1" style="stroke-width:2;" marker-end="url(#mk-d2-3815173987-3488378134)" mask="url(#d2-3815173987)" /><text x="605.500000" y="235.000000" fill="#606060" class="text-italic fill-N2" style="text-anchor:middle;font-size:16px"><tspan x="605.500000" dy="0.000000">op: subscribe</tspan><tspan x="605.500000" dy="18.500000">topic: foo/bar/resource-transfer-request/any</tspan></text></g><g class="KHNlcnZlciAtJmd0OyBicm9rZXIpWzFd"><path d="M 784.000000 343.000000 L 428.000000 343.000000" stroke="#336699" fill="none" class="connection stroke-B1" style="stroke-width:2;" marker-end="url(#mk-d2-3815173987-3488378134)" mask="url(#d2-3815173987)" /><text x="605.000000" y="341.000000" fill="#606060" class="text-italic fill-N2" style="text-anchor:middle;font-size:16px"><tspan x="605.000000" dy="0.000000">op: subscribe</tspan><tspan x="605.000000" dy="18.500000">topic: foo/bar/resource-transfer-response/any</tspan></text></g><g class="KGNsaWVudCAtJmd0OyBicm9rZXIpWzBd"><path d="M 64.000000 488.000000 L 420.000000 488.000000" stroke="#336699" fill="none" class="connection stroke-B1" style="stroke-width:2;" marker-end="url(#mk-d2-3815173987-3488378134)" mask="url(#d2-3815173987)" /><text x="243.000000" y="478.000000" fill="#606060" class="text-italic fill-N2" style="text-anchor:middle;font-size:16px"><tspan x="243.000000" dy="0.000000">op: publish</tspan><tspan x="243.000000" dy="17.666667">topic: foo/bar/resource-transfer-response/any</tspan><tspan x="243.000000" dy="17.666667">data: Resource-Transfer-Response #1</tspan></text></g><g class="KGJyb2tlciAtJmd0OyBzZXJ2ZXIpWzBd"><path d="M 426.000000 610.000000 L 782.000000 610.000000" stroke="#336699" fill="none" class="connection stroke-B1" style="stroke-width:2;" marker-end="url(#mk-d2-3815173987-3488378134)" mask="url(#d2-3815173987)" /><text x="605.000000" y="600.000000" fill="#606060" class="text-italic fill-N2" style="text-anchor:middle;font-size:16px"><tspan x="605.000000" dy="0.000000">op: publish</tspan><tspan x="605.000000" dy="17.666667">topic: foo/bar/resource-transfer-response/any</tspan><tspan x="605.000000" dy="17.666667">data: Resource-Transfer-Response #1</tspan></text></g><g class="KGNsaWVudCAtJmd0OyBicm9rZXIpWzFd"><path d="M 64.000000 732.000000 L 420.000000 732.000000" stroke="#336699" fill="none" class="connection stroke-B1" style="stroke-width:2;" marker-end="url(#mk-d2-3815173987-3488378134)" mask="url(#d2-3815173987)" /><text x="243.000000" y="722.000000" fill="#606060" class="text-italic fill-N2" style="text-anchor:middle;font-size:16px"><tspan x="243.000000" dy="0.000000">op: publish</tspan><tspan x="243.000000" dy="17.666667">topic: foo/bar/resource-transfer-response/any</tspan><tspan x="243.000000" dy="17.666667">data: Resource-Transfer-Response #N</tspan></text></g><g class="KGJyb2tlciAtJmd0OyBzZXJ2ZXIpWzFd"><path d="M 426.000000 854.000000 L 782.000000 854.000000" stroke="#336699" fill="none" class="connection stroke-B1" style="stroke-width:2;" marker-end="url(#mk-d2-3815173987-3488378134)" mask="url(#d2-3815173987)" /><text x="605.000000" y="844.000000" fill="#606060" class="text-italic fill-N2" style="text-anchor:middle;font-size:16px"><tspan x="605.000000" dy="0.000000">op: publish</tspan><tspan x="605.000000" dy="17.666667">topic: foo/bar/resource-transfer-response/any</tspan><tspan x="605.000000" dy="17.666667">data: Resource-Transfer-Response #N</tspan></text></g><g class="KGNsaWVudCAtJmd0OyBicm9rZXIpWzJd"><path d="M 64.000000 976.000000 L 420.000000 976.000000" stroke="#336699" fill="none" class="connection stroke-B1" style="stroke-width:2;" marker-end="url(#mk-d2-3815173987-3488378134)" mask="url(#d2-3815173987)" /><text x="243.000000" y="966.000000" fill="#606060" class="text-italic fill-N2" style="text-anchor:middle;font-size:16px"><tspan x="243.000000" dy="0.000000">op: publish</tspan><tspan x="243.000000" dy="17.666667">topic: foo/bar/resource-transfer-response/any</tspan><tspan x="243.000000" dy="17.666667">data: Resource-Transfer-Response EoS</tspan></text></g><g class="KGJyb2tlciAtJmd0OyBzZXJ2ZXIpWzJd"><path d="M 426.000000 1098.000000 L 782.000000 1098.000000" stroke="#336699" fill="none" class="connection stroke-B1" style="stroke-width:2;" marker-end="url(#mk-d2-3815173987-3488378134)" mask="url(#d2-3815173987)" /><text x="605.000000" y="1088.000000" fill="#606060" class="text-italic fill-N2" style="text-anchor:middle;font-size:16px"><tspan x="605.000000" dy="0.000000">op: publish</tspan><tspan x="605.000000" dy="17.666667">topic: foo/bar/resource-transfer-response/any</tspan><tspan x="605.000000" dy="17.666667">data: Resource-Transfer-Response EoS</tspan></text></g><g class="KGNsaWVudCAtJmd0OyBicm9rZXIpWzNd"><path d="M 64.000000 1243.000000 L 420.000000 1243.000000" stroke="#336699" fill="none" class="connection stroke-B1" style="stroke-width:2;" marker-end="url(#mk-d2-3815173987-3488378134)" mask="url(#d2-3815173987)" /><text x="243.000000" y="1241.000000" fill="#606060" class="text-italic fill-N2" style="text-anchor:middle;font-size:16px"><tspan x="243.000000" dy="0.000000">op: subscribe</tspan><tspan x="243.000000" dy="18.500000">topic: foo/bar/resource-transfer-response/XXX</tspan></text></g><g class="KGNsaWVudCAtJmd0OyBicm9rZXIpWzRd"><path d="M 64.000000 1357.000000 L 420.000000 1357.000000" stroke="#336699" fill="none" class="connection stroke-B1" style="stroke-width:2;" marker-end="url(#mk-d2-3815173987-3488378134)" mask="url(#d2-3815173987)" /><text x="243.500000" y="1347.000000" fill="#606060" class="text-italic fill-N2" style="text-anchor:middle;font-size:16px"><tspan x="243.500000" dy="0.000000">op: publish</tspan><tspan x="243.500000" dy="17.666667">topic: foo/bar/resource-transfer-request/any</tspan><tspan x="243.500000" dy="17.666667">data: Resource-Transfer-Request</tspan></text></g><g class="KGJyb2tlciAtJmd0OyBzZXJ2ZXIpWzNd"><path d="M 426.000000 1479.000000 L 782.000000 1479.000000" stroke="#336699" fill="none" class="connection stroke-B1" style="stroke-width:2;" marker-end="url(#mk-d2-3815173987-3488378134)" mask="url(#d2-3815173987)" /><text x="605.500000" y="1469.000000" fill="#606060" class="text-italic fill-N2" style="text-anchor:middle;font-size:16px"><tspan x="605.500000" dy="0.000000">op: publish</tspan><tspan x="605.500000" dy="17.666667">topic: foo/bar/resource-transfer-request/any</tspan><tspan x="605.500000" dy="17.666667">data: Resource-Transfer-Request</tspan></text></g><g class="KGJyb2tlciAmbHQ7LSBzZXJ2ZXIpWzBd"><marker id="mk-d2-3815173987-2451250203" markerWidth="10.000000" markerHeight="12.000000" refX="3.000000" refY="6.000000" viewBox="0.000000 0.000000 10.000000 12.000000" orient="auto" markerUnits="userSpaceOnUse"> <polygon points="10.000000,0.000000 0.000000,6.000000 10.000000,12.000000" fill="#336699" class="connection fill-B1" stroke-width="2" /> </marker><path d="M 428.000000 1601.000000 L 784.000000 1601.000000" stroke="#336699" fill="none" class="connection stroke-B1" style="stroke-width:2;" marker-start="url(#mk-d2-3815173987-2451250203)" mask="url(#d2-3815173987)" /><text x="605.000000" y="1591.000000" fill="#606060" class="text-italic fill-N2" style="text-anchor:middle;font-size:16px"><tspan x="605.000000" dy="0.000000">op: publish</tspan><tspan x="605.000000" dy="17.666667">topic: foo/bar/resource-transfer-response/XXX</tspan><tspan x="605.000000" dy="17.666667">data: Resource-Transfer-Response #1</tspan></text></g><g class="KGNsaWVudCAmbHQ7LSBicm9rZXIpWzBd"><path d="M 66.000000 1723.000000 L 422.000000 1723.000000" stroke="#336699" fill="none" class="connection stroke-B1" style="stroke-width:2;" marker-start="url(#mk-d2-3815173987-2451250203)" mask="url(#d2-3815173987)" /><text x="243.000000" y="1713.000000" fill="#606060" class="text-italic fill-N2" style="text-anchor:middle;font-size:16px"><tspan x="243.000000" dy="0.000000">op: publish</tspan><tspan x="243.000000" dy="17.666667">topic: foo/bar/resource-transfer-response/XXX</tspan><tspan x="243.000000" dy="17.666667">data: Resource-Transfer-Response #1</tspan></text></g><g class="KGJyb2tlciAmbHQ7LSBzZXJ2ZXIpWzFd"><path d="M 428.000000 1845.000000 L 784.000000 1845.000000" stroke="#336699" fill="none" class="connection stroke-B1" style="stroke-width:2;" marker-start="url(#mk-d2-3815173987-2451250203)" mask="url(#d2-3815173987)" /><text x="605.000000" y="1835.000000" fill="#606060" class="text-italic fill-N2" style="text-anchor:middle;font-size:16px"><tspan x="605.000000" dy="0.000000">op: publish</tspan><tspan x="605.000000" dy="17.666667">topic: foo/bar/resource-transfer-response/XXX</tspan><tspan x="605.000000" dy="17.666667">data: Resource-Transfer-Response #N</tspan></text></g><g class="KGNsaWVudCAmbHQ7LSBicm9rZXIpWzFd"><path d="M 66.000000 1967.000000 L 422.000000 1967.000000" stroke="#336699" fill="none" class="connection stroke-B1" style="stroke-width:2;" marker-start="url(#mk-d2-3815173987-2451250203)" mask="url(#d2-3815173987)" /><text x="243.000000" y="1957.000000" fill="#606060" class="text-italic fill-N2" style="text-anchor:middle;font-size:16px"><tspan x="243.000000" dy="0.000000">op: publish</tspan><tspan x="243.000000" dy="17.666667">topic: foo/bar/resource-transfer-response/XXX</tspan><tspan x="243.000000" dy="17.666667">data: Resource-Transfer-Response #N</tspan></text></g><mask id="d2-3815173987" maskUnits="userSpaceOnUse" x="11" y="51" width="826" height="1987">
100
+ <rect x="11" y="51" width="826" height="1987" fill="white"></rect>
101
+ <rect x="457.000000" y="219.000000" width="297" height="37" fill="black"></rect>
102
+ <rect x="452.000000" y="325.000000" width="306" height="37" fill="black"></rect>
103
+ <rect x="90.000000" y="462.000000" width="306" height="53" fill="black"></rect>
104
+ <rect x="452.000000" y="584.000000" width="306" height="53" fill="black"></rect>
105
+ <rect x="90.000000" y="706.000000" width="306" height="53" fill="black"></rect>
106
+ <rect x="452.000000" y="828.000000" width="306" height="53" fill="black"></rect>
107
+ <rect x="90.000000" y="950.000000" width="306" height="53" fill="black"></rect>
108
+ <rect x="452.000000" y="1072.000000" width="306" height="53" fill="black"></rect>
109
+ <rect x="90.000000" y="1225.000000" width="306" height="37" fill="black"></rect>
110
+ <rect x="95.000000" y="1331.000000" width="297" height="53" fill="black"></rect>
111
+ <rect x="457.000000" y="1453.000000" width="297" height="53" fill="black"></rect>
112
+ <rect x="452.000000" y="1575.000000" width="306" height="53" fill="black"></rect>
113
+ <rect x="90.000000" y="1697.000000" width="306" height="53" fill="black"></rect>
114
+ <rect x="452.000000" y="1819.000000" width="306" height="53" fill="black"></rect>
115
+ <rect x="90.000000" y="1941.000000" width="306" height="53" fill="black"></rect>
116
+ </mask></svg></svg>
@@ -1,22 +1,17 @@
1
1
  type Brand<T> = T & {
2
2
  readonly __brand: unique symbol;
3
3
  };
4
- export type APIEndpoint = APIEndpointEvent | APIEndpointStream | APIEndpointService | APIEndpointResource;
4
+ export type APIEndpoint = APIEndpointEvent | APIEndpointService | APIEndpointResource;
5
5
  export type APIEndpointEvent = (...args: any[]) => void;
6
- export type APIEndpointStream = (...args: any[]) => void;
7
6
  export type APIEndpointService = (...args: any[]) => any;
8
7
  export type APIEndpointResource = (...args: any[]) => void;
9
8
  export type Event<T extends APIEndpointEvent> = Brand<T>;
10
- export type Stream<T extends APIEndpointStream> = Brand<T>;
11
9
  export type Service<T extends APIEndpointService> = Brand<T>;
12
10
  export type Resource<T extends APIEndpointResource> = Brand<T>;
13
11
  export type APISchema = Record<string, APIEndpoint>;
14
12
  export type EventKeys<T> = string extends keyof T ? string : {
15
13
  [K in keyof T]: T[K] extends Event<infer _F> ? K : never;
16
14
  }[keyof T];
17
- export type StreamKeys<T> = string extends keyof T ? string : {
18
- [K in keyof T]: T[K] extends Stream<infer _F> ? K : never;
19
- }[keyof T];
20
15
  export type ServiceKeys<T> = string extends keyof T ? string : {
21
16
  [K in keyof T]: T[K] extends Service<infer _F> ? K : never;
22
17
  }[keyof T];
@@ -109,6 +109,6 @@ export class BaseTrait extends ReceiverTrait {
109
109
  this._dispatchMessage(topic, parsed);
110
110
  }
111
111
  /* dispatch parsed message to appropriate handler
112
- (base implementation, to be overridden in super-traits) */
112
+ (base implementation, to be overridden in sub-traits) */
113
113
  _dispatchMessage(_topic, _parsed) { }
114
114
  }
@@ -1,16 +1,15 @@
1
- import stream from "stream";
1
+ import { Readable } from "stream";
2
2
  export interface InfoBase {
3
3
  sender: string;
4
4
  receiver?: string;
5
5
  }
6
6
  export interface InfoEvent extends InfoBase {
7
7
  }
8
- export interface InfoStream extends InfoBase {
9
- stream: stream.Readable;
10
- }
11
8
  export interface InfoService extends InfoBase {
12
9
  }
13
10
  export interface InfoResource extends InfoBase {
14
- resource: Buffer | null;
11
+ resource: Buffer | Readable | null;
12
+ stream?: Readable;
13
+ buffer?: Promise<Buffer>;
15
14
  }
16
15
  export type WithInfo<F, I extends InfoBase> = F extends (...args: infer P) => infer R ? (...args: [...P, info: I]) => R : never;
@@ -12,12 +12,6 @@ export declare class EventEmission extends Base {
12
12
  params?: any[] | undefined;
13
13
  constructor(id: string, event: string, params?: any[] | undefined, sender?: string, receiver?: string);
14
14
  }
15
- export declare class StreamTransfer extends Base {
16
- stream: string;
17
- chunk: Buffer | null;
18
- params?: any[] | undefined;
19
- constructor(id: string, stream: string, chunk: Buffer | null, params?: any[] | undefined, sender?: string, receiver?: string);
20
- }
21
15
  export declare class ServiceCallRequest extends Base {
22
16
  service: string;
23
17
  params?: any[] | undefined;
@@ -34,19 +28,20 @@ export declare class ResourceTransferRequest extends Base {
34
28
  constructor(id: string, resource: string, params?: any[] | undefined, sender?: string, receiver?: string);
35
29
  }
36
30
  export declare class ResourceTransferResponse extends Base {
37
- chunk: Buffer | undefined;
38
- error: string | undefined;
39
- final: boolean | undefined;
40
- constructor(id: string, chunk: Buffer | undefined, error: string | undefined, final: boolean | undefined, sender?: string, receiver?: string);
31
+ resource?: string | undefined;
32
+ params?: any[] | undefined;
33
+ chunk?: Buffer | undefined;
34
+ error?: string | undefined;
35
+ final?: boolean | undefined;
36
+ constructor(id: string, resource?: string | undefined, params?: any[] | undefined, chunk?: Buffer | undefined, error?: string | undefined, final?: boolean | undefined, sender?: string, receiver?: string);
41
37
  }
42
38
  export default class Msg {
43
39
  makeEventEmission(id: string, event: string, params?: any[], sender?: string, receiver?: string): EventEmission;
44
- makeStreamTransfer(id: string, stream: string, chunk: Buffer | null, params?: any[], sender?: string, receiver?: string): StreamTransfer;
45
40
  makeServiceCallRequest(id: string, service: string, params?: any[], sender?: string, receiver?: string): ServiceCallRequest;
46
41
  makeServiceCallResponse(id: string, result?: any, error?: string, sender?: string, receiver?: string): ServiceCallResponse;
47
42
  makeResourceTransferRequest(id: string, resource: string, params?: any[], sender?: string, receiver?: string): ResourceTransferRequest;
48
- makeResourceTransferResponse(id: string, chunk?: Buffer, error?: string, final?: boolean, sender?: string, receiver?: string): ResourceTransferResponse;
49
- parse(obj: any): EventEmission | StreamTransfer | ServiceCallRequest | ServiceCallResponse | ResourceTransferRequest | ResourceTransferResponse;
43
+ makeResourceTransferResponse(id: string, resource?: string, params?: any[], chunk?: Buffer, error?: string, final?: boolean, sender?: string, receiver?: string): ResourceTransferResponse;
44
+ parse(obj: any): EventEmission | ServiceCallRequest | ServiceCallResponse | ResourceTransferRequest | ResourceTransferResponse;
50
45
  }
51
46
  export declare class MsgTrait<T extends APISchema = APISchema> extends CodecTrait<T> {
52
47
  protected msg: Msg;