17 ms·
/dev/null is an ACID compliant database
- cluckindan 11mo agoAlways instantly consistent, always available, and perfectly tolerant of partitioning. Truly, it is the only database which can be scaled to unlimited nodes and remain fully CAP.
- thfuran 11mo agoIt's really fast too.
- ozim 11mo agoI guess we have a perfect idea for vaporware here. (pun intended) I am putting my marketing hat on right now.
- pasteldream 11mo agoReminds me of Falso. https://inutile.club/estatis/falso/ https://inutile.club/estatis/falso/
- the_jeremy 11mo agoYou've been beaten to the punch: https://devnull-as-a-service.com/ https://devnull-as-a-service.com/
- tgma 11mo agoAlways available? Clearly you have not experienced situations with no /dev mounted.
- DonHopkins 11mo agoEven worse, /dev/null replaced by a normal file!
- pasteldream 11mo agoOne easy way to create such a situation is to use bwrap without --dev.
- inopinatus 11mo agoEnterprise DBAs will nevertheless provision separate /dev/null0 and /dev/null1 devices due to corporate policy. In the event of an outage, the symlink from null will be updated manually following an approved run book. Please note that this runbook must be revalidated annually as part of the sarbox audit, without which the null device is no longer authorised for production use and must be deleted
- alliao 11mo agopain
- eru 11mo agoNot just instantly consistent on one machine, but globally sharded all across the universe.
- geoffbp 11mo agoIs there a case where dev null can fail?
- tgv 11mo agoI can think of two: whe running out of file descriptors or memory. But then /dev/null1 would fail too.
- deleted 11mo ago[deleted]
- pyuser583 11mo agoI've used /dev/null for exactly this purpose. I have output that needs to go somewhere, and I don't want to worry about whether that somewhere can handle it. Later on in deployment, it will go somewhere else. Somewhere that has been evaluated for being able to handle it. In that way, /dev/null is to storage what `true` is to execution - it just works.
- CaptainOfCoit 11mo agoBug free software is a pipe dream, but if there is anything I've never encountered any bugs with, /dev/null and true is certainly in the top 3.
- noir_lord 11mo agoJoking aside I can’t ever remember seeing a bug in either bash or zsh, never seen either crash or segfault and anytime I’ve had weirdness it’s always turned out to be me missing something. Both (along with a lot of the standard utilities) are a testament to what talented C programmers plus years of people beating on them in unintended ways can achieve in terms of reliability/stability.
- qwertox 11mo agoAmen.
- gucci-on-fleek 11mo ago> I can’t ever remember seeing a bug in either bash Shellshock [0] is a rather famous example, but bugs like that are rare enough that they make the news when they're found. [0] https://en.wikipedia.org/wiki/Shellshock_%28software_bug%29 https://en.wikipedia.org/wiki/Shellshock_%28software_bug%29
- PokestarFan 11mo agoI've been able to trigger a segfault in zsh with certain plugins, a directory with a lot of files/folders, and globs with a bunch of * characters.
- imcritic 11mo agoHow does a disaster recovery plan with it look like?
- tadfisher 11mo agoThere is never a disaster; reading from /dev/null will return the same result before and after any external event.
- wolrah 11mo ago/dev/null is globally redundant across almost every *nix-ish system in operation. Just reinstall your software on whatever is convenient and all the same data will be there.
- mpyne 11mo agosudo mknod /dev/null c 1 3 && sudo chmod 666 /dev/null might do it on many systems
- rezonant 11mo agoBut is /dev/null web scale?
- pasteldream 11mo agoreference for the unaware: https://youtube.com/watch?v=b2F-DItXtZs https://youtube.com/watch?v=b2F-DItXtZs
- epistasis 11mo agoYes, /dev/null can even power sites like zombo.com
- bottled_poe 11mo agoWhat’s the I/O throughput of /dev/null ?
- CaptainOfCoit 11mo agoYou start dealing with Heisen-throughput at that point, it goes as high as you can measure.
- epistasis 11mo agoSingle client, I'm getting ~5GB/s, both on an 8-year-old intel server, and on my M1 ARM chip. However with a single server, it doesn't perfectly linearly scale with multiple clients. I'm getting 1 client: 5GB/s 2 clients: 8GB/s 3 client: 8.7GB/s
- fukka42 11mo agoI'm easily reaching 30GB/s with a single client: dd if=/dev/zero of=/dev/null bs=1M status=progress A second dd process hits the same speed.
- epistasis 11mo agoMy artisanal architecture design uses writes with a few characters and uses unix pipes: yes | pv > /dev/null I hope that in my next rewrite I can advance to larger block sizes.
- QuiCasseRien 11mo agoFast and easy to read, funny and fuckingly true ! best post of the week ^^
- hmokiguess 11mo agoI guess it is also idempotent then
- gchamonlive 11mo agoBest stack cloud providers don't want you to know about, /dev/null for db and https://github.com/kelseyhightower/nocode https://github.com/kelseyhightower/nocode for the backend.
- quietbritishjim 11mo agoWTF is going on with the issues and pull requests for that repo?
- gchamonlive 11mo agoIn nocode you fix nothing and you don't change anything, that's why issues and pull requests are a mess, they literally cannot be dealt with by design.
- fennec-posix 11mo agoHad to see for myself, and yeah... that's a whole lot of chaos. I'm sure I'd get the joke if I could read Chinese though.
- eru 11mo agoAsk Google Translate?
- SanjayMehta 11mo agoThey're using it to communicate in code to each other.
- QuantumNomad_ 11mo agoWell they should stop that and start communicating in nocode instead.
- sundarurfriend 11mo agoThe less substance there is to it, the easier it is to talk about. The Chinese comments ("issues") also seem to be the same kind of jokes as the English ones, "no code means no bugs, perfect", etc., from the few I tried getting translations of. I imagine this went viral on Chinese social media, which makes sense since it's the sort of joke that's easy to translate and doesn't depend on particular cultural assumptions or anything.
- charcircuit 11mo ago/dev/null is not a database. By this logic is a hard disk a database, is a CD a database. No. They are storage mediums. You could store a database on them, but they themselves are not a database. Considering there is no way to read back data written to /dev/null it will not be useful for storing database data.
- deleted 11mo ago[deleted]
- chrisweekly 11mo agoseems you've missed the joke
- charcircuit 11mo agoIt's not a funny one if it was one. Of course something is going to be a bad database if it's not a database.
- voidfunc 11mo ago"Its not funny" says the one guy in a room where literally everyone else is laughing and riffing on the joke. Your humor unit might be defective.
- charcircuit 11mo ago[dead]
- brobbin 11mo agoIt's nerd humor. You're not supposed to find it funny, but nod along approvingly while noticing how awfully clever you are for noticing the attempt at being funny.
- dmytrish 11mo agoConsidering that D in "ACID" stands for "durable", it's a pretty sloppy joke.
- deleted 11mo ago[deleted]
- deleted 11mo ago[deleted]
- doublerabbit 11mo agoIdea: NaaS. Null as a service.
- jibbolo 11mo agoSomebody thought about that already https://devnull-as-a-service.com/ https://devnull-as-a-service.com/ :)
- 1970-01-01 11mo agoSo if you could somehow get something stuck in /dev/null would it cause a panic or what happens?
- idontwantthis 11mo agoThis reminds me of how I would write a HashCode implementation on intro CS exams in college: ‘return 5’
- keithnz 11mo agotook a while to pipe my multi-terabyte db to /dev/null but now that I have I'm saving a ton of money on storage.
- jefftk 11mo ago"The system transitions from one valid state to another" is clearly false: the system only has a single state.
- mpyne 11mo agoOne of the first state machine you'll ever learn about in undergrad permits transitions from a state back to itself, so I don't see this as a barrier.
- layer8 11mo agoNot on Windows.
- munchlax 11mo agoYou could emulate it. Open windows, throw everything out, close it.
- tech234a 11mo agoThis reminds me of the S4 storage service: http://www.supersimplestorageservice.com/ http://www.supersimplestorageservice.com/ Discussed on HN a few times, but apparently not for a few years now: https://hn.algolia.com/?q=http%3A%2F%2Fwww.supersimplestorageservice.com%2F https://hn.algolia.com/?q=http%3A%2F%2Fwww.supersimplestorag...
- johnfn 11mo agoNot only that, it provides all 3 components of CAP!
- _joel 11mo agoThe Jespsen tests pass quickly too!
- bitwize 11mo agoYes, but does it support sharding? Sharding is the secret ingredient in the web scale sauce.
- mjb 11mo agoBest of all, /dev/null is also serializable (but not strict serializable) under many academic and textbook definitions. Specifically, these definitions require that transactions appear to execute in some serial order, and place no constraints on that serial order. So the database can issue all reads at time zero, returning empty results, and all writes at the time they happen (because who the hell cares?). The lesson? Demand real-time guarantees.
- mjb 11mo agoThis doesn't work as cleanly for SQL-style transactions where there are tons of RW transactions, sadly.
- theandrewbailey 11mo ago/dev/null is the ultimate storageless function. It's like serverless, but for PII, and deployable anywhere!
- BiraIgnacio 11mo agoA strong business opportunity right there.
- jihadjihad 11mo agoIn a similar vein, this is one of the most interesting things I’ve come across on HN over the years: https://www.linusakesson.net/programming/pipelogic/index.php https://www.linusakesson.net/programming/pipelogic/index.php Past HN post: https://news.ycombinator.com/item?id=15363029 https://news.ycombinator.com/item?id=15363029
- jmux 11mo agoI hadn’t seen this before, this is sick! thanks for posting it here :)
- wging 11mo agoAnd fastjson is an extremely fast json parser: https://github.com/qntm/fastjson https://github.com/qntm/fastjson
- lloeki 11mo agoAround 2004-2005 during some research at the end of my curriculum I happened to be doing with some specific jobs that were parallelised and data flowing as it was processed along a component diagram for visualisation, and it looked very familiar.... So I had this idea that you'd design code to be applied to a processing unit of specific capacity which would lead to execution flowing at a certain speed when applied a certain computation potential... and surprise surprise the relation would be uh, linear, and say you increase a loop's count and so the code would _resist_, or you'd increase computation potential to increase the flow. So uh, yeah, Ohm's law but it's _code_ that's resistive. And then I started to look for the pattern and find code with inductive properties, and code with capacitive properties, and some deeper properties emerged when you started modelling stuff with multiple processing units and data flowed around, split (map?), rejoined (reduce?). And there was something strangely efficient about a way to see code that way and optimise using _laws_ describing the whole execution flow using familiar tools as a whole instead of thinking in gritty details barely higher-level than MOV AX... you "just" had to design code and the execution system so that it would operate in this kind of framework and allow that kind of analysis to identify bottlenecks and weird interplay actions across components. And then I brought that up to my mentor and he said "well that's complete lunacy, stop thinking about that and focus on your current work" and, uh, case closed. That was the young and naive me who thought that research labs were made to do think-outside-the-box connect-the-dots innovative stuff...
- blourvim 11mo agoI love this
- dheera 11mo agoI guess /dev/null is also an excellent source of investment advice, you are guaranteed to not lose money
- yuppiemephisto 11mo agoAnd the axiom of empty set is an inaccessible cardinal axiom
- hshdhdhehd 11mo agoIt is also local first, low latency, data residency compliant, SOC2 compliant, zero dependency and webscale.
- schonfinkel 11mo agoDoes it have sharding? I heard sharding is the secret sauce for webscale.
- rollcat 11mo agoYou can deploy /dev/null on any number of nodes, and expect exact consistency, high availability, and perfect partition tolerance with concurrent writes and reads bounded only by your hardware/kernel.
- justinhj 11mo agoAdd an mcp server and I'm in
- tonyhart7 11mo agoit looks promising but what about AI /dev/null usage????
- simultsop 11mo agoYou need an FAQ section, we have so many questions for this marvellous solution. Is it portable to all linux distros? Where is the ubuntu command to install it? What license does it use, is it free or else? Is it really open source or source only?
- novoreorx 11mo agoWhat a weird title, you can say it's ACID but it's not a database
- sevg 11mo ago> What a weird title, you can say it's ACID but it's not a database You’re right, we should ban jokes that aren’t 100% correct!
- novoreorx 11mo agoSorry if you feel my words mean. I'm not criticizing the joke, I just think it could make a better title, even for a joke, by adding quotes around "database" or calling it a "storage service," since it does allow data to be read. A good joke is both entertaining and difficult to deny.
- DeathArrow 11mo agoMore than that, /dev/null is infinitely scalable.
- raggi 11mo agoIt's also horizontally scalable: https://gist.github.com/raggi/560087#file-shardnull https://gist.github.com/raggi/560087#file-shardnull
- rollcat 11mo agoI understand this is supposed to be satire, but IMHO a well-executed joke should still be well-written and easy to follow. This "<statement> unless <condition>" is just terrible to read, and I can't even tell if FFI is necessary here, or a part of the joke. Funny not funny.
- raggi 11mo agoThere was quite a different context when it was written 15 years ago, but essentially the same root jokes.
- deleted 11mo ago[deleted]
- yard2010 11mo agoI love vacously truths (not sure if this is how you say it in English) All the people I've met in London were androids.
- tczMUFlmoNk 11mo agoThe term is correct. Grammatically, we would say, "I love vacuous truths", or, "I love vacuously true statements". (To my ear the second version sounds very slightly more appropriate, because in mathematics "vacuously true" is a bit of a set phrase, but both are fine.)
- Perz1val 11mo agoDon't forget to feed your void. `dd if=/dev/zero of=/dev/null bs=500M count=1`
- ramon156 11mo agoI'm gonna be that guy, tyop at the bottom > entreprise
- sph 11mo agoIt's ACID compliant. But it's not a database.
- ozim 11mo agoW just need R&D money to solve reading back from it, but that's just a matter of time we can definitely solve it in a year or two. This tech is just around the corner I promise, then we will be first to the market and all the big tech companies will want to buy us out, imagine how much we can earn. /s
- sph 11mo agoIf you have infinite time, you can find your data in /dev/random
- ozim 11mo agoIf you pay or get some people to finance R&D we can make it work, I guess we could market it as data recovery solution because I guess we can find every data in there, even from thumb drive someone lost in 2004.
- jerf 11mo agoIt's nearly solved now. "ChatGPT, I had a database here but it seems to have gone missing. It had a table with "User", "Email", and "Amount Paid"; can you reconstruct it for me?" ... "I dunno boss, that's what the AI said."
- dzogchen 11mo agoIt's ACID compliant yes, but it is not a database.
- gunalx 11mo agoYou say it is always empty, but. I have seen weird issues coming from /dev/null not actually being empty but being a file or symlink (dont remember) With garbage data.
- xandrius 11mo agoReminds me of mangodb: https://github.com/dcramer/mangodb https://github.com/dcramer/mangodb The DB at cloud scale
- luckystarr 11mo agoNow make an algebra out of the CAP theorem. It's not already one, isn't it? Didn't read the paper.
- magicalhippo 11mo agoReminds me of how in the math lectures, our professor would always point out he was ignoring the trivial solution[1]. That /dev/null is ACID compliant is the trivial solution of databases. Still, a jolly good read, and a nice reminder that concepts like ACID don't exist in a vaccuum. [1]: https://en.wikipedia.org/wiki/Triviality_(mathematics)#Trivial_and_nontrivial_solutions https://en.wikipedia.org/wiki/Triviality_(mathematics)#Trivi...
- yupyupyups 11mo ago>a nice reminder that concepts like ACID don't exist in a vaccuum. Except if it's in /dev/null?
- rollcat 11mo agoYou can dismiss it as a triviality, but in CS it's always worth considering (what you assume to be) an "identity" value, and its edge cases. Does your DSP algorithm work with near-zero values as well as it does with "true" zero? (hint: look up subnormal floats.)
- magicalhippo 11mo agoI was only dismissing it in the sense that if you were picking a database to use, you'd avoid the "trivial solution" of /dev/null.
- Western0 11mo agoyes
- brunoborges 11mo agoI get the joke, but IMO it doesn't pass Durability test, as what is sent to it (i.e. transactions) are not durable. Durability in ACID is about the durability of the data that is sent to the database (in this ironic post, /dev/null) once committed. "[...] completed transactions (or their effects) are recorded [...]" But I will give it that ACI do make sense! #PedanticMode
- PTOB 11mo agoLet's test that: 1. Nothing stored in /dev/null is durable. 2. Nothing is stored in /dev/null. 3. Ergo, /dev/null exhibits durability. Thank you, I'll take my check at the door.
- brunoborges 11mo agoYou are missing the part where the data did exist and that after something/someone sent it to /dev/null, the data was gone. Therefore, the data did not endure. The Durability test of ACID failed for /dev/null.
- zdw 11mo agoThe RSS feed on this site is broken.
- vlowther 11mo agoBefore it was an ACID compliant database, it was also the fastest backup solution on the market: https://bofh.bjash.com/bofh/bofh1.html https://bofh.bjash.com/bofh/bofh1.html
- jjrr1018 11mo agohttps://vldb.org/cidrdb/papers/2019/cidr2019_116.pdf https://vldb.org/cidrdb/papers/2019/cidr2019_116.pdf
- dd_xplore 11mo agoOne question though, if for some reason a poorely designed app discards data through /dev/null, is it tamper proof? Meaning can any other process or user access that information? (In runtime)
- dragonwriter 11mo agoI think it is possible for a process with root to delete the existing /dev/null and replace it with a normal file (likely to produce system instability) or a new character device (could probably be mostly transparent to anyone who didn’t know where to look for it storing its data), in which case anything sent to it could be captured.
- deleted 11mo ago[deleted]
- qwm 11mo agoI like this one better http://www.supersimplestorageservice.com/ http://www.supersimplestorageservice.com/
- phendrenad2 11mo agoReminds me of this classic highbrow techie banger https://en.wikipedia.org/wiki/Write-only_memory_(joke) https://en.wikipedia.org/wiki/Write-only_memory_(joke) See the datasheet also, I especially like the "insertions vs number of remaining pins" chart: https://web.archive.org/web/20120316141638/http://www.national.com/rap/files/datasheet.pdf https://web.archive.org/web/20120316141638/http://www.nation...
- amai 11mo agoCan it rollback transactions?
- taftster 11mo agoYes!
- taftster 11mo agoAh, how cute. An actual "old school" blog. Nostalgia. Tears in eyes. https://jyu.dev/blog/ https://jyu.dev/blog/ And the production of articles is about right too. . "Hello World" - The start of something great. [Dec 2024] . "Comparison is the Thief of Joy" - Link to another article. [Apr 2025] . "/dev/null is an ACID compliant database" - Funny, insightful. [Aug 2025] That read about like my blog 20 years ago. Funny post though, good read!
- shutupnerd003 11mo ago[dead]
- senfiaj 11mo agoThe author is a genius. If Amazon used /dev/null instead of DynamoDB, we would not experience such terrible outages.
- devnulled 11mo agoMy secret is out.
- torcete 11mo agoReminds me of the write-only memory (WOM) specs. https://en.wikipedia.org/wiki/Write-only_memory_(joke) https://en.wikipedia.org/wiki/Write-only_memory_(joke)
- torcete 11mo agoI was reading on the information paradox on black holes. I wonder if the same paradox applies to /dev/null :-D
- exabrial 11mo agoI saw a MongoDb implementation on Github awhile ago that was a wrapper around /dev/null. The thesis was if you're using MongoDb, you probably didn't weren't planning on querying anything later anyway.
- HackerThemAll 11mo agoThat article is a stinky brain fart that happens when you think you're having a moment of genius at 2:00 am.