Split the async fs interface, indexedDB, and sqlite-specific code
See original GitHub issueHello !
This is very useful work you have been doing here. If I understand well, this repository contains both the Atomic
and Shared Array Buffer logic required to provide an async interface on top of emscripten’s synchronous FS, and the code that implements this interface with an IndexedDB backend.
-
Is there any part of this code that is specific to sql.js, or could this be reused with any emscripten-compiled code that interacts with files ? If there is code that is specific to sql.js, then would it be feasible to split it from the sync-async bridge and the IndexedDB logic ?
-
Would it be possible to split the IndexedDB backend, in order to let the user provide a different implementation? I’m thinking about an HTTP backend in particular.
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (5 by maintainers)
Top Results From Across the Web
IndexedDB with promises and async/await - Filip Vitas - Medium
Show me the code. Let's write code to put some data into database. ... Although IndexedDB has asynchronous API, this looks so pretty,...
Read more >IndexedDB - The Modern JavaScript Tutorial
The native interface to IndexedDB, described in the specification ... to split apart IndexedDB transactions and “other” async stuff.
Read more >Jquery failing to call async and await for indexed db creation
Here is some sample code for you: function open(name, version) { return new Promise((resolve, reject) => { const request ...
Read more >Untitled
Another import or export format, another table data populating strategy, another SQLite database format, SQL code formatter, code highlighter, ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Interesting stuff here!
In general, I am hoping that we do a large rewrite of the emscripten FS code in the next few months (ASMFS, or related). So any large change might not make sense to add there atm. A small one might make sense though, as if it can be done as a small additional JS FS, then those will get ported to the new rewrite eventually (is the general plan).
I’d be interested to hear if there are things such a rewrite should do to make this easier. One goal is to write it to native code as much as possible to allow for easier sync/async interation, which from the description here sounds relevant. (cc @rstz who I’ve been talking with about this recently)
@kripken Sorry for my delay – had a lot to catch up on in the last month. Going to be watching this from now on though.
I filed an issue describing the lock/unlock needs on emscripten: https://github.com/emscripten-core/emscripten/issues/15070
Sounds good about the rest of the filesystem changes. As long as there is a way to hook in some JS to those APIs.