|
smollerGraph 0.20.2
A small graph database, from scratch
|
Accepted
To try the explorer, someone had to clone the repository, build it, load the Wikidata facts and run sg serve, or run Docker Compose, and a copy anyone could reach would be a server kept up for them (0014). The library is an embedded one (0002), without threads, mapped memory or sockets, its files are plain reads and writes, and its records have fixed sizes, in fields of fixed widths (0007), so Emscripten compiles it as it is (episode 18). The facts are 3.3 MB, and the graph built from them, with its embeddings, is about 29 MB of files, most of it embeddings; building it from the facts, embeddings and all, takes about a fifth of a second on the Mac.
emcmake, CMake makes sg.js and sg.wasm from the library and src/web.cc, and packs data/wikidata.txt in sg.data. src/web.cc gives JavaScript, through embind, the four questions sg serve answers, as the same JSON from the same functions in api.h, and build, which makes the graph from the facts and gives each node its FastRP embedding along PARENT_TAXON.ui/api.js asks the graph in the page when sg.js is beside it, and sg serve over HTTP when it isn't, and the status line says which.build-web/explorer holds the whole explorer, served by any static file server. The Dockerfile's explorer stage builds it in Emscripten's image, 7.0.0, and runs the module's test in Node, and CI publishes it with the API docs, at nenuadrian.github.io/smollerGraph/explorer.deploy.sh behind Caddy (0014): a machine to pay for and keep up, for a graph nobody can change.sg.sg serve share the UI, so a change to the page is a change to both. tests/web_test.mjs checks the browser build's answers, in Node.