en.osm.town is one of the many independent Mastodon servers you can use to participate in the fediverse.
An independent, community of OpenStreetMap people on the Fediverse/Mastodon. Funding graciously provided by the OpenStreetMap Foundation.

Server stats:

268
active users

#glowdust

0 posts0 participants0 posts today

#Glowdust now comes with a single threaded, request based page cache. This lets me serve pages to multiple transactions, asynchronously, without spending time optimizing a thread safe version.

Which means I can start actually implementing the stuff I wrote about last week:

radiki.dev/posts/glowdust-tx-i

TL;DR Transaction state is kept in the page cache and it's basically just another file. This causes a lot of interesting behavior to experiment with.

radiki.dev · A novel design for database transactionsShow to a person how to use a database, they will be miserable for a lifetime. But if you truly want to break their spirit, show them how to build one

2500 words, a princess bride meme and my surprise at finishing it.

That's about 86% of what you need to know about my new blog post.

The remaining 14% is describing a new architecture for database transaction subsystems. In #Rust , obviously.

Do let me know what you think - especially about the backpressure design.

radiki.dev/posts/glowdust-tx-i

radiki.dev · A novel design for database transactionsShow to a person how to use a database, they will be miserable for a lifetime. But if you truly want to break their spirit, show them how to build one

Because transaction state is

1) stored in the page cache and so

2) can be moved freely between threads,

transactions can be served from a priority queue from a fixed number of workers.

Thus, #Glowdust has, by design, the ability to automatically balance CPU and memory use.

Memory pressure pushes back via I/O to persist overflowing tx state and serve page faults.

CPU pressure reduces time spent on each tx per worker, which makes tx state accumulate in memory, which releases CPU.

Pro tip: If you want to step through a thread, you can pass it a sync_channel(1) and use write/read calls to block and unblock it.

You can do this with multiple threads and create a state machine for controlling synchronization and reproducing or checking for race conditions.

I am currently doing this with #Glowdust and it works pretty well for writing tests for transaction isolation.

#Glowdust update: Multithreaded transaction execution works, with tx state storage in the page cache.

What remains is commit(), i.e. make per tx state visible to other transactions.

I mean, there are a million steps after that, but for now, only commit() remains.

TheRegister on the 50th anniversary of #SQL

theregister.com/2024/05/31/fif

50 years is a lot, but for SQL I'll make an exception. It's a fantastically well thought out system.

But as one of its creator says, it's not enough

theregister.com/2024/05/10/sql

We need to progress beyond, and take advantage of modern computing platforms.

Have you looked at #Glowdust, per chance? 😉

codeberg.org/glowdust/glowdust

The Register · Codd almighty! Has it been half a century of SQL already?By Lindsay Clark

First pass of performance work done on #Glowdust|'s key memtables - it no longer deserializes not in use entries.

The point of optimization work this early was to get tests running fast enough, so I can run the entire test suite as often as I like during development.

Next up, start bringing transactions in the LS store.

(and you can read all about the store layout in my latest post: radiki.dev/posts/glowdust-lsm-

radiki.dev · Designing an LSM Tree store for Glowdust, part 1: Store design and key memtableGo ahead, reinvent the wheel, you can always hope for something rounder.

A few years ago I wrote my first blog post - a code walkthrough of the storage format of a new, at the time, database: #neo4j

Yesterday my post was about my own storage format - a log structured key value store for #Glowdust.

Personal milestone moment, this one. Happy to be sharing it here.

radiki.dev/posts/glowdust-lsm-

radiki.dev · Designing an LSM Tree store for Glowdust, part 1: Store design and key memtableGo ahead, reinvent the wheel, you can always hope for something rounder.

You can't have a database without a store, now, can you?

Well, you can, actually, but that's not fun.

So #Glowdust now sports its own native store.

Check it out - a log structured store for functions, the first step towards a full LSM Tree implementation.

Written in #Rust, of course

radiki.dev/posts/glowdust-lsm-

radiki.dev · Designing an LSM Tree store for Glowdust, part 1: Store design and key memtableGo ahead, reinvent the wheel, you can always hope for something rounder.

As the sole developer of #Glowdust, I need to choose if I'll support platforms without #io_uring support or drop uring support altogether.

The small experiment with CSV import showed me that I can't maintain two I/O stacks.

Plus, I started Glowdust in part because I wanted to play around with uring.

Hmm. Let's be honest - no one but me cares about Glowdust. And I only run #Linux.

And that's how, in the space of a single toot, I decided to do only io_uring.

Thank you for following along.

The advantage of using a log structured store for #Glowdust is that transaction state can be maintained without memory allocations - in fact, at the moment, the only allocation is the stack for the bytecode interpreter.

The disadvantage is that I don't yet know how to code a LS store and it's slow AF.