sql-js / sql-js/sql.js

[feedback wanted] Removing the webworker code from sql.js

Open
#377 27 comments 14 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

discussion
Dominant language
JavaScript
Stars
13.7k
Forks
1.1k
PR merge metrics
No merged PRs in 30d

Description

I feel like today, providing a custom, limited webworker API, based on message-passing instead of promises is not the best choice, and is not useful to many. On the contrary, it creates confusion to have so many different assets available for download. When needed, it is very easy to turn the main library code into a web worker, in an automated way, without loosing any of the original API, using libraries like comlink.

What I propose :

  • remove the worker-specific code from the main sql.js repository
  • add a note in the readme about how to run the code in a web worker
  • if someone can commit to maintaining the old WebWorker code (@kaizhu256 ?) : create a second repository in the sql-js organization, containing the webworker, publishing separate release assets. The repository could use continuous integration to automatically build assets without duplicating any code from the main sql.js repository. I can create the initial setup for the repository if someone is willing to maintain it in the long term.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Review the worker-specific code and README in the sql.js repository first. Confirm the scope of removing the worker assets and documenting a Comlink-based alternative, then resolve the unanswered maintenance and separate-repository questions before considering the work done.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, sqlite, wasm
Domain
databases, web-dev
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.