You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I trying to use PGDATA in my code too, but i can't found it as and some other API like EmscriptenBuiltinFilesystem or BaseFilesystem, since they are not public available.
Here import from chunk file with generated name, so end users can't guess this filename and entities names that are transformed too. Every new release such names may be changed and they have no types.
The solution
My proposal is to make FS API are public available for end users.
Specifically, import all entities that may be useful for implement custom FS. Also, add a minimal docs to explain some basic concepts end users need to know to implement custom FS well.
Use cases
My use case is i looking for an embedded DB that will keep all data in RAM, and will provide a ways to sync this data with encrypted FS that implemented by my application code.
I tried to use dumpDataDir + loadDataDir approach, but it does not work for me, since my application requires frequent synchronization for every single change in database, and in my tests this way with dumpDataDir + loadDataDir takes a seconds (2.3 seconds) that is unacceptable. The acceptable time for single sync is 10-100ms, but not more.
If you think i can improve performance with no custom FS, please tell about it. But keep in mind that we can't save any data directly at user file system, since it would be a security failure. We may interact only with virtual file system implemented by application.
The text was updated successfully, but these errors were encountered:
The problem
I trying to implement my own storage to keep data in RAM and efficient synchronization with encrypted file system.
I checked NodeFS implementation as reference for my own, but when i trying to implement it i have problem - some API has not been published.
For example, reference implementation have next code:
pglite/packages/pglite/src/fs/nodefs.ts
Lines 3 to 4 in 9aff673
I trying to use
PGDATA
in my code too, but i can't found it as and some other API likeEmscriptenBuiltinFilesystem
orBaseFilesystem
, since they are not public available.See this example of nodefs.d.ts file from bundle:
Here import from chunk file with generated name, so end users can't guess this filename and entities names that are transformed too. Every new release such names may be changed and they have no types.
The solution
My proposal is to make FS API are public available for end users.
Specifically, import all entities that may be useful for implement custom FS. Also, add a minimal docs to explain some basic concepts end users need to know to implement custom FS well.
Use cases
My use case is i looking for an embedded DB that will keep all data in RAM, and will provide a ways to sync this data with encrypted FS that implemented by my application code.
I tried to use
dumpDataDir
+loadDataDir
approach, but it does not work for me, since my application requires frequent synchronization for every single change in database, and in my tests this way withdumpDataDir
+loadDataDir
takes a seconds (2.3 seconds) that is unacceptable. The acceptable time for single sync is 10-100ms, but not more.If you think i can improve performance with no custom FS, please tell about it. But keep in mind that we can't save any data directly at user file system, since it would be a security failure. We may interact only with virtual file system implemented by application.
The text was updated successfully, but these errors were encountered: