picovolt 0.8.0 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +18 -1
- package/package.json +1 -1
- package/picovolt_bg.wasm +0 -0
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# PicoVolt (PVDB)
|
|
2
2
|
|
|
3
3
|
[](https://github.com/MiniJe/picovolt/actions/workflows/ci.yml)
|
|
4
|
-
[](CHANGELOG.md)
|
|
5
5
|
[](LICENSE)
|
|
6
6
|

|
|
7
7
|
|
|
@@ -152,6 +152,23 @@ module (`import picovolt.dbapi2 as sqlite`), and the Go `database/sql` driver
|
|
|
152
152
|
positional `?` only, no SQL transactions, no JOINs, and `CREATE TABLE` takes
|
|
153
153
|
column names only.
|
|
154
154
|
|
|
155
|
+
## Server mode
|
|
156
|
+
|
|
157
|
+
An optional HTTP and JSON server reaches the engine over a socket. One dedicated
|
|
158
|
+
thread owns the database and runs statements serially, while a pool of HTTP
|
|
159
|
+
worker threads accepts concurrent connections and hands each request to that
|
|
160
|
+
thread over a channel, so the single-threaded core is unchanged.
|
|
161
|
+
|
|
162
|
+
```sh
|
|
163
|
+
cargo build --release --features server
|
|
164
|
+
./target/release/picovolt-server --memory --addr 127.0.0.1:8080
|
|
165
|
+
curl -s localhost:8080/v1/query -d '{"sql":"SELECT 1 + 1","params":[]}'
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
Endpoints are `POST /v1/query`, `GET /v1/tx`, and `GET /v1/health`. There is no
|
|
169
|
+
authentication or TLS, so run it behind a reverse proxy. See
|
|
170
|
+
[src/bin/server.rs](src/bin/server.rs).
|
|
171
|
+
|
|
155
172
|
## Extending PicoVolt
|
|
156
173
|
|
|
157
174
|
There are two extension paths: sandboxed WebAssembly user-defined functions, and
|
package/package.json
CHANGED
package/picovolt_bg.wasm
CHANGED
|
Binary file
|