@procedures/store 0.47.1 → 0.48.0
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.
- package/CHANGELOG.md +41 -13
- package/README.md +7 -4
- package/dist/.tsbuildinfo +1 -1
- package/dist/browser.d.ts +1 -1
- package/dist/browser.d.ts.map +1 -1
- package/dist/browser.js +1 -1
- package/dist/browser.js.map +1 -1
- package/dist/indexeddb/document-storage.d.ts.map +1 -1
- package/dist/indexeddb/document-storage.js.map +1 -1
- package/dist/indexeddb/idb.d.ts +2 -12
- package/dist/indexeddb/idb.d.ts.map +1 -1
- package/dist/indexeddb/idb.js +7 -12
- package/dist/indexeddb/idb.js.map +1 -1
- package/dist/program-store/collection.d.ts.map +1 -1
- package/dist/program-store/collection.js.map +1 -1
- package/dist/program-store/file.d.ts.map +1 -1
- package/dist/program-store/file.js.map +1 -1
- package/dist/storage/factory.d.ts +1 -1
- package/dist/storage/feed.d.ts +3 -3
- package/dist/storage/feed.js +1 -1
- package/dist/storage/file-queue.d.ts.map +1 -1
- package/dist/storage/file-queue.js.map +1 -1
- package/dist/storage/hybrid.d.ts +36 -20
- package/dist/storage/hybrid.d.ts.map +1 -1
- package/dist/storage/hybrid.js +49 -27
- package/dist/storage/hybrid.js.map +1 -1
- package/dist/storage/index.d.ts +1 -1
- package/dist/storage/index.d.ts.map +1 -1
- package/dist/storage/index.js +1 -1
- package/dist/storage/index.js.map +1 -1
- package/dist/storage/types.d.ts +1 -1
- package/dist/storage/types.d.ts.map +1 -1
- package/package.json +5 -5
- package/src/browser.ts +1 -0
- package/src/indexeddb/document-storage.ts +18 -6
- package/src/indexeddb/idb.ts +27 -12
- package/src/program-store/collection.ts +5 -1
- package/src/program-store/file.ts +5 -1
- package/src/storage/factory.ts +1 -1
- package/src/storage/feed.ts +3 -3
- package/src/storage/file-queue.ts +5 -1
- package/src/storage/hybrid.ts +96 -43
- package/src/storage/index.ts +1 -0
- package/src/storage/types.ts +1 -1
package/dist/storage/hybrid.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Hybrid Storage Implementation
|
|
3
3
|
*
|
|
4
4
|
* A local copy (an `InMemoryStorage`, or the `local` storage that the application gives) in
|
|
5
|
-
* front of a remote `CollectionStorage` (often an `ApiStorage`). The storage has
|
|
5
|
+
* front of a remote `CollectionStorage` (often an `ApiStorage`). The storage has five modes, and
|
|
6
6
|
* `setMode()` changes the mode while the storage operates (roadmap R28):
|
|
7
7
|
*
|
|
8
8
|
* | Mode | Reads | Writes | Remote calls |
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
* | `write-through` | the local copy, the remote on a miss | the local copy, then the remote | yes |
|
|
12
12
|
* | `write-back` | the local copy, the remote on a miss | the local copy and the queue, a timer sends it | yes |
|
|
13
13
|
* | `remote-only` | the remote | the remote | yes, and no local copy |
|
|
14
|
+
* | `read-only` | the local copy, the remote on a miss | refused with `ReadOnlyError` | reads and pulls only |
|
|
14
15
|
*
|
|
15
16
|
* - The queue is durable through the `queueStore` that the application gives.
|
|
16
17
|
* - A sync asks for the changes since a version when the remote has `getChangesSince`.
|
|
@@ -40,9 +41,9 @@
|
|
|
40
41
|
* writes over a newer local write.
|
|
41
42
|
* - The syncs of one storage run one at a time, in their order: the deltas and the hints of the
|
|
42
43
|
* feed, the pulls, the pushes, the reads after an own write, and the mode switches. Thus a
|
|
43
|
-
* remote delta and a full sync never run at the same time
|
|
44
|
+
* remote delta and a full sync never run at the same time.
|
|
44
45
|
* - `aroundRemoteApply` runs each apply of the remote changes inside a hook, for example inside a
|
|
45
|
-
* span of a trace
|
|
46
|
+
* span of a trace.
|
|
46
47
|
*/
|
|
47
48
|
import type { CollectionStorage, StorageBatchWriteOptions, StorageItemWriteOptions, StorageMetadata, StorageObserver, StorageWriteOptions } from "@procedures/collections";
|
|
48
49
|
import { type ListenerErrorHandler } from "@procedures/collections";
|
|
@@ -69,8 +70,11 @@ export type WriteStrategy = "write-through" | "write-back";
|
|
|
69
70
|
* - `write-through`: each write goes to the local copy, then to the remote.
|
|
70
71
|
* - `write-back`: each write goes to the local copy and to the queue. A timer sends the queue.
|
|
71
72
|
* - `remote-only`: each read and each write goes to the remote. The storage keeps no local copy.
|
|
73
|
+
* - `read-only`: the storage refuses each write with `ReadOnlyError` at once, with no change of
|
|
74
|
+
* the local copy, the queue or the remote. Reads, pulls and the feed work as in `write-through`
|
|
75
|
+
* (roadmap CLI-89). This mode sends no write: a queue that it holds waits for a mode that writes.
|
|
72
76
|
*/
|
|
73
|
-
export type HybridMode = "local-only" | "write-through" | "write-back" | "remote-only";
|
|
77
|
+
export type HybridMode = "local-only" | "write-through" | "write-back" | "remote-only" | "read-only";
|
|
74
78
|
/**
|
|
75
79
|
* Hybrid storage configuration options.
|
|
76
80
|
*/
|
|
@@ -144,13 +148,13 @@ export interface HybridStorageOptions {
|
|
|
144
148
|
syncInterval?: Duration;
|
|
145
149
|
/**
|
|
146
150
|
* The interval of the periodic pull, for example `minutes(1)` (roadmap R28). A pull reads the
|
|
147
|
-
* remote changes into the local copy in the modes `write-through` and `
|
|
151
|
+
* remote changes into the local copy in the modes `write-through`, `write-back` and `read-only`.
|
|
148
152
|
* @default no periodic pull
|
|
149
153
|
*/
|
|
150
154
|
pullInterval?: Duration;
|
|
151
155
|
/**
|
|
152
156
|
* Initialize by syncing from remote on construction: send the loaded queue, then read the
|
|
153
|
-
* remote. The mode `local-only` makes no remote call.
|
|
157
|
+
* remote. The mode `local-only` makes no remote call. The mode `read-only` sends no queue.
|
|
154
158
|
* @default true
|
|
155
159
|
*/
|
|
156
160
|
syncOnInit?: boolean;
|
|
@@ -251,7 +255,7 @@ export interface HybridStorageOptions {
|
|
|
251
255
|
*/
|
|
252
256
|
feed?: RemoteChangeFeed<any>;
|
|
253
257
|
/**
|
|
254
|
-
* The hook around each apply of the remote changes
|
|
258
|
+
* The hook around each apply of the remote changes, for example a span of a trace.
|
|
255
259
|
* `RemoteApplyHook` gives the arguments.
|
|
256
260
|
*
|
|
257
261
|
* - The hook wraps the apply of each delta of the feed, each hint of the feed that applies, and
|
|
@@ -327,7 +331,7 @@ export interface HybridStorageOptions {
|
|
|
327
331
|
queryPolicy?: StorageQueryPolicy;
|
|
328
332
|
}
|
|
329
333
|
/**
|
|
330
|
-
* The cause of an apply of the remote changes
|
|
334
|
+
* The cause of an apply of the remote changes.
|
|
331
335
|
*
|
|
332
336
|
* - `"delta"`: a delta of the feed.
|
|
333
337
|
* - `"hint"`: one or more hints of the feed.
|
|
@@ -335,7 +339,7 @@ export interface HybridStorageOptions {
|
|
|
335
339
|
* - `"pull"`: a pull of the storage: the timer, `syncFromRemote()`, `sync()` or the first sync.
|
|
336
340
|
*/
|
|
337
341
|
export type RemoteApplyCause = "delta" | "hint" | "gap" | "pull";
|
|
338
|
-
/** The context of an apply of the remote changes, the third argument of `aroundRemoteApply
|
|
342
|
+
/** The context of an apply of the remote changes, the third argument of `aroundRemoteApply`. */
|
|
339
343
|
export interface RemoteApplyContext {
|
|
340
344
|
/** The cause of the apply. A pull that hints and gaps asked for has the cause `"hint"`. */
|
|
341
345
|
readonly cause: RemoteApplyCause;
|
|
@@ -346,7 +350,7 @@ export interface RemoteApplyContext {
|
|
|
346
350
|
readonly hints: readonly RemoteChangeHint[];
|
|
347
351
|
}
|
|
348
352
|
/**
|
|
349
|
-
* The hook around an apply of the remote changes
|
|
353
|
+
* The hook around an apply of the remote changes. The hook calls `apply` one time and
|
|
350
354
|
* gives its promise back, for example from inside a span of a trace.
|
|
351
355
|
*
|
|
352
356
|
* - The storage waits for the hook and for the apply. A hook that does not settle stops the syncs.
|
|
@@ -401,6 +405,16 @@ export declare class QueueFullError extends Error {
|
|
|
401
405
|
readonly code = "QUEUE_FULL";
|
|
402
406
|
constructor(max: number);
|
|
403
407
|
}
|
|
408
|
+
/**
|
|
409
|
+
* The storage is in `read-only` mode, so it refuses the write (roadmap CLI-89). The local copy, the
|
|
410
|
+
* queue and the remote did not change. `operation` is the name of the refused operation.
|
|
411
|
+
*/
|
|
412
|
+
export declare class ReadOnlyError extends Error {
|
|
413
|
+
readonly operation: string;
|
|
414
|
+
readonly name = "ReadOnlyError";
|
|
415
|
+
readonly code = "READ_ONLY";
|
|
416
|
+
constructor(operation: string);
|
|
417
|
+
}
|
|
404
418
|
/** The remote gave items without a key, so a sync cannot know which local items to keep. */
|
|
405
419
|
export declare class MissingKeysError extends Error {
|
|
406
420
|
readonly name = "MissingKeysError";
|
|
@@ -447,7 +461,7 @@ export declare class SyncStateError extends Error {
|
|
|
447
461
|
constructor(action: "load" | "write", cause: unknown);
|
|
448
462
|
}
|
|
449
463
|
/**
|
|
450
|
-
* The hook `aroundRemoteApply` did not call `apply` one time
|
|
464
|
+
* The hook `aroundRemoteApply` did not call `apply` one time. The storage applied the
|
|
451
465
|
* changes one time all the same, and the apply succeeded. `calls` is the number of calls of
|
|
452
466
|
* `apply` before the hook settled.
|
|
453
467
|
*/
|
|
@@ -574,7 +588,7 @@ export declare class HybridStorage<T> implements CollectionStorage<T> {
|
|
|
574
588
|
private readonly feed;
|
|
575
589
|
private feedStop;
|
|
576
590
|
private feedToken;
|
|
577
|
-
/** The hook around each apply of the remote changes
|
|
591
|
+
/** The hook around each apply of the remote changes */
|
|
578
592
|
private readonly aroundRemoteApply;
|
|
579
593
|
/** With the hook: the hints that asked for the pull that waits */
|
|
580
594
|
private readonly joinedHints;
|
|
@@ -716,11 +730,11 @@ export declare class HybridStorage<T> implements CollectionStorage<T> {
|
|
|
716
730
|
private requestPull;
|
|
717
731
|
/**
|
|
718
732
|
* This method pulls the changes since the cursor, through the hook `aroundRemoteApply` when the
|
|
719
|
-
* options give it
|
|
733
|
+
* options give it. Without the hook, it is `pullRemote(false)`, with no other step.
|
|
720
734
|
*/
|
|
721
735
|
private pullThrough;
|
|
722
736
|
/**
|
|
723
|
-
* This method runs an apply of the remote changes through the hook
|
|
737
|
+
* This method runs an apply of the remote changes through the hook.
|
|
724
738
|
*
|
|
725
739
|
* - The apply runs one time. A second call of `apply` gets the promise of the first call.
|
|
726
740
|
* - When the hook does not call `apply`, the apply runs after the hook. Thus no change is lost.
|
|
@@ -752,7 +766,8 @@ export declare class HybridStorage<T> implements CollectionStorage<T> {
|
|
|
752
766
|
* - The switch waits for the operations that run. The operations that start later wait for
|
|
753
767
|
* the switch. Switches and syncs run one at a time.
|
|
754
768
|
* - A switch to a remote mode sends the queue first. A switch to `local-only` makes no remote
|
|
755
|
-
* call: the queue stays until the next remote mode.
|
|
769
|
+
* call: the queue stays until the next remote mode. A switch to `read-only` also sends the
|
|
770
|
+
* queue first, so this mode starts with an empty queue, or the switch fails.
|
|
756
771
|
* - A switch to `remote-only` drops the local copy, after the queue reached the remote.
|
|
757
772
|
* - A switch from `local-only` or `remote-only` to a mode with a local copy syncs the local
|
|
758
773
|
* copy. The reads wait for the sync.
|
|
@@ -767,7 +782,7 @@ export declare class HybridStorage<T> implements CollectionStorage<T> {
|
|
|
767
782
|
private rebuildLocal;
|
|
768
783
|
/**
|
|
769
784
|
* This method starts and stops the timers for the mode. The push timer runs in `write-back`, the
|
|
770
|
-
* pull timer in `write-through` and `
|
|
785
|
+
* pull timer in `write-through`, `write-back` and `read-only`, and the send of the queue after a failure only
|
|
771
786
|
* in `write-through`. A failed run reports its error in the status, and the next delay grows.
|
|
772
787
|
*/
|
|
773
788
|
private updateTimers;
|
|
@@ -824,6 +839,7 @@ export declare class HybridStorage<T> implements CollectionStorage<T> {
|
|
|
824
839
|
* One write, in the mode of the storage. The result is the result of the local copy, or of the
|
|
825
840
|
* remote in `remote-only` mode.
|
|
826
841
|
*
|
|
842
|
+
* - `read-only`: the write throws `ReadOnlyError`, and nothing changes.
|
|
827
843
|
* - `remote-only`: the remote only. Its error passes through.
|
|
828
844
|
* - `write-back` and `local-only`: the local copy and the queue. A full queue refuses the write
|
|
829
845
|
* before the local change. The queue store keeps the operation before the write ends.
|
|
@@ -889,13 +905,13 @@ export declare class HybridStorage<T> implements CollectionStorage<T> {
|
|
|
889
905
|
/**
|
|
890
906
|
* Sync all pending offline operations to remote.
|
|
891
907
|
* Processes queued operations in order. When one fails, it and the later operations stay in
|
|
892
|
-
* the queue: the operations that reached the remote are not sent again. In `local-only`
|
|
893
|
-
* the call does nothing.
|
|
908
|
+
* the queue: the operations that reached the remote are not sent again. In the modes `local-only`
|
|
909
|
+
* and `read-only`, the call does nothing.
|
|
894
910
|
*/
|
|
895
911
|
syncToRemote(): Promise<void>;
|
|
896
912
|
/**
|
|
897
913
|
* This method sends the queue to the remote (roadmap R28). `ProcedureServer.useStorage` uses it. In
|
|
898
|
-
* `local-only`
|
|
914
|
+
* the modes `local-only` and `read-only`, it sends nothing: the queue waits for a mode that writes.
|
|
899
915
|
*/
|
|
900
916
|
flush(): Promise<void>;
|
|
901
917
|
/**
|
|
@@ -921,7 +937,7 @@ export declare class HybridStorage<T> implements CollectionStorage<T> {
|
|
|
921
937
|
* This method closes the storage.
|
|
922
938
|
*
|
|
923
939
|
* - It stops the timers, and waits for the operations, the mode switch and the syncs that run.
|
|
924
|
-
* - It sends the queue (not in `local-only`
|
|
940
|
+
* - It sends the queue (not in the modes `local-only` and `read-only`). The queue store keeps the operations that
|
|
925
941
|
* the remote did not take.
|
|
926
942
|
* - It closes the remote and the local copy. A durable local copy keeps its items.
|
|
927
943
|
* - After it, each operation rejects. A second `close()` does nothing: it gives the promise of
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hybrid.d.ts","sourceRoot":"","sources":["../../src/storage/hybrid.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AAEH,OAAO,KAAK,EACV,iBAAiB,EACjB,wBAAwB,EAIxB,uBAAuB,EACvB,eAAe,EACf,eAAe,EACf,mBAAmB,EAEpB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAqC,KAAK,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AACvG,OAAO,EAKL,KAAK,mBAAmB,EACxB,KAAK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,SAAS;IAMjB,OAAO,CAAC,IAAI;IAKZ,sCAAsC;IACtC,OAAO,CAAC,SAAS;IAKjB,oFAAoF;IACpF,OAAO,CAAC,YAAY;IAIpB,qFAAqF;IACrF,OAAO,CAAC,QAAQ;IAIhB,OAAO,CAAC,aAAa;IAIrB,6EAA6E;IAC7E,OAAO,CAAC,QAAQ;IAWhB,gFAAgF;IAChF,OAAO,CAAC,eAAe;IAsBvB;;;;OAIG;IACH,OAAO,CAAC,UAAU;IAWlB,kGAAkG;IAClG,OAAO,CAAC,YAAY;IA0BpB,OAAO,CAAC,YAAY;IAOpB;;OAEG;IACH,OAAO,CAAC,eAAe;IA8BvB;;;;;;;OAOG;YACW,OAAO;IAmCrB;;;;OAIG;IACH,OAAO,CAAC,OAAO;IAgCf,sGAAsG;IACtG,OAAO,CAAC,UAAU;IAqBlB;;;OAGG;YACW,gBAAgB;IAI9B,mEAAmE;IACnE,OAAO,CAAC,gBAAgB;IAexB,kDAAkD;IAClD,OAAO,CAAC,YAAY;IAIpB,4FAA4F;IAC5F,OAAO,CAAC,eAAe;IAIvB;;;OAGG;IACH,OAAO,CAAC,aAAa;IAKrB;;OAEG;YACW,gBAAgB;IA8B9B,uFAAuF;IACvF,OAAO,CAAC,iBAAiB;IAIzB;;;;OAIG;IACH,OAAO,CAAC,QAAQ;IAMhB,oFAAoF;IACpF,OAAO,CAAC,SAAS;IAUjB;;;OAGG;IACH,OAAO,CAAC,YAAY;IAgBpB;;;;;;;;;;;;;;;OAeG;YACW,oBAAoB;IA0ClC;;;OAGG;YACW,mBAAmB;IAmBjC;;OAEG;IACH,cAAc,IAAI,OAAO,CAExB;IAED;;OAEG;IACH,kBAAkB,IAAI,MAAM,CAE3B;CACF"}
|
package/dist/storage/hybrid.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Hybrid Storage Implementation
|
|
3
3
|
*
|
|
4
4
|
* A local copy (an `InMemoryStorage`, or the `local` storage that the application gives) in
|
|
5
|
-
* front of a remote `CollectionStorage` (often an `ApiStorage`). The storage has
|
|
5
|
+
* front of a remote `CollectionStorage` (often an `ApiStorage`). The storage has five modes, and
|
|
6
6
|
* `setMode()` changes the mode while the storage operates (roadmap R28):
|
|
7
7
|
*
|
|
8
8
|
* | Mode | Reads | Writes | Remote calls |
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
* | `write-through` | the local copy, the remote on a miss | the local copy, then the remote | yes |
|
|
12
12
|
* | `write-back` | the local copy, the remote on a miss | the local copy and the queue, a timer sends it | yes |
|
|
13
13
|
* | `remote-only` | the remote | the remote | yes, and no local copy |
|
|
14
|
+
* | `read-only` | the local copy, the remote on a miss | refused with `ReadOnlyError` | reads and pulls only |
|
|
14
15
|
*
|
|
15
16
|
* - The queue is durable through the `queueStore` that the application gives.
|
|
16
17
|
* - A sync asks for the changes since a version when the remote has `getChangesSince`.
|
|
@@ -40,9 +41,9 @@
|
|
|
40
41
|
* writes over a newer local write.
|
|
41
42
|
* - The syncs of one storage run one at a time, in their order: the deltas and the hints of the
|
|
42
43
|
* feed, the pulls, the pushes, the reads after an own write, and the mode switches. Thus a
|
|
43
|
-
* remote delta and a full sync never run at the same time
|
|
44
|
+
* remote delta and a full sync never run at the same time.
|
|
44
45
|
* - `aroundRemoteApply` runs each apply of the remote changes inside a hook, for example inside a
|
|
45
|
-
* span of a trace
|
|
46
|
+
* span of a trace.
|
|
46
47
|
*/
|
|
47
48
|
import { InMemoryStorage, StorageListeners } from "@procedures/collections";
|
|
48
49
|
import { queryEntries, queryOptionsProblems, selectorProblems, versionConflictsOf, } from "@procedures/client/query";
|
|
@@ -50,12 +51,16 @@ import { optionalMs, realClock } from "@procedures/client/browser";
|
|
|
50
51
|
import { backoffDelay } from "@mark1russell7/service/backoff";
|
|
51
52
|
import { MemoryQueueStore, idsOf, withoutId } from "./queue.js";
|
|
52
53
|
import { isSyncState } from "./sync-state.js";
|
|
53
|
-
const MODES = new Set(["local-only", "write-through", "write-back", "remote-only"]);
|
|
54
|
+
const MODES = new Set(["local-only", "write-through", "write-back", "remote-only", "read-only"]);
|
|
55
|
+
/** True for the modes that keep a local copy and read the remote changes into it. */
|
|
56
|
+
const pullsRemote = (mode) => mode === "write-through" || mode === "write-back" || mode === "read-only";
|
|
57
|
+
/** True for the modes that send writes to the remote. */
|
|
58
|
+
const pushesRemote = (mode) => mode !== "local-only" && mode !== "read-only";
|
|
54
59
|
/** The hints of an apply without hints. */
|
|
55
60
|
const NO_HINTS = Object.freeze([]);
|
|
56
61
|
/** The most hints that a pull keeps for the hook. A pull drops the older ones. */
|
|
57
62
|
const MAX_JOINED_HINTS = 128;
|
|
58
|
-
/** The hint of a delta of the feed: its versions, its ids, its origin and its other fields, without the values
|
|
63
|
+
/** The hint of a delta of the feed: its versions, its ids, its origin and its other fields, without the values. */
|
|
59
64
|
function hintOfDelta(changes) {
|
|
60
65
|
return {
|
|
61
66
|
...(changes.since !== undefined && { since: changes.since }),
|
|
@@ -178,6 +183,19 @@ export class QueueFullError extends Error {
|
|
|
178
183
|
super(`The queue of operations is full (${max} operations): the storage refuses the write`);
|
|
179
184
|
}
|
|
180
185
|
}
|
|
186
|
+
/**
|
|
187
|
+
* The storage is in `read-only` mode, so it refuses the write (roadmap CLI-89). The local copy, the
|
|
188
|
+
* queue and the remote did not change. `operation` is the name of the refused operation.
|
|
189
|
+
*/
|
|
190
|
+
export class ReadOnlyError extends Error {
|
|
191
|
+
operation;
|
|
192
|
+
name = "ReadOnlyError";
|
|
193
|
+
code = "READ_ONLY";
|
|
194
|
+
constructor(operation) {
|
|
195
|
+
super(`The storage is in read-only mode: it refuses the operation ${operation}`);
|
|
196
|
+
this.operation = operation;
|
|
197
|
+
}
|
|
198
|
+
}
|
|
181
199
|
/** The remote gave items without a key, so a sync cannot know which local items to keep. */
|
|
182
200
|
export class MissingKeysError extends Error {
|
|
183
201
|
name = "MissingKeysError";
|
|
@@ -237,7 +255,7 @@ export class SyncStateError extends Error {
|
|
|
237
255
|
}
|
|
238
256
|
}
|
|
239
257
|
/**
|
|
240
|
-
* The hook `aroundRemoteApply` did not call `apply` one time
|
|
258
|
+
* The hook `aroundRemoteApply` did not call `apply` one time. The storage applied the
|
|
241
259
|
* changes one time all the same, and the apply succeeded. `calls` is the number of calls of
|
|
242
260
|
* `apply` before the hook settled.
|
|
243
261
|
*/
|
|
@@ -273,7 +291,7 @@ const defaultKeyOf = (item) => {
|
|
|
273
291
|
};
|
|
274
292
|
function checkMode(mode) {
|
|
275
293
|
if (typeof mode !== "string" || !MODES.has(mode)) {
|
|
276
|
-
throw new TypeError(`Unknown mode ${JSON.stringify(mode)}: use local-only, write-through, write-back or
|
|
294
|
+
throw new TypeError(`Unknown mode ${JSON.stringify(mode)}: use local-only, write-through, write-back, remote-only or read-only`);
|
|
277
295
|
}
|
|
278
296
|
return mode;
|
|
279
297
|
}
|
|
@@ -355,7 +373,7 @@ function remoteChangesOf(op, result, existing, origin) {
|
|
|
355
373
|
}
|
|
356
374
|
/**
|
|
357
375
|
* The versions of the own writes of a `HybridStorage` that no remote change echoed yet (roadmap
|
|
358
|
-
* CLI-21
|
|
376
|
+
* CLI-21).
|
|
359
377
|
*
|
|
360
378
|
* - The ledger keeps the versions of each id in the order of the writes. It records a write when
|
|
361
379
|
* the local copy takes it, because a stale echo can come before the push.
|
|
@@ -572,7 +590,7 @@ export class HybridStorage {
|
|
|
572
590
|
feed;
|
|
573
591
|
feedStop;
|
|
574
592
|
feedToken = 0;
|
|
575
|
-
/** The hook around each apply of the remote changes
|
|
593
|
+
/** The hook around each apply of the remote changes */
|
|
576
594
|
aroundRemoteApply;
|
|
577
595
|
/** With the hook: the hints that asked for the pull that waits */
|
|
578
596
|
joinedHints = [];
|
|
@@ -924,7 +942,7 @@ export class HybridStorage {
|
|
|
924
942
|
const feed = this.feed;
|
|
925
943
|
if (!feed)
|
|
926
944
|
return;
|
|
927
|
-
const wanted = !this.closed && (this.mode
|
|
945
|
+
const wanted = !this.closed && pullsRemote(this.mode);
|
|
928
946
|
if (wanted === (this.feedStop !== undefined))
|
|
929
947
|
return;
|
|
930
948
|
const token = ++this.feedToken;
|
|
@@ -988,7 +1006,7 @@ export class HybridStorage {
|
|
|
988
1006
|
async applyFeed(changes, mark) {
|
|
989
1007
|
if (this.loadError)
|
|
990
1008
|
throw this.loadError;
|
|
991
|
-
if (this.closed || (this.mode
|
|
1009
|
+
if (this.closed || !pullsRemote(this.mode))
|
|
992
1010
|
return;
|
|
993
1011
|
if (changes.version === this.cursor)
|
|
994
1012
|
return;
|
|
@@ -1025,7 +1043,7 @@ export class HybridStorage {
|
|
|
1025
1043
|
async applyHint(hint, mark) {
|
|
1026
1044
|
if (this.loadError)
|
|
1027
1045
|
throw this.loadError;
|
|
1028
|
-
if (this.closed || (this.mode
|
|
1046
|
+
if (this.closed || !pullsRemote(this.mode))
|
|
1029
1047
|
return;
|
|
1030
1048
|
// The remote cannot tell what changed: a full pull
|
|
1031
1049
|
if (hint.reset === true)
|
|
@@ -1073,7 +1091,7 @@ export class HybridStorage {
|
|
|
1073
1091
|
return this.track("pull", async () => {
|
|
1074
1092
|
if (this.loadError)
|
|
1075
1093
|
throw this.loadError;
|
|
1076
|
-
if (this.mode
|
|
1094
|
+
if (pullsRemote(this.mode))
|
|
1077
1095
|
await this.pullThrough(hints.length > 0 ? "hint" : "gap", hints, full);
|
|
1078
1096
|
});
|
|
1079
1097
|
}))
|
|
@@ -1081,14 +1099,14 @@ export class HybridStorage {
|
|
|
1081
1099
|
}
|
|
1082
1100
|
/**
|
|
1083
1101
|
* This method pulls the changes since the cursor, through the hook `aroundRemoteApply` when the
|
|
1084
|
-
* options give it
|
|
1102
|
+
* options give it. Without the hook, it is `pullRemote(false)`, with no other step.
|
|
1085
1103
|
*/
|
|
1086
1104
|
pullThrough(cause, hints, full = false) {
|
|
1087
1105
|
const hook = this.aroundRemoteApply;
|
|
1088
1106
|
return hook ? this.hookedApply(hook, cause, hints, () => this.pullRemote(full)) : this.pullRemote(full);
|
|
1089
1107
|
}
|
|
1090
1108
|
/**
|
|
1091
|
-
* This method runs an apply of the remote changes through the hook
|
|
1109
|
+
* This method runs an apply of the remote changes through the hook.
|
|
1092
1110
|
*
|
|
1093
1111
|
* - The apply runs one time. A second call of `apply` gets the promise of the first call.
|
|
1094
1112
|
* - When the hook does not call `apply`, the apply runs after the hook. Thus no change is lost.
|
|
@@ -1254,7 +1272,8 @@ export class HybridStorage {
|
|
|
1254
1272
|
* - The switch waits for the operations that run. The operations that start later wait for
|
|
1255
1273
|
* the switch. Switches and syncs run one at a time.
|
|
1256
1274
|
* - A switch to a remote mode sends the queue first. A switch to `local-only` makes no remote
|
|
1257
|
-
* call: the queue stays until the next remote mode.
|
|
1275
|
+
* call: the queue stays until the next remote mode. A switch to `read-only` also sends the
|
|
1276
|
+
* queue first, so this mode starts with an empty queue, or the switch fails.
|
|
1258
1277
|
* - A switch to `remote-only` drops the local copy, after the queue reached the remote.
|
|
1259
1278
|
* - A switch from `local-only` or `remote-only` to a mode with a local copy syncs the local
|
|
1260
1279
|
* copy. The reads wait for the sync.
|
|
@@ -1321,7 +1340,7 @@ export class HybridStorage {
|
|
|
1321
1340
|
}
|
|
1322
1341
|
/**
|
|
1323
1342
|
* This method starts and stops the timers for the mode. The push timer runs in `write-back`, the
|
|
1324
|
-
* pull timer in `write-through` and `
|
|
1343
|
+
* pull timer in `write-through`, `write-back` and `read-only`, and the send of the queue after a failure only
|
|
1325
1344
|
* in `write-through`. A failed run reports its error in the status, and the next delay grows.
|
|
1326
1345
|
*/
|
|
1327
1346
|
updateTimers() {
|
|
@@ -1331,7 +1350,7 @@ export class HybridStorage {
|
|
|
1331
1350
|
this.pushTimer?.start();
|
|
1332
1351
|
else
|
|
1333
1352
|
this.pushTimer?.stop();
|
|
1334
|
-
if (this.mode
|
|
1353
|
+
if (pullsRemote(this.mode))
|
|
1335
1354
|
this.pullTimer?.start();
|
|
1336
1355
|
else
|
|
1337
1356
|
this.pullTimer?.stop();
|
|
@@ -1510,6 +1529,7 @@ export class HybridStorage {
|
|
|
1510
1529
|
* One write, in the mode of the storage. The result is the result of the local copy, or of the
|
|
1511
1530
|
* remote in `remote-only` mode.
|
|
1512
1531
|
*
|
|
1532
|
+
* - `read-only`: the write throws `ReadOnlyError`, and nothing changes.
|
|
1513
1533
|
* - `remote-only`: the remote only. Its error passes through.
|
|
1514
1534
|
* - `write-back` and `local-only`: the local copy and the queue. A full queue refuses the write
|
|
1515
1535
|
* before the local change. The queue store keeps the operation before the write ends.
|
|
@@ -1525,6 +1545,8 @@ export class HybridStorage {
|
|
|
1525
1545
|
*/
|
|
1526
1546
|
write(type, data, ids, origin, applyLocal, applyRemote) {
|
|
1527
1547
|
return this.run(false, async () => {
|
|
1548
|
+
if (this.mode === "read-only")
|
|
1549
|
+
throw new ReadOnlyError(type);
|
|
1528
1550
|
const op = { type, data, timestamp: Date.now() };
|
|
1529
1551
|
if (this.mode === "remote-only") {
|
|
1530
1552
|
const send = async () => {
|
|
@@ -1709,7 +1731,7 @@ export class HybridStorage {
|
|
|
1709
1731
|
this.deferred.delete(id);
|
|
1710
1732
|
const mark = this.writeSeq;
|
|
1711
1733
|
let item = deferred.item;
|
|
1712
|
-
if (this.mode
|
|
1734
|
+
if (pullsRemote(this.mode)) {
|
|
1713
1735
|
try {
|
|
1714
1736
|
item = await this.remote.get(id);
|
|
1715
1737
|
this.isOnline = true;
|
|
@@ -1782,8 +1804,8 @@ export class HybridStorage {
|
|
|
1782
1804
|
/**
|
|
1783
1805
|
* Sync all pending offline operations to remote.
|
|
1784
1806
|
* Processes queued operations in order. When one fails, it and the later operations stay in
|
|
1785
|
-
* the queue: the operations that reached the remote are not sent again. In `local-only`
|
|
1786
|
-
* the call does nothing.
|
|
1807
|
+
* the queue: the operations that reached the remote are not sent again. In the modes `local-only`
|
|
1808
|
+
* and `read-only`, the call does nothing.
|
|
1787
1809
|
*/
|
|
1788
1810
|
syncToRemote() {
|
|
1789
1811
|
if (this.closed)
|
|
@@ -1792,7 +1814,7 @@ export class HybridStorage {
|
|
|
1792
1814
|
}
|
|
1793
1815
|
/**
|
|
1794
1816
|
* This method sends the queue to the remote (roadmap R28). `ProcedureServer.useStorage` uses it. In
|
|
1795
|
-
* `local-only`
|
|
1817
|
+
* the modes `local-only` and `read-only`, it sends nothing: the queue waits for a mode that writes.
|
|
1796
1818
|
*/
|
|
1797
1819
|
flush() {
|
|
1798
1820
|
return this.syncToRemote();
|
|
@@ -1824,7 +1846,7 @@ export class HybridStorage {
|
|
|
1824
1846
|
await this.loaded;
|
|
1825
1847
|
if (this.loadError)
|
|
1826
1848
|
throw this.loadError;
|
|
1827
|
-
if (this.mode
|
|
1849
|
+
if (pullsRemote(this.mode))
|
|
1828
1850
|
await this.pullThrough("pull", NO_HINTS);
|
|
1829
1851
|
}));
|
|
1830
1852
|
}
|
|
@@ -1834,7 +1856,7 @@ export class HybridStorage {
|
|
|
1834
1856
|
await this.loaded;
|
|
1835
1857
|
if (this.loadError)
|
|
1836
1858
|
throw this.loadError;
|
|
1837
|
-
if (this.mode
|
|
1859
|
+
if (pushesRemote(this.mode))
|
|
1838
1860
|
await this.pushQueue();
|
|
1839
1861
|
}));
|
|
1840
1862
|
}
|
|
@@ -1849,7 +1871,7 @@ export class HybridStorage {
|
|
|
1849
1871
|
* This method closes the storage.
|
|
1850
1872
|
*
|
|
1851
1873
|
* - It stops the timers, and waits for the operations, the mode switch and the syncs that run.
|
|
1852
|
-
* - It sends the queue (not in `local-only`
|
|
1874
|
+
* - It sends the queue (not in the modes `local-only` and `read-only`). The queue store keeps the operations that
|
|
1853
1875
|
* the remote did not take.
|
|
1854
1876
|
* - It closes the remote and the local copy. A durable local copy keeps its items.
|
|
1855
1877
|
* - After it, each operation rejects. A second `close()` does nothing: it gives the promise of
|
|
@@ -1877,7 +1899,7 @@ export class HybridStorage {
|
|
|
1877
1899
|
// After the syncs that run: send the pending operations. The queue store keeps the ones that
|
|
1878
1900
|
// the remote did not take, and the status gets the failure.
|
|
1879
1901
|
await this.serialize(async () => {
|
|
1880
|
-
if (this.loadError || this.offlineOps.length === 0 || this.mode
|
|
1902
|
+
if (this.loadError || this.offlineOps.length === 0 || !pushesRemote(this.mode))
|
|
1881
1903
|
return;
|
|
1882
1904
|
await this.track("push", () => this.pushQueue()).catch(() => undefined);
|
|
1883
1905
|
});
|
|
@@ -2018,7 +2040,7 @@ export class HybridStorage {
|
|
|
2018
2040
|
// A failure goes to the status: the reads go on with the local copy
|
|
2019
2041
|
if (this.offlineOps.length > 0)
|
|
2020
2042
|
await this.push().catch(() => undefined);
|
|
2021
|
-
if (!this.closed && (this.mode
|
|
2043
|
+
if (!this.closed && pullsRemote(this.mode)) {
|
|
2022
2044
|
await this.pull().catch(() => undefined);
|
|
2023
2045
|
}
|
|
2024
2046
|
}
|