@fedify/fedify 1.0.0-dev.404 → 1.0.0-dev.407

Sign up to get free protection for your applications and to get access to all the features.
package/CHANGES.md CHANGED
@@ -60,8 +60,8 @@ To be released.
60
60
  - Passing `{ handle: string }` to `Context.getDocumentLoader()` method is
61
61
  deprecated in favor of `{ username: string }`.
62
62
  - The type of `Context.sendActivity()` method's first parameter became
63
- `SenderKeyPair | SenderKeyPair[] | { identifier: string } | { handle:
64
- string }` (was `SenderKeyPair | SenderKeyPair[] | { handle: string }`).
63
+ `SenderKeyPair | SenderKeyPair[] | { identifier: string } | {
64
+ username: string } | { handle: string }` (was `SenderKeyPair | SenderKeyPair[] | { handle: string }`).
65
65
  - All properties of `ParseUriResult` type became readonly.
66
66
  - Added `identifier` properties next to `handle` properties in
67
67
  `ParseUriResult` type.
@@ -109,10 +109,14 @@ To be released.
109
109
  the activity to be sent only once. It had added Object Integrity Proofs
110
110
  to the activity for every recipient before.
111
111
 
112
+ - Added `ParallelMessageQueue` class. [[#106]]
113
+
112
114
  - WebFinger responses now include <http://webfinger.net/rel/avatar> links
113
115
  if the `Actor` object returned by the actor dispatcher has `icon`/`icons`
114
116
  property.
115
117
 
118
+ - `DenoKvMessageQueue` now implements `Disposable` interface.
119
+
116
120
  - The `fedify inbox` command now sends `Delete(Application)` activities when
117
121
  it's terminated so that the peers can clean up data related to the temporary
118
122
  actor. [[#135]]
@@ -123,6 +127,7 @@ To be released.
123
127
  - `["fedify", "sig", "ld"]`
124
128
 
125
129
  [Linked Data Signatures]: https://web.archive.org/web/20170923124140/https://w3c-dvcg.github.io/ld-signatures/
130
+ [#106]: https://github.com/dahlia/fedify/issues/106
126
131
  [#135]: https://github.com/dahlia/fedify/issues/135
127
132
  [#137]: https://github.com/dahlia/fedify/issues/137
128
133
 
@@ -1161,7 +1161,7 @@ export class FederationImpl {
1161
1161
  }
1162
1162
  }
1163
1163
  }
1164
- class ContextImpl {
1164
+ export class ContextImpl {
1165
1165
  url;
1166
1166
  federation;
1167
1167
  data;
@@ -1,4 +1,10 @@
1
1
  // deno-lint-ignore-file no-explicit-any
2
+ /**
3
+ * Additional options for enqueuing a message in a queue.
4
+ *
5
+ * @since 0.5.0
6
+ */
7
+ import * as dntShim from "../_dnt.shims.js";
2
8
  /**
3
9
  * A message queue that processes messages in the same process.
4
10
  * Do not use this in production as it does not persist messages.
@@ -7,9 +13,6 @@
7
13
  */
8
14
  export class InProcessMessageQueue {
9
15
  #handlers = [];
10
- /**
11
- * {@inheritDoc Queue.enqueue}
12
- */
13
16
  enqueue(message, options) {
14
17
  const delay = options?.delay == null
15
18
  ? 0
@@ -20,10 +23,65 @@ export class InProcessMessageQueue {
20
23
  }, delay);
21
24
  return Promise.resolve();
22
25
  }
26
+ listen(handler) {
27
+ this.#handlers.push(handler);
28
+ }
29
+ }
30
+ /**
31
+ * A message queue that processes messages in parallel. It takes another
32
+ * {@link MessageQueue}, and processes messages in parallel up to a certain
33
+ * number of workers.
34
+ *
35
+ * Actually, it's rather a decorator than a queue itself.
36
+ *
37
+ * Note that the workers do not run in truly parallel, in the sense that they
38
+ * are not running in separate threads or processes. They are running in the
39
+ * same process, but are scheduled to run in parallel. Hence, this is useful
40
+ * for I/O-bound tasks, but not for CPU-bound tasks, which is okay for Fedify's
41
+ * workloads.
42
+ *
43
+ * @since 1.0.0
44
+ */
45
+ export class ParallelMessageQueue {
46
+ queue;
47
+ workers;
23
48
  /**
24
- * {@inheritDoc Queue.listen}
49
+ * Constructs a new {@link ParallelMessageQueue} with the given queue and
50
+ * number of workers.
51
+ * @param queue The message queue to use under the hood. Note that
52
+ * {@link ParallelMessageQueue} cannot be nested.
53
+ * @param workers The number of workers to process messages in parallel.
54
+ * @throws {TypeError} If the given queue is an instance of
55
+ * {@link ParallelMessageQueue}.
25
56
  */
57
+ constructor(queue, workers) {
58
+ if (queue instanceof ParallelMessageQueue) {
59
+ throw new TypeError("Cannot nest ParallelMessageQueue.");
60
+ }
61
+ this.queue = queue;
62
+ this.workers = workers;
63
+ }
64
+ enqueue(message, options) {
65
+ return this.queue.enqueue(message, options);
66
+ }
26
67
  listen(handler) {
27
- this.#handlers.push(handler);
68
+ const workers = new Map();
69
+ this.queue.listen(async (message) => {
70
+ while (workers.size >= this.workers) {
71
+ const consumedId = await Promise.any(workers.values());
72
+ workers.delete(consumedId);
73
+ }
74
+ const workerId = dntShim.crypto.randomUUID();
75
+ const promise = this.#work(workerId, handler, message);
76
+ workers.set(workerId, promise);
77
+ });
78
+ }
79
+ async #work(workerId, handler, message) {
80
+ await this.#sleep(0);
81
+ await handler(message);
82
+ return workerId;
83
+ }
84
+ #sleep(ms) {
85
+ return new Promise((resolve) => setTimeout(resolve, ms));
28
86
  }
29
87
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fedify/fedify",
3
- "version": "1.0.0-dev.404+6397ee14",
3
+ "version": "1.0.0-dev.407+a9266a09",
4
4
  "description": "An ActivityPub server framework",
5
5
  "keywords": [
6
6
  "ActivityPub",
@@ -226,7 +226,7 @@ export interface Context<TContextData> {
226
226
  } | {
227
227
  username: string;
228
228
  } | {
229
- identifier: string;
229
+ handle: string;
230
230
  }, recipients: Recipient | Recipient[], activity: Activity, options?: SendActivityOptions): Promise<void>;
231
231
  /**
232
232
  * Sends an activity to the outboxes of the sender's followers.
@@ -1 +1 @@
1
- {"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../src/federation/context.ts"],"names":[],"mappings":";;AAAA,OAAO,KAAK,OAAO,MAAM,kBAAkB,CAAC;AAC5C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,KAAK,EACV,QAAQ,EACR,gBAAgB,EAChB,QAAQ,EACR,MAAM,EACP,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EAAE,a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O,CAAC;IACvB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB;AACD;;;GAGG;GACD;IACA,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC;IAC1B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB;AACD;;;GAGG;GACD;IACA,QAAQ,CAAC,IAAI,EAAE,cAAc,CAAC;IAC9B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB,CAAC;AAEJ;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAE5B;;;;;;OAMG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;;;;;;OAOG;IACH,eAAe,CAAC,EAAE,GAAG,EAAE,CAAC;CACzB;AAED;;;GAGG;AACH,MAAM,WAAW,sBAAuB,SAAQ,mBAAmB;IACjE;;;;;;;OAOG;IACH,cAAc,EAAE,OAAO,CAAC;CACzB;AAED;;;GAGG;AACH,MAAM,WAAW,YAAa,SAAQ,OAAO,CAAC,aAAa;IACzD;;OAEG;IACH,KAAK,EAAE,GAAG,CAAC;IAEX;;OAEG;IACH,gBAAgB,EAAE,gBAAgB,CAAC;IAEnC;;OAEG;IACH,QAAQ,EAAE,QAAQ,CAAC;CACpB"}
@@ -230,7 +230,7 @@ interface ContextOptions<TContextData> {
230
230
  identifier: string;
231
231
  };
232
232
  }
233
- declare class ContextImpl<TContextData> implements Context<TContextData> {
233
+ export declare class ContextImpl<TContextData> implements Context<TContextData> {
234
234
  readonly url: URL;
235
235
  readonly federation: FederationImpl<TContextData>;
236
236
  readonly data: TContextData;
@@ -1 +1 @@
1
- {"version":3,"file":"middleware.d.ts","sourceRoot":"","sources":["../../src/federation/middleware.ts"],"names":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b,SAAS,EACL;QAAE,UAAU,EAAE,MAAM,CAAA;KAAE,GACtB;QAAE,QAAQ,EAAE,MAAM,CAAA;KAAE,GACpB;QAAE,MAAM,EAAE,MAAM,CAAA;KAAE,EACtB,UAAU,EAAE,WAAW,EACvB,OAAO,CAAC,EAAE,sBAAsB,GAC/B,OAAO,CAAC,IAAI,CAAC;CAqKjB;AAED,UAAU,cAAc,CAAC,YAAY;IACnC,UAAU,CAAC,EAAE,eAAe,CAAC,YAAY,CAAC,CAAC;IAC3C,kBAAkB,CAAC,EAAE,uBAAuB,CAAC,YAAY,CAAC,CAAC;IAC3D,YAAY,CAAC,EAAE,iBAAiB,CAAC,YAAY,CAAC,CAAC;IAC/C,kBAAkB,CAAC,EAAE,kBAAkB,CAAC,YAAY,CAAC,CAAC;CACvD;AAED,UAAU,eAAe,CAAC,YAAY,EAAE,MAAM,SAAS,MAAM;IAC3D,UAAU,EAAE,gBAAgB,CAAC,YAAY,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IAC3D,UAAU,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IACxB,kBAAkB,CAAC,EAAE,wBAAwB,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC;CACrE;AAED,UAAU,2BAA2B,CAAC,YAAY,CAChD,SAAQ,mBAAmB;IAC3B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,WAAW,EAAE,YAAY,CAAC;CAC3B"}
@@ -38,13 +38,39 @@ export interface MessageQueue {
38
38
  */
39
39
  export declare class InProcessMessageQueue implements MessageQueue {
40
40
  #private;
41
- /**
42
- * {@inheritDoc Queue.enqueue}
43
- */
44
41
  enqueue(message: any, options?: MessageQueueEnqueueOptions): Promise<void>;
42
+ listen(handler: (message: any) => Promise<void> | void): void;
43
+ }
44
+ /**
45
+ * A message queue that processes messages in parallel. It takes another
46
+ * {@link MessageQueue}, and processes messages in parallel up to a certain
47
+ * number of workers.
48
+ *
49
+ * Actually, it's rather a decorator than a queue itself.
50
+ *
51
+ * Note that the workers do not run in truly parallel, in the sense that they
52
+ * are not running in separate threads or processes. They are running in the
53
+ * same process, but are scheduled to run in parallel. Hence, this is useful
54
+ * for I/O-bound tasks, but not for CPU-bound tasks, which is okay for Fedify's
55
+ * workloads.
56
+ *
57
+ * @since 1.0.0
58
+ */
59
+ export declare class ParallelMessageQueue implements MessageQueue {
60
+ #private;
61
+ readonly queue: MessageQueue;
62
+ readonly workers: number;
45
63
  /**
46
- * {@inheritDoc Queue.listen}
64
+ * Constructs a new {@link ParallelMessageQueue} with the given queue and
65
+ * number of workers.
66
+ * @param queue The message queue to use under the hood. Note that
67
+ * {@link ParallelMessageQueue} cannot be nested.
68
+ * @param workers The number of workers to process messages in parallel.
69
+ * @throws {TypeError} If the given queue is an instance of
70
+ * {@link ParallelMessageQueue}.
47
71
  */
72
+ constructor(queue: MessageQueue, workers: number);
73
+ enqueue(message: any, options?: MessageQueueEnqueueOptions): Promise<void>;
48
74
  listen(handler: (message: any) => Promise<void> | void): void;
49
75
  }
50
76
  //# sourceMappingURL=mq.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"mq.d.ts","sourceRoot":"","sources":["../../src/federation/mq.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,OAAO,KAAK,OAAO,MAAM,kBAAkB,CAAC;AAE5C,MAAM,WAAW,0BAA0B;IACzC;;;;OAIG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAC;CACnC;AAED;;;;GAIG;AACH,MAAM,WAAW,YAAY;IAC3B;;;;OAIG;IACH,OAAO,CAAC,OAAO,EAAE,GAAG,EAAE,OAAO,CAAC,EAAE,0BAA0B,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAE3E;;;OAGG;IACH,MAAM,CAAC,OAAO,EAAE,CAAC,OAAO,EAAE,GAAG,KAAK,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,GAAG,IAAI,CAAC;CAC/D;AAED;;;;;GAKG;AACH,qBAA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