frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Show HN: OLMDB – ACID embedded key-value store for Node.js/Bun

https://github.com/vanviegen/olmdb
2•vanviegen•7mo ago
Recently I was looking for a fast on-disk key/value store for server-side JavaScript. I expected to find an overwhelming amount of choice, but https://leveljs.org/ appeared to be the only active project. As it doesn't support transactions and it doesn't scale to more than 1 JavaScript process, it's not exactly what I was hoping for.

So, I set out to create something myself: a thin NAPI layer around http://www.lmdb.tech/doc/index.html. LMDB is cool because it's very fast and allows multiple processes to do lockless read-only transactions in parallel. And it's very much proven tech.

Eventually, the thin NAPI layer grew to be a little less thin, because I want to support simultaneous read/write transactions as well. The main trade-off that LMDB makes, though, is that it allows only a single read/write transaction at a time. This is how I've solved it:

1. I've introduced application-level 'logical' transactions. A single JavaScript process can have many logical transactions running simultaneous (say one for each async request handler function).

2. Reads within a logical transaction are handled by a read-only LMDB transaction/snapshot. Logical transactions within the same process that are started shortly after one another can share a single LMDB transaction.

3. Because reads in LMDB are very fast, they're synchronous function calls. They return `ArrayBuffer` objects that point at the actual on-disk data memory mapped by LMDB: zero-copy!

4. Writes are initially stored in an in-memory buffer attached to the transaction. Subsequent reads within that transaction search the (indexed) buffer first, so that uncommitted updates can be read back within the transaction itself.

5. We also keep track of all reads being done in the transaction, and a checksum of the values that were read.

6. Commits for read-only transaction don't do anything except release some resources, and happen synchronously.

7. Commits for read/write transactions are more involved:

- A socket connection is setup to the 'commit worker' daemon. This daemon is started automatically if it isn't running yet for a particular database. It will also automatically stop when unused.

- The client hands the control over the transaction details and buffers (which are located in a shared memory segment) over to the daemon for processing.

- The daemon starts an LMDB read/write transaction, within which it can process a large number of logical transactions. This massively improves throughput, as the sync() and top-level block rewrites can be amortized over many logical transactions.

- For each logical transaction the daemon verifies that the results for all transaction reads haven't changed since they were initially performed. If they were, that indicates a race condition, which causes the library to rerun the logical transaction function.

- If the logical transaction was not raced, the updates are applied to in the LMDB read/write transaction, and then later committed together with the rest of the batch.

Phew... so that turned out a little more, uh, interesting than the thin NAPI layer I set out to do. I'm calling it OLMDB, for Optimistic LMDB!

Show HN: I built a free UCP checker – see if AI agents can find your store

https://ucphub.ai/ucp-store-check/
1•vladeta•3m ago•1 comments

Show HN: SVGV – A Real-Time Vector Video Format for Budget Hardware

https://github.com/thealidev/VectorVision-SVGV
1•thealidev•5m ago•0 comments

Study of 150 developers shows AI generated code no harder to maintain long term

https://www.youtube.com/watch?v=b9EbCb5A408
1•lifeisstillgood•5m ago•0 comments

Spotify now requires premium accounts for developer mode API access

https://www.neowin.net/news/spotify-now-requires-premium-accounts-for-developer-mode-api-access/
1•bundie•8m ago•0 comments

When Albert Einstein Moved to Princeton

https://twitter.com/Math_files/status/2020017485815456224
1•keepamovin•10m ago•0 comments

Agents.md as a Dark Signal

https://joshmock.com/post/2026-agents-md-as-a-dark-signal/
1•birdculture•11m ago•0 comments

System time, clocks, and their syncing in macOS

https://eclecticlight.co/2025/05/21/system-time-clocks-and-their-syncing-in-macos/
1•fanf2•13m ago•0 comments

McCLIM and 7GUIs – Part 1: The Counter

https://turtleware.eu/posts/McCLIM-and-7GUIs---Part-1-The-Counter.html
1•ramenbytes•15m ago•0 comments

So whats the next word, then? Almost-no-math intro to transformer models

https://matthias-kainer.de/blog/posts/so-whats-the-next-word-then-/
1•oesimania•17m ago•0 comments

Ed Zitron: The Hater's Guide to Microsoft

https://bsky.app/profile/edzitron.com/post/3me7ibeym2c2n
2•vintagedave•20m ago•1 comments

UK infants ill after drinking contaminated baby formula of Nestle and Danone

https://www.bbc.com/news/articles/c931rxnwn3lo
1•__natty__•20m ago•0 comments

Show HN: Android-based audio player for seniors – Homer Audio Player

https://homeraudioplayer.app
2•cinusek•21m ago•0 comments

Starter Template for Ory Kratos

https://github.com/Samuelk0nrad/docker-ory
1•samuel_0xK•22m ago•0 comments

LLMs are powerful, but enterprises are deterministic by nature

2•prateekdalal•26m ago•0 comments

Make your iPad 3 a touchscreen for your computer

https://github.com/lemonjesus/ipad-touch-screen
2•0y•31m ago•1 comments

Internationalization and Localization in the Age of Agents

https://myblog.ru/internationalization-and-localization-in-the-age-of-agents
1•xenator•31m ago•0 comments

Building a Custom Clawdbot Workflow to Automate Website Creation

https://seedance2api.org/
1•pekingzcc•34m ago•1 comments

Why the "Taiwan Dome" won't survive a Chinese attack

https://www.lowyinstitute.org/the-interpreter/why-taiwan-dome-won-t-survive-chinese-attack
2•ryan_j_naughton•34m ago•0 comments

Xkcd: Game AIs

https://xkcd.com/1002/
1•ravenical•36m ago•0 comments

Windows 11 is finally killing off legacy printer drivers in 2026

https://www.windowscentral.com/microsoft/windows-11/windows-11-finally-pulls-the-plug-on-legacy-p...
1•ValdikSS•36m ago•0 comments

From Offloading to Engagement (Study on Generative AI)

https://www.mdpi.com/2306-5729/10/11/172
1•boshomi•38m ago•1 comments

AI for People

https://justsitandgrin.im/posts/ai-for-people/
1•dive•39m ago•0 comments

Rome is studded with cannon balls (2022)

https://essenceofrome.com/rome-is-studded-with-cannon-balls
1•thomassmith65•44m ago•0 comments

8-piece tablebase development on Lichess (op1 partial)

https://lichess.org/@/Lichess/blog/op1-partial-8-piece-tablebase-available/1ptPBDpC
2•somethingp•46m ago•0 comments

US to bankroll far-right think tanks in Europe against digital laws

https://www.brusselstimes.com/1957195/us-to-fund-far-right-forces-in-europe-tbtb
3•saubeidl•47m ago•0 comments

Ask HN: Have AI companies replaced their own SaaS usage with agents?

1•tuxpenguine•50m ago•0 comments

pi-nes

https://twitter.com/thomasmustier/status/2018362041506132205
1•tosh•52m ago•0 comments

Show HN: Crew – Multi-agent orchestration tool for AI-assisted development

https://github.com/garnetliu/crew
1•gl2334•52m ago•0 comments

New hire fixed a problem so fast, their boss left to become a yoga instructor

https://www.theregister.com/2026/02/06/on_call/
1•Brajeshwar•54m ago•0 comments

Four horsemen of the AI-pocalypse line up capex bigger than Israel's GDP

https://www.theregister.com/2026/02/06/ai_capex_plans/
1•Brajeshwar•54m ago•0 comments