uwdata / mosaic

An extensible framework for linking databases and interactive views.
https://idl.uw.edu/mosaic/
Other
866 stars 58 forks source link

Use Shared Web Workers #429

Open derekperkins opened 5 months ago

derekperkins commented 5 months ago

At least in the demos in the docs, DuckDB is running as a dedicated Web Worker. We often have users opening several tabs that would want to share the same data. Is there any reason that wouldn't work, or are there configuration knobs to tweak for that?

domoritz commented 5 months ago

I haven't played with shared worker yet but you could try instantiating a shared worker instead when intializing DuckDB wasm. Docs are at https://github.com/duckdb/duckdb-wasm/tree/main/packages/duckdb-wasm.