-
Type: Task
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
Problem
Hey, we are looking into offloading some of the workloads of our app to separate thread in NodeJS (Electron specifically).
I remember there was some example with sync: true config, that utilised separate BrowserWindow, but I cannot remember where it was located.
Electron supports WebWorkers, however it is discouraged to import NativeModules inside the worker due to lack of support from libraries. Do you know if Realm supports multi-threading for NodeJS Workers though?
https://www.electronjs.org/docs/latest/tutorial/multithreading#native-nodejs-modules
I found this issue, so it looks like workers are not yet supported?
Maybe you have workaround for Electron case though? Like spawning 2 browser windows, which would theoretically have 2 separate event loops?
Can it be done? And can both threads use the same Sync configuration and can both write to the Realm? Or one has to be read-only? Or maybe it is not possible at all?
Solution
No response
Alternatives
No response
How important is this improvement for you?
Would be a major improvement
Feature would mainly be used with
Atlas Device Sync