|
| 1 | +# Differences from desktop DataLab |
| 2 | + |
| 3 | +DataLab-Web shares the **computation engine** (Sigima) and the **processing |
| 4 | +catalog** with the desktop application: results are bit-for-bit identical for |
| 5 | +the same inputs. The differences listed below are about the **runtime |
| 6 | +environment** and a few UI surfaces, not about the science. |
| 7 | + |
| 8 | +## Runtime |
| 9 | + |
| 10 | +| Topic | Desktop DataLab | DataLab-Web | |
| 11 | +| --- | --- | --- | |
| 12 | +| Python | System CPython | Pyodide (CPython compiled to WebAssembly) | |
| 13 | +| GUI toolkit | Qt + PlotPy | React + TypeScript + Plotly.js | |
| 14 | +| Plotting | PlotPy (Qt) | Plotly.js | |
| 15 | +| Multi-threading | Native threads / processes | Web Workers (one per macro / notebook) | |
| 16 | +| File system | Native I/O | Browser file picker, drag-and-drop, OPFS | |
| 17 | +| Persistence | HDF5 on disk | HDF5 download / upload, IndexedDB workspace cache | |
| 18 | +| Remote control | XML-RPC, FastAPI Web API | In-browser proxy, optional postMessage SDK | |
| 19 | + |
| 20 | +The first load downloads Pyodide (~10 MB) and installs Sigima via |
| 21 | +`micropip`; expect 30–60 s on a cold cache. Subsequent loads are served |
| 22 | +from the browser cache. |
| 23 | + |
| 24 | +## What is intentionally different |
| 25 | + |
| 26 | +- **No native dialogs**. File open / save go through the browser's own |
| 27 | + pickers; HDF5 workspaces are downloaded as files rather than written |
| 28 | + in place. |
| 29 | +- **No Qt-only widgets**. PlotPy interactive tools (rotation, polygon |
| 30 | + picker…) are not available; equivalent flows are reimplemented with |
| 31 | + Plotly + React when applicable. |
| 32 | +- **Plugins are JavaScript or Python**. JavaScript plugins live alongside |
| 33 | + the React app; Python plugins are installed into Pyodide at runtime. |
| 34 | + See [Plugins](#plugins). |
| 35 | +- **Macros and notebooks run in Web Workers**. They have their own Pyodide |
| 36 | + instance and communicate with the main runtime through a structured |
| 37 | + proxy (`MacroRuntime`, `proxyBridge`). Long-running computations no |
| 38 | + longer freeze the UI. |
| 39 | +- **Web API server is replaced by the in-browser SDK**. Embedding |
| 40 | + DataLab-Web in another web app is done via the |
| 41 | + [`@datalab-platform/web-sdk`](https://github.com/DataLab-Platform/web/tree/main/packages/sdk) |
| 42 | + package and `postMessage`, not HTTP / XML-RPC. |
| 43 | + |
| 44 | +## What is intentionally **not** different |
| 45 | + |
| 46 | +- The **object model** (`SignalObj`, `ImageObj`, ROI, groups) is identical. |
| 47 | +- The **processing catalog** is discovered from Sigima — every function |
| 48 | + registered there appears in the menu bar with the same parameters. |
| 49 | +- **Parameter dialogs** are auto-generated from the same guidata `DataSet` |
| 50 | + schemas as in the desktop app. |
| 51 | +- **HDF5 workspace files** are interoperable: a workspace saved in |
| 52 | + desktop DataLab can be opened in DataLab-Web (and vice versa, within |
| 53 | + the limits of available processings). |
| 54 | + |
| 55 | +## Plugins |
| 56 | + |
| 57 | +JavaScript plugins are loaded from `plugins/` at startup; Python plugins |
| 58 | +are installed via `micropip` and registered through the same hook system |
| 59 | +as the desktop app. See [Plugins](plugins.md) for the practical guide. |
| 60 | + |
| 61 | +## Macros and notebooks |
| 62 | + |
| 63 | +See [Notebooks](notebooks.md) for the architecture and behaviour of the |
| 64 | +notebook subsystem. Macros follow the same model: a dedicated Pyodide |
| 65 | +worker, a proxy bridge to the main runtime, structured cell results. |
0 commit comments