DEV Community

Ravern Koh
Ravern Koh

Posted on • Edited on

8 2

The database that can store the Internet

Wouldn't it be awesome if you could save the entire Internet into a database? Well, you can now do so! Infinite exploits a simple loophole in your operating system to enable you to store an infinite amount of data, without using a single byte.

How it works

A file contains data, which is measured in bytes. If a file contains Hello!, it takes up 7 bytes (remember to count the newline character). If a file contains Bye bye~, it takes up 9 bytes. Simple.

Now what if a file contains nothing? How many bytes would the file take up? That's right, 0! But a file can still store data, even if it contains nothing. Where? In its name of course! If we store data in its name, we can now have a file that stores data, but contains nothing, and thus takes up 0 bytes!

Here, have some evidence.

Evidence

I like it!

The source code for this project can be found here. Feel free to give it a ⭐️ and use it in production 🤪!

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

Top comments (2)

Collapse
 
frosnerd profile image
Frank Rosner

Haha way to go! I once thought about writing a database with unlimited write-throughput scalability called /dev/null/db. Writing a value would simply write to /dev/null. Reading a key would return from /dev/random so if you distribute you can read and write without any coordination, being eventually consistent. But your project is way better :D

Gave me a good laugh :)

Collapse
 
ravernkoh profile image
Ravern Koh

Thanks! Your idea is pretty hilarious too haha :D

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay