Remix.run Logo
Joedb, the Journal-Only Embedded Database(joedb.org)
43 points by mci 3 days ago | 7 comments
xxr 2 hours ago | parent | next [-]

Was going to say that I hope Joe doesn't end up going to prison for an unspeakable crime, but then I saw it was an acronym.

kentm 2 hours ago | parent [-]

Is that a Reiser reference or am I missing something?

drbig 3 hours ago | parent | prev [-]

An approach very close to one I've been thinking about lately.

My three cents: compact the journal when its size exceeds the actual data size. With thresholds or other knobs; with the point being the initial load time should be directly proportional to the amount of actual data. Everything else/older is a backup.

addaon 3 hours ago | parent [-]

The value of the journal having history (with comments and timestamps) is huge. I think what I'd prefer to see is having a start sequence of replay journal, build in-memory structure, optionally move old journal to backup name and write out minimal/compressed/comment-and-timestamp-stripped journal to new file. Optionally could be based on size delta; e.g. write if it's less than half the size of the old journal. This keeps journals as append only, while still giving access to full history. It does require some external management to avoid file usage growth even faster than a single journal; but it reduces startup time, and allows a management strategy like just deleting backup files older than a given date (once they're in cold backup, if needed).

throwup238 2 hours ago | parent [-]

It is very valuable but compaction enables a number of use cases where events are generated in significant quantity or you need to save space, like if you’re implementing event sourcing at thw GUI layer (the event store is basically a journal).

addaon an hour ago | parent [-]

But the event store is also your undo stack, then. Keeping it infinite (or deliberately trimming it at application launch) improves user experience.

throwup238 32 minutes ago | parent [-]

You can selectively compact the journal to only compact the numerous GUI events leaving domain events uncompacted (I do this for a CAD app I develop)