frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

Show HN: I made MediaManager, a modern alternative to the *ARR ecosystem

https://github.com/maxdorninger/MediaManager
1•cookiedude24•1m ago•0 comments

Show HN: XID – Dependency-Free Unique ID Generator in One C File

https://gist.github.com/Ferki-git-creator/17450d52d143f746f00fb1c903c06bb2
1•FerkiHN•2m ago•0 comments

Ancient DNA solves mystery of Hungarian, Finnish language family's origins

https://news.harvard.edu/gazette/story/2025/07/ancient-dna-solves-mystery-of-hungarian-finnish-language-familys-origins/
1•gbxyz•3m ago•0 comments

The job market felt broken so I built my own fix

https://www.woberry.com/
1•frankvienna•10m ago•0 comments

Genesis Protocol: The first communication protocol for digital life

https://genesis-protocol.org/
1•dethron•15m ago•1 comments

Astronomers witness dawn of new solar system for first time

https://abcnews.go.com/Technology/astronomers-witness-dawn-new-solar-system-1st-time/story?id=123832751
1•teleforce•19m ago•0 comments

New Multithreading Framework for Dyson Sphere Program

https://store.steampowered.com/news/app/1366540/view/543361383085900510
1•hexhu•25m ago•0 comments

Why choose async/await over threads? (2024)

https://notgull.net/why-not-threads/
1•kugurerdem•26m ago•0 comments

Ask HN: Non AI users. What do you do when you are stuck and docs aren't clear

2•sonderotis•26m ago•4 comments

Show HN: Emporium – An Open Source Shopify Alternative for Creators

1•dominus_silens•32m ago•0 comments

A parallel path for GPU restore in CRIU

https://lwn.net/Articles/1024747/
2•mariuz•34m ago•0 comments

PyTorch in One Hour: From Tensors to Training Neural Networks on Multiple GPUs

https://sebastianraschka.com/teaching/pytorch-1h/
3•mariuz•35m ago•0 comments

ChatGPT Team adds users' name and organization to every prompt

https://ndurner.github.io/chatgpt-team-info-disclosure
1•ndr_•35m ago•1 comments

Welcoming the Next Generation of Programmers

https://lucumr.pocoo.org/2025/7/20/the-next-generation/
2•ingve•41m ago•0 comments

Liftkit – An open-source UI framework that solves symmetry problems

https://www.chainlift.io/liftkit
1•RedShift1•42m ago•0 comments

Input-leap/input-leap: Open-source KVM software (barrier fork)

https://github.com/input-leap/input-leap
1•xbmcuser•46m ago•0 comments

A Tour of Microsoft's Mac Lab

https://davidweiss.blogspot.com/2006/04/tour-of-microsofts-mac-lab.html
1•ingve•46m ago•0 comments

LLM Knows the Future: Uncovering Its Multi-Token Prediction Potential

https://arxiv.org/abs/2507.11851
1•Mizza•49m ago•0 comments

On Notebooks and Thinking Better Thoughts

https://fd93.me/notebooks-thinking-better-thoughts
1•fdavies93•1h ago•0 comments

Real time translation for real life language exchange, lectures and events

https://www.voicetranslate.app
1•chiho13•1h ago•0 comments

Emacs send-to (a.k.a. macOS sharing) merged upstream

https://xenodium.com/emacs-send-to-aka-macos-sharing-merged-upstream
2•xenodium•1h ago•0 comments

SQL: 2023 Property-Graph Queries in Postgres 18 Beta

https://gavinray97.github.io/blog/postgres-sql-property-graphs
1•gavinray•1h ago•0 comments

A Day in the Life of a Petty Criminal (1990) [video]

https://www.youtube.com/watch?v=5KD0Wk-5wYw
1•austinallegro•1h ago•0 comments

Microsoft scraps the new Windows 11 system tray after user criticism

https://www.pcworld.com/article/2852876/microsoft-scraps-the-new-windows-11-system-tray-after-user-criticism.html
1•taubek•1h ago•0 comments

US Plans Steep 93.5 Percent Tariff on Chinese Graphite, Key EV Battery Material

https://www.nytimes.com/2025/07/17/business/trump-graphite-tariff-electric-vehicles.html
4•bookofjoe•1h ago•1 comments

AI is killing the web. Can anything save it?

https://www.economist.com/business/2025/07/14/ai-is-killing-the-web-can-anything-save-it
20•edward•1h ago•25 comments

Official Google Cloud NPM package includes malware via a dependency

https://github.com/googleapis/google-cloud-node/issues/6510
3•laurent123456•1h ago•0 comments

Listening to Mozart's sonata K. 448 enhances verbal working memory performance

https://link.springer.com/article/10.1007/s12144-025-07755-6
2•thazework•1h ago•1 comments

All of the Epstein Files that have either been leaked or released

https://pastebin.com/ym7hff3J
2•doener•1h ago•0 comments

Vide Coding Day 10

https://twitter.com/jasonlk/status/1946589071519948952
1•tosh•1h ago•1 comments
Open in hackernews

Async I/O on Linux in databases

