asami

lilactown 2022-02-16T15:41:04.931079Z

I have a dumb q: would asami support storing its on disk data in a single file?

quoll 2022-02-16T15:46:13.002039Z

no

quoll 2022-02-16T15:46:42.802389Z

It relies on blocks being a consistent size, and those sizes vary between use

quoll 2022-02-16T15:49:02.013119Z

It’s possible to pack a committed database into a one file, but it would need to change the architecture to update a bit to use file offsets rather than block numbers.

quoll 2022-02-16T15:50:32.820629Z

It might be possible to build all the required structures in memory, and then pack/flush to disk when it’s done. That’s an interesting idea. It would be quite a bit of work over where things are right now, but now that I think about it, it’s actually a bit like what I was considering for cloud storage

lilactown 2022-02-16T15:51:19.945349Z

interesting

lilactown 2022-02-16T15:52:07.655279Z

I suppose that would limit the size of the db to whatever can fit in memory

lilactown 2022-02-16T15:52:23.878659Z

(which is certainly more than enough for my use cases)

lilactown 2022-02-16T15:53:13.828589Z

I'm reading your white paper about storage rn

quoll 2022-02-16T15:53:46.571769Z

No… it would limit the size of the transaction to whatever can fit in memory

lilactown 2022-02-16T15:53:56.947709Z

ah

quoll 2022-02-16T15:54:37.040449Z

Though, it would be loading up existing blocks into memory, and doing the transaction into those. Then when the transaction is over, it would take any modified blocks and write them to the end of the file

lilactown 2022-02-16T15:55:34.348219Z

another, somewhat separate question I've been thinking about is storing data on disk with some sort of structural sharing

lilactown 2022-02-16T15:56:25.771619Z

e.g. if I could store the history of modifying a nested clojure structure without storing copies of each one

lilactown 2022-02-16T15:58:06.487099Z

I don't have a complete mental model of asami's storage architecture yet but I'm staring at the image of tree blocks -> data blocks thinking about it...

quoll 2022-02-16T15:58:34.041229Z

There are 2 options…

quoll 2022-02-16T16:01:00.249339Z

• Breaking the data up into a graph, and letting Asami handle it. That basically means duplicating how Vectors and TreeMaps work, which may be a lot of work. • Repurposing Asami’s data structures to what you want, and forgetting about Asami

lilactown 2022-02-16T16:04:04.890819Z

would asami's data structures be suitable for such a thing?

quoll 2022-02-16T16:04:32.236169Z

trees and blocks. You can build anything with that

quoll 2022-02-16T16:04:39.687429Z

And I did 😜

lilactown 2022-02-16T16:04:56.338629Z

😄

quoll 2022-02-16T16:10:27.108909Z

You also have raw access to the memory mapped files

quoll 2022-02-16T16:10:49.149399Z

which is easy enough to do for yourself… unless you want files larger than 2GB

quoll 2022-02-16T16:11:10.606999Z

In which case, you could just use the Asami block files code

lilactown 2022-02-16T16:16:12.703069Z

if/when I have time, you have given me inspiration to try and use asami's block files code

lilactown 2022-02-16T16:17:01.821739Z

stepping into a new role at work as a temporary manager... we'll see if I have any energy for coding again 😛

lilactown 2022-02-16T16:17:13.223209Z

but I still have so many ideas!

quoll 2022-02-16T16:18:37.927099Z

Same here… unrelated job, but trying to keep up the energy for coding.

quoll 2022-02-16T16:19:13.309459Z

This is actually why I’ve been quiet with Asami recently… I’ve been trying to recharge by doing “fun” stuff on the side

lilactown 2022-02-16T16:20:12.283589Z

I'm very much of the idea that we ought to follow the fun

lilactown 2022-02-16T16:20:25.485169Z

"Play Driven Development"

lilactown 2022-02-16T16:21:07.147389Z

asami is already so cool 😎 lots of other things to explore until it's fun again

quoll 2022-02-16T16:25:06.944439Z

Oh, it’s fun! I just have SO MUCH TO DO on it

quoll 2022-02-16T16:25:43.520329Z

Right now, I’m implementing 2 features: with operations, and background transaction writing (so that transactions return quickly)

Max 2022-02-16T18:12:48.381879Z

Hi! I’m enjoying Paula’s talk at reClojure. Is there any documentation on Asami’s assertion metadata capabilities (https://youtu.be/Ug__63h_qm4?t=339)? That’s something I’d like to learn more about. I took a look through the Asami repo’s wiki and didn’t find much. (I posted a similar question way back in December, but figured I’d try again since the message may have gotten lost in the shuffle)

quoll 2022-02-16T18:13:34.233139Z

Oh! I haven’t put an API up for that yet 😳

quoll 2022-02-16T18:14:01.032139Z

I need to extend the query language and the update API

🙏 1
🙏🏻 1