MatrixAI / Polykey-Desktop

Polykey Desktop - Open Source Decentralized Secret Sharing System for Zero Trust Workflows

Home Page:https://polykey.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PolyKey Nativescript Multi-threading Model

CMCDragonkai opened this issue · comments

Original Author: robert-cronin

An inital async architecture has been settled on in js-encryptedfs in issue 4. This relies on webworkers via threads.js.

In nativescript, however, we would like to rely on nativescript's inbuilt multi-threading model for mobile clients. This comes with certain limitations, the main one being an inability to serialize objects to send between worker contexts. In threads.js, this is easy with Transferable Objects.

It might be possible in nativescript author our own memory sharing and pass Buffers by reference but it still remains to be seen if this is possible. If we can't transfer objects in nativescript, we might have to just serialize the buffers accept a performance hit.

Not relevant anymore. Not using nativescript. React native infrastructure may be relevant later.