6,898 karma · joined December 12, 2016
This query returns -1 (minus one, not one), which seems correct to me. The first date is before the second:
select time_compare(
time_date(1927, 12, 31, 23, 58, 08, 0, 28800000),
time_date(1927, 12, 31, 23, 58, 09, 0, 28800000)
);
-1 select time_to_nano(time_now());
-- 1722979335431295000- Iterators (range / types / pull / slices / maps).
- Timer changes (garbage collection and reset/stop behavior).
- Canonical values with the `unique` package.
- HTTP cookie handling.
- Copying directories.
- Slices and atomics changes.
I got a bit carried away with Codapi and later Redka (Redis+SQLite), but eventually returned to the book :)
Here is the JS widget and integration guides:
You can use it to build your own sandboxes, or use existing ones to write interactive guides like these: https://github.com/nalgeon/tryxinyminutes
— Small memory footprint even for large datasets.
— ACID transactions.
— SQL interface for introspection and reporting.
SQLite only allows one writer at a time, so concurrent writes will fail with a "database is locked" (SQLITE_BUSY) error.
There are two ways to enforce the single writer rule:
1. Use a mutex for write operations.
2. Set the maximum number of DB connections to 1.
Intuitively, the mutex approach seems better, because it does not limit the number of concurrent read operations. The benchmarks show the following results:
- GET: 2% better rps and 25% better p50 response time with mutex
- SET: 2% better rps and 60% worse p50 response time with mutex
Due to the significant p50 response time mutex penalty for SET, I've decided to use the max connections approach for now.
[1]: https://github.com/nalgeon/redka/blob/main/internal/sqlx/db....
> Both in-process (Go API) and standalone (RESP) servers.
In-process means that the database is "embedded / clientside" in your terms.
— switch
— restore
— sparse-checkout
— worktree
— bisect
But it's easier said than done. Especially if you read HN :)
So yeah, it's a pretty tough deal.