https://blog.canoozie.net/async-i-o-on-linux-and-durability/
72•jtregunna•4h ago

Comments

jtregunna•4h ago
Post talks about how to use io_uring, in the context of building a "database" (a demonstration key-value cache with a write-ahead log), to maintain durability.
tlb•3h ago
The recovery process is to "only apply operations that have both intent and completion records." But then I don't see the point of logging the intent record separately. If no completion is logged, the intent is ignored. So you could log the two together.

Presumably the intent record is large (containing the key-value data) while the completion record is tiny (containing just the index of the intent record). Is the point that the completion record write is guaranteed to be atomic because it fits in a disk sector, while the intent record doesn't?

ta8645•3h ago
It's really not clear in the article. But I _think_ the gains are to be had because you can do the in-memory updating during the time that the WAL is being written to disk (rather than waiting for it to flush before proceeding). So I'm guessing the protocol as presented, is actually missing a key step:

    Write intent record (async)
    Perform operation in memory
    Write completion record (async)
    * * Wait for intent and completion to be flushed to disk * *
    Return success to client
gsliepen•2h ago
But this makes me wonder how it works when there are concurrent requests. What if a second thread requests data that is being written to memory by the first thread? Shouldn't it also wait for both the write intent record and completion record having been flushed to disk? Otherwise you could end up with a query that returns data that after a crash won't exist anymore.
Manuel_D•2h ago
It's not the write ahead log that prevents that scenario, it's transaction isolation. And note that the more permissive isolation levels offered by Postgres, for example, do allow that failure mode to occur.
avinassh•1h ago

    * * Wait for intent and completion to be flushed to disk * *
if you wait for both to complete, then how it can be faster than doing a single IO?
jmpman•3h ago
“Write intent record (async) Perform operation in memory Write completion record (async) Return success to client

During recovery, I only apply operations that have both intent and completion records. This ensures consistency while allowing much higher throughput. “

Does this mean that a client could receive a success for a request, which if the system crashed immediately afterwards, when replayed, wouldn’t necessarily have that request recorded?

How does that not violate ACID?

JasonSage•2h ago
As best I can tell, the author understands that the async write-ahead fails to be a guarantee where the sync one does… then turns their async write into two async writes… but there’s still no guarantee comparable to the synchronous version.

So I fail to see how the two async writes are any guarantee at all. It sounds like they just happen to provide better consistency than the one async write because it forces an arbitrary amount of time to pass.

m11a•1h ago
Yeah, I feel like I’m missing the point of this. The original purpose of the WAL was for recovery, so WAL entries are supposed to be flushed to disk.

Seems like OP’s async approach removes that, so there’s no durability guarantee, so why even maintain a WAL to begin with?

nephalegm•30m ago
Reading through the article it’s explained in the recovery process. He reads the intent log entries and the completion entries and only applies them if they both exist.

So there is no guarantee that operations are committed by virtue of not being acknowledged to the application (asynchronous) the recovery replay will be consistent.

I could see it would be problematic for any data where the order of operations is important, but that’s the trade off for performance. This does seem to be an improvement to ensure asynchronous IO will always result in a consistent recovery.

nromiun•2h ago
Slightly off topic but anyone knows when/if Google is going to enable io_uring for Android?
ozgrakkurt•1h ago
Great to see someone going into this. I wanted to do a simple LSM tree using io_uring in Zig for some time but couldn't get into it yet.

I always use this approach for crash-resistance:

- Append to the data (WAL) file normally.

- Have a seperate small file that is like a hash + length for WAL state.

- First append to WAL file.

- Start fsync call on the WAL file, create a new hash/length file with different name and fsync it in parallel.

- Rename the length file onto the real one for making sure it is fully atomic.

- Update in-memory state to reflect the files and return from the write function call.

Curious if anyone knows tradeoffs between this and doing double WAL. Maybe doing fsync on everything is too slow to maintain fast writes?

I learned about append/rename approach from this article in case anyone is interested:

- https://discuss.hypermode.com/t/making-badger-crash-resilien...

- https://research.cs.wisc.edu/adsl/Publications/alice-osdi14....

toolslive•1h ago
it's possible to unify the WAL and the tree. There are some append only B-tree implementations. https://github.com/Incubaid/baardskeerder fe.
avinassh•1h ago
There are also CoW B Trees not entirely similar, but kinda same.
tobias3•1h ago
I don't get this. How can two(+) WAL operations be faster than one (double the sync IOPS)?

I think this database doesn't have durability at all.

avinassh•1h ago
I don't get this scheme at all. The protocol violates durability, because once the client receives success from server, it should be durable. However, completion record is async, it is possible that it never completes and server crashes.

During recovery, since the server applies only the operations which have both records, you will not recover a record which was successful to the client.

LAC-Tech•26m ago
Great article, but I have a question:

The problem with naive async I/O in a database context at least, is that you lose the durability guarantee that makes databases useful. When a client receives a success response, their expectation is the data will survive a system crash. But with async I/O, by the time you send that response, the data might still be sitting in kernel buffers, not yet written to stable storage.

Shouldn't you just tie the successful response to a successful fsync?

Async or sync, I'm not sure what's different here.