Skip to content(if available)orjump to list(if available)

/dev/null is an ACID compliant database

gchamonlive

Best stack cloud providers don't want you to know about, /dev/null for db and https://github.com/kelseyhightower/nocode for the backend.

quietbritishjim

WTF is going on with the issues and pull requests for that repo?

sundarurfriend

The 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.

gchamonlive

In 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

Had 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.

SanjayMehta

They're using it to communicate in code to each other.

QuantumNomad_

Well they should stop that and start communicating in nocode instead.

nomel

I've never had a single issue with any user after moving our databases to /dev/null.

pyuser583

I'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

Bug 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

Joking 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.

gucci-on-fleek

> 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

1718627440

Programs not outputting a final newline to stdout leave a prompt that doesn't start on column 0, and readline seams to not takes this into consideration, but still optimizes redraws and overwrites so you get an inconsistent display. This bugs seam to exist in a lot of shells and interactive programs. The program causing the issue isn't POSIX conform though.

PokestarFan

I'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.

qwertox

Amen.

SanjayMehta

False.

Wait: that's just not true.

Carry on.

cluckindan

Always 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.

inopinatus

Enterprise 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

ozim

I guess we have a perfect idea for vaporware here. (pun intended)

I am putting my marketing hat on right now.

the_jeremy

You've been beaten to the punch: https://devnull-as-a-service.com/

thfuran

It's really fast too.

tgma

Always available? Clearly you have not experienced situations with no /dev mounted.

pasteldream

One easy way to create such a situation is to use bwrap without --dev.

mjb

Best 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

This doesn't work as cleanly for SQL-style transactions where there are tons of RW transactions, sadly.

theandrewbailey

/dev/null is the ultimate storageless function. It's like serverless, but for PII, and deployable anywhere!

jefftk

"The system transitions from one valid state to another" is clearly false: the system only has a single state.

BiraIgnacio

A strong business opportunity right there.

tech234a

This reminds me of the S4 storage service: 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.supersimplestorag...

rezonant

But is /dev/null web scale?

epistasis

Yes, /dev/null can even power sites like zombo.com

bottled_poe

What’s the I/O throughput of /dev/null ?

CaptainOfCoit

You start dealing with Heisen-throughput at that point, it goes as high as you can measure.

epistasis

Single 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

johnfn

Not only that, it provides all 3 components of CAP!

_joel

The Jespsen tests pass quickly too!

imcritic

How does a disaster recovery plan with it look like?

tadfisher

There is never a disaster; reading from /dev/null will return the same result before and after any external event.

wolrah

/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.

hmokiguess

I guess it is also idempotent then