DEV Community

Discussion on: A stable alternative to SQLite for offline desktop app?

Collapse
 
patarapolw profile image
Pacharapol Withayasakpunt • Edited

You might not need asynchronicity if you use SQLite in WAL mode:
You can also take a look at PRAGMA synchronous

Thanks. I will try to build on top of SQLite, then. Probably with an embedded Node.js server.

User input queries

My current API for a single line string is like this -- github.com/patarapolw/qsearch#usage ; although I prefer Elasticsearch-ish query_string.

When will I need a real full-text search?

PouchDB in Node.js is CouchDB-syncable with LevelDB bindings. There is also experimental PouchDB server, which probably use the same API as CouchDB.

RocksDB seems to have Java binding, but it still might not be an answer for me.

CockroachDB needs a server.

Basically it depends on what you need to store :)

I need to query a table with dynamic columns. That's why I say Record<string, string>. It is definitely doable in SQLite (JSON1 extension) and PostGRES (which is a server).

Collapse
 
rhymes profile image
rhymes

Yeah I think SQLite is what you are looking for. Why do you need a Node server though? Can't you just access it from the desktop app?

Thread Thread
 
patarapolw profile image
Pacharapol Withayasakpunt • Edited

I can use ipcMain/ipcRenderer for Electron as well, but

  • I want to avoid Electron, and use web server, which is much smaller instead. And, I don't have a very good experience with zserge/webview...
  • I want to enable user-defined CSS styling, which is much better supported in real web browser, or Electron; than perhaps Qt or JavaFX.
  • I want to app to be programmable, so I expose the API via REST + OpenAPI / Swagger.
  • I do fear a little about security on localhost. Perhaps I will use a token-based authentication.