Pekka Enberg
e1b2d043be
Limbo 0.0.8
2024-11-20 19:16:11 +02:00
Pekka Enberg
a18f33f93b
bindings/wasm: Add example using Drizzle ORM
2024-11-20 18:20:39 +02:00
Pekka Enberg
81b68b7047
Limbo 0.0.7
2024-11-20 18:15:36 +02:00
Pekka Enberg
20340038a5
bindings/wasm: Add integration tests
2024-11-20 11:54:34 +02:00
Pekka Enberg
bfce49c7eb
bindings/wasm: Fix conversion to JsValue
2024-11-20 11:54:34 +02:00
Pekka Enberg
b65d0a72ba
bindings/wasm: Implement Statement.raw()
2024-11-20 11:47:28 +02:00
Pekka Enberg
0fb1e59c9a
Limbo 0.0.6
2024-11-18 19:16:15 +02:00
Pekka Enberg
e818bdb3ef
Merge 'open file in append mode' from Pere Diaz Bou
...
Closes #409
2024-11-18 19:15:05 +02:00
Pere Diaz Bou
2cc89f712e
open file in append mode
2024-11-18 18:06:01 +01:00
Pekka Enberg
a83e62f6f4
Limbo 0.0.5
2024-11-18 14:57:00 +02:00
Pekka Enberg
8efeb16b82
Merge 'bindings/wasm: "SELECT 1" benchmark' from Pekka Enberg
...
This adds a benchmark for "SELECT 1" that essentially just evaluates the
overhead of calling into the library. Looks like WebAssembly adds 2.5x
overhead compared to native code...
```
penberg@vonneumann perf % node perf-limbo.js
cpu: Apple M1
runtime: node v18.19.0 (arm64-darwin)
benchmark time (avg) (min … max) p75 p99 p999
------------------------------------------------- -----------------------------
• Statement
------------------------------------------------- -----------------------------
SELECT 1 771 ns/iter (624 ns … 2'183 µs) 750 ns 1'085 ns 1'750 ns
summary for Statement
SELECT 1
penberg@vonneumann perf % node perf-better-sqlite3.js
cpu: Apple M1
runtime: node v18.19.0 (arm64-darwin)
benchmark time (avg) (min … max) p75 p99 p999
------------------------------------------------- -----------------------------
• Statement
------------------------------------------------- -----------------------------
SELECT 1 302 ns/iter (166 ns … 779 µs) 292 ns 375 ns 1'000 ns
summary for Statement
SELECT 1
```
Reviewed-by: Pere Diaz Bou <pere-altea@homail.com >
Closes #394
2024-11-16 19:00:39 +02:00
Pekka Enberg
60cc8c0347
bindings/wasm: "SELECT 1" benchmark
...
This adds a benchmark for "SELECT 1" that essentially just evaluates the
overhead of calling into the library. Looks like WebAssembly adds 2.5x
overhead compared to native code...
```
penberg@vonneumann perf % node perf-limbo.js
cpu: Apple M1
runtime: node v18.19.0 (arm64-darwin)
benchmark time (avg) (min … max) p75 p99 p999
------------------------------------------------- -----------------------------
• Statement
------------------------------------------------- -----------------------------
SELECT 1 771 ns/iter (624 ns … 2'183 µs) 750 ns 1'085 ns 1'750 ns
summary for Statement
SELECT 1
penberg@vonneumann perf % node perf-better-sqlite3.js
cpu: Apple M1
runtime: node v18.19.0 (arm64-darwin)
benchmark time (avg) (min … max) p75 p99 p999
------------------------------------------------- -----------------------------
• Statement
------------------------------------------------- -----------------------------
SELECT 1 302 ns/iter (166 ns … 779 µs) 292 ns 375 ns 1'000 ns
summary for Statement
SELECT 1
```
2024-11-16 13:10:23 +02:00
Pekka Enberg
82ec900b07
bindings/wasm: Fix VFS.sync() function signature
...
We don't expect any return value from the underlying `fsync()` so fix
the function signature accordingly.
Fixes the following obscure error:
```
TypeError: Cannot convert undefined to a BigInt
at wasm://wasm/00942492:wasm-function[1501]:0x1c4dc1
at wasm://wasm/00942492:wasm-function[694]:0x189586
at wasm://wasm/00942492:wasm-function[50]:0x143d7
at wasm://wasm/00942492:wasm-function[60]:0x3f91a
at new Database (/Users/penberg/src/penberg/limbo/bindings/wasm/pkg/limbo_wasm.js:162:26)
at file:///Users/penberg/src/penberg/limbo/bindings/wasm/perf/perf-limbo.js:5:12
at ModuleJob.run (node:internal/modules/esm/module_job:195:25)
at async ModuleLoader.import (node:internal/modules/esm/loader:336:24)
at async loadESM (node:internal/process/esm_loader:34:7)
at async handleMainPromise (node:internal/modules/run_main:106:12)
```
2024-11-16 13:07:32 +02:00
Pere Diaz Bou
6cd0f03643
core: create databases from limbo
2024-11-15 12:09:07 +01:00
Pere Diaz Bou
87c80b2a07
use core wal file for wasm
2024-11-14 17:54:20 +01:00
Pere Diaz Bou
71ac1eacb7
Merge 'btree: cursor with lineal stack structure' from Pere Diaz Bou
...
Removed MemPage from the code in favor of an array to encode the stack
of the cursor. This is both simpler and better in terms of memory
access.
O_DIRECT was removed from WAL file as it introduces alignment
constraints that are too hard to follow in regular appends. Maybe in the
future?
Closes #378
2024-11-13 18:23:31 +01:00
Pere Diaz Bou
e2276c2e9d
O_DIRECT disable on WAL
2024-11-13 13:45:42 +00:00
Pekka Enberg
b7ca2c9823
bindings/wasm: Add Database.prepare() and Statement.all()
...
This adds `Database.prepare()` and `Statement.all()` APIs to the Wasm
bindings so that you can actually get something useful out of the
library.
2024-11-13 12:22:35 +02:00
Pekka Enberg
40f517b03f
Fix Wasm packaging
...
The `wasm-pack` too has a known bug where it forgets to add snippets to
`package.json`:
https://github.com/rustwasm/wasm-pack/issues/1206
Let's fix that with some bash magic.
2024-11-13 11:28:22 +02:00
Pere Diaz Bou
ce8378793e
btree: run until finished or IO + bug fixes
2024-11-11 17:03:15 +01:00
Pere Diaz Bou
ce1367b76a
move wal creation
2024-11-07 13:51:02 +01:00
Pere Diaz Bou
0b46648c0e
write wal header on init
2024-11-07 13:29:57 +01:00
Pere Diaz Bou
8eb3c89227
wasm,sim fixes
2024-11-05 15:41:30 +01:00
Pere Diaz Bou
f43e53a815
fix wasm and simulator wal impl
2024-11-05 15:29:54 +01:00
Pere Diaz Bou
f66e3925f3
fix imports
2024-11-05 15:29:54 +01:00
Pere Diaz Bou
f009eb35c6
suspendable checkpoint
2024-11-05 15:29:54 +01:00
Pere Diaz Bou
c0e51c4ca6
wip wal
2024-11-05 15:29:53 +01:00
김선우
28884181be
Fix clippy
2024-09-15 16:23:27 +09:00
mazchew
671b61ba19
add time querying to io trait
2024-08-25 22:55:15 +08:00
mazchew
156005694a
added rng to io trait for simulation
2024-08-22 23:24:02 +08:00
Pekka Enberg
933bf89bb9
wasm: VFS interface to use Node filesystem API
...
This adds a basic VFS interface to use Node filesystem API from Rust
code. Not a lot, but parses the SQLite database file header and
completes database open without errors.
2024-08-04 11:12:21 +03:00
Pekka Enberg
7df979cd3a
wasm: Enable console.error() panic hook
...
Makes debugging a little bit easier...
2024-08-04 09:45:27 +03:00
Pekka Enberg
ed4116e7c2
core: Introduce Wal trait
...
We're going to need it for WebAssembly anyway, which does not have
standard filesystem support.
2024-08-03 12:34:10 +03:00
Pekka Enberg
3f7c788e5b
core: Rename DatabaseStorage methods
...
Let's call them read_page() and write_page().
2024-08-03 10:35:14 +03:00
Pekka Enberg
8a54e31803
core: Rename PageIO to DatabaseStorage
2024-08-03 10:33:52 +03:00
Pekka Enberg
4349b946e5
core: Eliminate PageSource wrapper
...
The PageSource wrapper is useless. Let's inline it and use PageIO
directly.
2024-08-03 10:27:20 +03:00
Pere Diaz Bou
2b221d2b3c
fix conflicts
...
Signed-off-by: Pere Diaz Bou <pere-altea@hotmail.com >
2024-07-31 17:38:33 +02:00
Pekka Enberg
351242561d
Kill anyhow usage
...
Switch anyhow to explicit `LimboError` type using thiserror crate, which
lets us make error handling more structured.
2024-07-25 17:15:08 +03:00
Joan Martinez
4bcae54aa9
fix: use Arc to handle IO
2024-07-21 19:01:58 +02:00
Pekka Enberg
a0c92f6d80
Switch to workspace versioning
2024-07-17 08:39:36 +03:00
Pekka Enberg
2684341bac
Initial pass on deterministic simulator
...
The simulator does not do much, but does discover failures on Linux with
io_uring, though, so it's a start.
2024-06-27 18:32:04 +03:00
Pere Diaz Bou
427103b199
core,wasm: add missing write procedure to wasm
2024-06-19 20:54:55 +02:00
Pekka Enberg
9a73ded4fa
Add a Cursor trait and use it
...
We need an abstract cursor trait to implement a sorter, for example.
2024-03-28 15:01:52 +02:00
Pekka Enberg
5eb9ec0d03
Improve JavaScript/Wasm packaging
2024-03-03 14:18:32 +02:00
Pekka Enberg
ed9f3e6d1e
Single-threaded architecture
...
Use Rc instead of Arc and replace the concurrent LRU with
single-threaded SIEVE.
Fixes #23
Fixes #29
2024-03-03 12:44:45 +02:00
Pekka Enberg
44dcd48071
Fix WebAssembly build
2024-01-14 15:29:27 +02:00
Pekka Enberg
6c0fb89671
wasm: Fix IO.get() function signature
2024-01-14 15:04:05 +02:00
Pekka Enberg
2267ee121b
Introduce Completion type
2023-11-09 21:11:48 +02:00
Pekka Enberg
9098744a37
Rename to Limbo
2023-09-30 15:40:35 +03:00
Pekka Enberg
de6f327a4a
Move raw buffer to I/O module
2023-09-30 14:19:55 +03:00