firebird-wasm 0.1.1 → 0.2.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 +35 -0
- package/dist/.tsbuildinfo.build +1 -1
- package/dist/browser/firebird-browser.d.ts +54 -2
- package/dist/browser/firebird-browser.d.ts.map +1 -1
- package/dist/browser/firebird-browser.js +102 -17
- package/dist/browser/firebird-browser.js.map +1 -1
- package/dist/browser/index.d.ts +4 -0
- package/dist/browser/index.d.ts.map +1 -1
- package/dist/browser/index.js +5 -1
- package/dist/browser/index.js.map +1 -1
- package/dist/browser/leader-election.d.ts +55 -0
- package/dist/browser/leader-election.d.ts.map +1 -0
- package/dist/browser/leader-election.js +64 -0
- package/dist/browser/leader-election.js.map +1 -0
- package/dist/browser/shared-transport.d.ts +128 -0
- package/dist/browser/shared-transport.d.ts.map +1 -0
- package/dist/browser/shared-transport.js +339 -0
- package/dist/browser/shared-transport.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,339 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* shared-transport.ts – one engine, many tabs.
|
|
4
|
+
*
|
|
5
|
+
* `multiTab: 'exclusive'` keeps a second tab safe by refusing it. This serves
|
|
6
|
+
* it instead: one tab wins the election, runs the engine, and answers for
|
|
7
|
+
* everyone else over a `BroadcastChannel`.
|
|
8
|
+
*
|
|
9
|
+
* ## Why only one tab may run the engine
|
|
10
|
+
*
|
|
11
|
+
* Not because concurrent access needs coordinating — because each tab holds
|
|
12
|
+
* its own complete copy of the database in memory and persists the whole
|
|
13
|
+
* image. Two engines on one database is not a race to be locked around; the
|
|
14
|
+
* later persist discards the other's work entirely. So the engine is
|
|
15
|
+
* singular by construction, and the other tabs are clients of it.
|
|
16
|
+
*
|
|
17
|
+
* ## What happens when the leader disappears
|
|
18
|
+
*
|
|
19
|
+
* The lock releases, a follower is promoted, and it starts its own engine from
|
|
20
|
+
* the last persisted image. Writes made in the departed leader's final
|
|
21
|
+
* debounce window are lost — the same exposure a single tab has always had,
|
|
22
|
+
* and no worse.
|
|
23
|
+
*
|
|
24
|
+
* In-flight calls at that moment are handled by what they are, not uniformly:
|
|
25
|
+
* a read is re-issued to the new leader, because running a query twice is
|
|
26
|
+
* indistinguishable from running it once; a write is **rejected**. The old
|
|
27
|
+
* leader may have committed it and died before the reply, so re-issuing could
|
|
28
|
+
* apply it twice. An error a caller can see beats a duplicate row it cannot.
|
|
29
|
+
*/
|
|
30
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
31
|
+
exports.SharedEngineTransport = void 0;
|
|
32
|
+
const leader_election_1 = require("./leader-election");
|
|
33
|
+
/**
|
|
34
|
+
* Operations safe to re-issue to a new leader after the old one vanished.
|
|
35
|
+
*
|
|
36
|
+
* Reads and existence checks only. Every mutation is absent deliberately: its
|
|
37
|
+
* outcome is unknown once the leader dies mid-call, and "unknown" must not be
|
|
38
|
+
* quietly resolved as "did not happen".
|
|
39
|
+
*/
|
|
40
|
+
const REPLAYABLE = new Set([
|
|
41
|
+
'init',
|
|
42
|
+
'query',
|
|
43
|
+
'exists',
|
|
44
|
+
'readFile',
|
|
45
|
+
]);
|
|
46
|
+
/** Ops that change the database, and so make the leader's image dirty. */
|
|
47
|
+
const MUTATING = new Set([
|
|
48
|
+
'execute',
|
|
49
|
+
'commit',
|
|
50
|
+
'createDatabase',
|
|
51
|
+
'writeFile',
|
|
52
|
+
]);
|
|
53
|
+
const DEFAULT_TIMEOUT_MS = 120000;
|
|
54
|
+
/**
|
|
55
|
+
* An {@link EngineTransport} backed by whichever tab currently owns the engine.
|
|
56
|
+
*
|
|
57
|
+
* @example
|
|
58
|
+
* ```ts
|
|
59
|
+
* const db = new FirebirdBrowser('mydb', {
|
|
60
|
+
* multiTab: 'shared',
|
|
61
|
+
* worker: () => new Worker('/firebird-engine-worker.js'),
|
|
62
|
+
* });
|
|
63
|
+
* ```
|
|
64
|
+
*/
|
|
65
|
+
class SharedEngineTransport {
|
|
66
|
+
constructor(options) {
|
|
67
|
+
/** The real engine. Non-null exactly when this tab is the leader. */
|
|
68
|
+
this.engine = null;
|
|
69
|
+
this.pending = new Map();
|
|
70
|
+
this.nextCallId = 1;
|
|
71
|
+
this.disposed = false;
|
|
72
|
+
/** Highest leadership generation seen; guards against stale announcements. */
|
|
73
|
+
this.epoch = 0;
|
|
74
|
+
/** True while this tab is standing its engine up, so calls stay local. */
|
|
75
|
+
this.promoting = false;
|
|
76
|
+
// ── Channel ────────────────────────────────────────────────────────────
|
|
77
|
+
this.onMessage = (event) => {
|
|
78
|
+
const message = event.data;
|
|
79
|
+
switch (message.kind) {
|
|
80
|
+
case 'who-leads':
|
|
81
|
+
// Only a leader answers, and only if it has an engine standing.
|
|
82
|
+
if (this.engine) {
|
|
83
|
+
this.channel.postMessage({
|
|
84
|
+
kind: 'leader',
|
|
85
|
+
epoch: this.epoch,
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
return;
|
|
89
|
+
case 'leader':
|
|
90
|
+
this.announceLeaderKnown();
|
|
91
|
+
// A *new* leader, not the one this tab already knew about: its engine
|
|
92
|
+
// is a different engine, so this tab's handles mean nothing to it.
|
|
93
|
+
if (message.epoch > this.epoch) {
|
|
94
|
+
this.epoch = message.epoch;
|
|
95
|
+
if (!this.engine)
|
|
96
|
+
void this.reopenAfterLeaderChange();
|
|
97
|
+
}
|
|
98
|
+
return;
|
|
99
|
+
case 'call':
|
|
100
|
+
if (this.engine)
|
|
101
|
+
void this.serve(message);
|
|
102
|
+
return;
|
|
103
|
+
case 'reply':
|
|
104
|
+
if (message.to === this.clientId)
|
|
105
|
+
this.settle(message);
|
|
106
|
+
return;
|
|
107
|
+
}
|
|
108
|
+
};
|
|
109
|
+
this.dbName = options.dbName;
|
|
110
|
+
this.createEngine = options.createEngine;
|
|
111
|
+
this.timeoutMs = options.timeoutMs ?? DEFAULT_TIMEOUT_MS;
|
|
112
|
+
this.onServedMutation = options.onServedMutation;
|
|
113
|
+
this.onEngineReplaced = options.onEngineReplaced;
|
|
114
|
+
this.clientId = `${Date.now().toString(36)}-${Math.random().toString(36).slice(2, 10)}`;
|
|
115
|
+
this.channel = new BroadcastChannel(`firebird-wasm:shared:${this.dbName}`);
|
|
116
|
+
this.channel.addEventListener('message', this.onMessage);
|
|
117
|
+
this.leaderKnown = new Promise((resolve) => {
|
|
118
|
+
this.announceLeaderKnown = resolve;
|
|
119
|
+
});
|
|
120
|
+
this.election = (0, leader_election_1.electLeader)(this.dbName, {
|
|
121
|
+
onPromoted: () => this.assumeLeadership(),
|
|
122
|
+
});
|
|
123
|
+
// A follower that starts while a leader already exists hears nothing until
|
|
124
|
+
// it asks; the leader's announcement happened before this tab existed.
|
|
125
|
+
this.channel.postMessage({ kind: 'who-leads' });
|
|
126
|
+
}
|
|
127
|
+
/** Whether this tab currently runs the engine. */
|
|
128
|
+
get isLeader() {
|
|
129
|
+
return this.election.isLeader;
|
|
130
|
+
}
|
|
131
|
+
// ── Leadership ─────────────────────────────────────────────────────────
|
|
132
|
+
async assumeLeadership() {
|
|
133
|
+
if (this.disposed)
|
|
134
|
+
return;
|
|
135
|
+
this.engine = this.createEngine();
|
|
136
|
+
await this.engine.init();
|
|
137
|
+
// Re-open before announcing. A follower that heard "leader" and attached
|
|
138
|
+
// straight away would be attaching to an engine with no database in it.
|
|
139
|
+
this.promoting = true;
|
|
140
|
+
try {
|
|
141
|
+
await this.onEngineReplaced?.();
|
|
142
|
+
}
|
|
143
|
+
finally {
|
|
144
|
+
this.promoting = false;
|
|
145
|
+
}
|
|
146
|
+
this.announceLeaderKnown();
|
|
147
|
+
this.channel.postMessage({ kind: 'leader', epoch: ++this.epoch });
|
|
148
|
+
// Anything still outstanding was addressed to a leader that no longer
|
|
149
|
+
// exists. Replay what is safe to replay; fail the rest loudly.
|
|
150
|
+
this.recoverPending();
|
|
151
|
+
}
|
|
152
|
+
recoverPending() {
|
|
153
|
+
const outstanding = [...this.pending.entries()];
|
|
154
|
+
this.pending.clear();
|
|
155
|
+
for (const [, call] of outstanding) {
|
|
156
|
+
clearTimeout(call.timer);
|
|
157
|
+
if (REPLAYABLE.has(call.op)) {
|
|
158
|
+
this.runLocally(call.op, call.args).then((value) => call.resolve(value), (err) => call.reject(err instanceof Error ? err : new Error(String(err))));
|
|
159
|
+
continue;
|
|
160
|
+
}
|
|
161
|
+
call.reject(new Error(`The tab running the database closed while "${call.op}" was in ` +
|
|
162
|
+
`flight, and this tab has taken over. The operation may or may ` +
|
|
163
|
+
`not have been applied, so it was not retried — re-check the ` +
|
|
164
|
+
`data before repeating it.`));
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
/** Follower side: the leader changed, so re-open against the new one. */
|
|
168
|
+
async reopenAfterLeaderChange() {
|
|
169
|
+
if (this.disposed || this.engine)
|
|
170
|
+
return;
|
|
171
|
+
try {
|
|
172
|
+
await this.onEngineReplaced?.();
|
|
173
|
+
}
|
|
174
|
+
catch {
|
|
175
|
+
// Reported through the owner's own error handling; a throw here would
|
|
176
|
+
// become an unhandled rejection in a channel event listener.
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
/** Leader side: run the operation and reply to the caller. */
|
|
180
|
+
async serve(message) {
|
|
181
|
+
let reply;
|
|
182
|
+
try {
|
|
183
|
+
const result = await this.runLocally(message.op, message.args);
|
|
184
|
+
reply = {
|
|
185
|
+
kind: 'reply',
|
|
186
|
+
to: message.from,
|
|
187
|
+
id: message.id,
|
|
188
|
+
ok: true,
|
|
189
|
+
result: result ?? null,
|
|
190
|
+
};
|
|
191
|
+
if (MUTATING.has(message.op)) {
|
|
192
|
+
// The write happened here, but the caller that wanted it is in
|
|
193
|
+
// another tab and will never mark this engine dirty.
|
|
194
|
+
this.onServedMutation?.();
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
catch (err) {
|
|
198
|
+
reply = {
|
|
199
|
+
kind: 'reply',
|
|
200
|
+
to: message.from,
|
|
201
|
+
id: message.id,
|
|
202
|
+
ok: false,
|
|
203
|
+
// A string, not an Error: structured cloning drops the prototype and
|
|
204
|
+
// the stack belongs to a tab the caller cannot see anyway.
|
|
205
|
+
error: err instanceof Error ? err.message : String(err),
|
|
206
|
+
};
|
|
207
|
+
}
|
|
208
|
+
this.channel.postMessage(reply);
|
|
209
|
+
}
|
|
210
|
+
settle(message) {
|
|
211
|
+
const call = this.pending.get(message.id);
|
|
212
|
+
if (!call)
|
|
213
|
+
return; // already timed out, or replayed after a promotion
|
|
214
|
+
this.pending.delete(message.id);
|
|
215
|
+
clearTimeout(call.timer);
|
|
216
|
+
if (message.ok) {
|
|
217
|
+
call.resolve(message.result);
|
|
218
|
+
}
|
|
219
|
+
else {
|
|
220
|
+
call.reject(new Error(message.error ?? 'the database tab reported an error'));
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
runLocally(op, args) {
|
|
224
|
+
const engine = this.engine;
|
|
225
|
+
if (!engine) {
|
|
226
|
+
return Promise.reject(new Error('not the leader'));
|
|
227
|
+
}
|
|
228
|
+
const fn = engine[op];
|
|
229
|
+
if (typeof fn !== 'function') {
|
|
230
|
+
return Promise.reject(new Error(`unknown engine operation: ${op}`));
|
|
231
|
+
}
|
|
232
|
+
return fn.apply(engine, args);
|
|
233
|
+
}
|
|
234
|
+
// ── Dispatch ───────────────────────────────────────────────────────────
|
|
235
|
+
/** Run `op` here if this tab leads, otherwise ask whoever does. */
|
|
236
|
+
async call(op, ...args) {
|
|
237
|
+
if (this.disposed) {
|
|
238
|
+
throw new Error('SharedEngineTransport has been disposed');
|
|
239
|
+
}
|
|
240
|
+
if (this.engine) {
|
|
241
|
+
return (await this.runLocally(op, args));
|
|
242
|
+
}
|
|
243
|
+
// Do not shout into an empty channel: on a cold start every tab is a
|
|
244
|
+
// follower for the moment it takes the winner to stand its engine up.
|
|
245
|
+
await this.leaderKnown;
|
|
246
|
+
// Promotion can happen while waiting, in which case this is now local.
|
|
247
|
+
if (this.engine) {
|
|
248
|
+
return (await this.runLocally(op, args));
|
|
249
|
+
}
|
|
250
|
+
const id = this.nextCallId++;
|
|
251
|
+
return new Promise((resolve, reject) => {
|
|
252
|
+
const timer = setTimeout(() => {
|
|
253
|
+
this.pending.delete(id);
|
|
254
|
+
reject(new Error(`the tab running database "${this.dbName}" did not answer ` +
|
|
255
|
+
`"${op}" within ${this.timeoutMs}ms`));
|
|
256
|
+
}, this.timeoutMs);
|
|
257
|
+
this.pending.set(id, {
|
|
258
|
+
op,
|
|
259
|
+
args,
|
|
260
|
+
resolve: resolve,
|
|
261
|
+
reject,
|
|
262
|
+
timer,
|
|
263
|
+
});
|
|
264
|
+
this.channel.postMessage({
|
|
265
|
+
kind: 'call',
|
|
266
|
+
from: this.clientId,
|
|
267
|
+
id,
|
|
268
|
+
op,
|
|
269
|
+
args,
|
|
270
|
+
});
|
|
271
|
+
});
|
|
272
|
+
}
|
|
273
|
+
// ── EngineTransport ────────────────────────────────────────────────────
|
|
274
|
+
async init() {
|
|
275
|
+
// Whoever wins the election calls the engine's own init(); a follower has
|
|
276
|
+
// nothing to initialise and must not wait for an engine it will not build.
|
|
277
|
+
await Promise.race([this.election.promoted, this.leaderKnown]);
|
|
278
|
+
}
|
|
279
|
+
createDatabase(path) {
|
|
280
|
+
return this.call('createDatabase', path);
|
|
281
|
+
}
|
|
282
|
+
attachDatabase(path) {
|
|
283
|
+
return this.call('attachDatabase', path);
|
|
284
|
+
}
|
|
285
|
+
detachDatabase(dbHandle) {
|
|
286
|
+
// Followers share the leader's attachment; detaching it because one tab
|
|
287
|
+
// closed would pull the database out from under every other tab.
|
|
288
|
+
if (!this.engine)
|
|
289
|
+
return Promise.resolve();
|
|
290
|
+
return this.call('detachDatabase', dbHandle);
|
|
291
|
+
}
|
|
292
|
+
execute(dbHandle, txHandle, sql, params = []) {
|
|
293
|
+
return this.call('execute', dbHandle, txHandle, sql, params);
|
|
294
|
+
}
|
|
295
|
+
query(dbHandle, txHandle, sql, params = []) {
|
|
296
|
+
return this.call('query', dbHandle, txHandle, sql, params);
|
|
297
|
+
}
|
|
298
|
+
startTransaction(dbHandle, options = {}) {
|
|
299
|
+
return this.call('startTransaction', dbHandle, options);
|
|
300
|
+
}
|
|
301
|
+
commit(txHandle) {
|
|
302
|
+
return this.call('commit', txHandle);
|
|
303
|
+
}
|
|
304
|
+
rollback(txHandle) {
|
|
305
|
+
return this.call('rollback', txHandle);
|
|
306
|
+
}
|
|
307
|
+
mkdir(path) {
|
|
308
|
+
return this.call('mkdir', path);
|
|
309
|
+
}
|
|
310
|
+
exists(path) {
|
|
311
|
+
return this.call('exists', path);
|
|
312
|
+
}
|
|
313
|
+
readFile(path) {
|
|
314
|
+
return this.call('readFile', path);
|
|
315
|
+
}
|
|
316
|
+
writeFile(path, data) {
|
|
317
|
+
return this.call('writeFile', path, data);
|
|
318
|
+
}
|
|
319
|
+
async dispose() {
|
|
320
|
+
if (this.disposed)
|
|
321
|
+
return;
|
|
322
|
+
this.disposed = true;
|
|
323
|
+
for (const [, call] of this.pending) {
|
|
324
|
+
clearTimeout(call.timer);
|
|
325
|
+
call.reject(new Error('SharedEngineTransport has been disposed'));
|
|
326
|
+
}
|
|
327
|
+
this.pending.clear();
|
|
328
|
+
this.channel.removeEventListener('message', this.onMessage);
|
|
329
|
+
this.channel.close();
|
|
330
|
+
const engine = this.engine;
|
|
331
|
+
this.engine = null;
|
|
332
|
+
// Resign last: releasing the lock promotes another tab, which will build
|
|
333
|
+
// its own engine, and this one should be gone before that happens.
|
|
334
|
+
await engine?.dispose();
|
|
335
|
+
await this.election.resign();
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
exports.SharedEngineTransport = SharedEngineTransport;
|
|
339
|
+
//# sourceMappingURL=shared-transport.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shared-transport.js","sourceRoot":"","sources":["../../src/browser/shared-transport.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;;;AAIH,uDAAgD;AA6Ch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