Hacker News new | ask | show | jobs
by ragnarok451 1268 days ago
Ok I know it's not in vogue right now but this is actually a good use for the blockchain. Like the database here could just be placed on-chain in a smart contract, and anyone could read it (for free, only writes would cost money) forever, as long as at least one person is operating a node on ethereum. No ongoing hosting or serving costs. Anyone could build an API that did like photo generation or whatever on top of it, and builders could always access the raw data directly.
2 comments

You seem to be describing something like a classic P2P content-distribution system - BitTorrent w/ magnet links, IPFS, CoralCDN, etc. Could you explain a bit more what part of your proposal would be incompatible with those existing systems?
Not too familiar with CoralCDN, will check that out. Would say the comparison with IPFS is apt, BitTorrent though requires people to seed on a per file basis right? so versioning for the source of truth etc becomes tough and you need people to care about your data specifically.

IPFS is an alternate solution, but as addresses are not updatable someone somewhere needs to keep track of where the canonical source is. Further, there is no API built in - the data would live at some address, but someone still needs to construct a way to get it without just downloading the whole data dump at once. Perhaps you shard across different files but that has its own issues.

On chain with Ethereum, you can use a smart contract which allows CRUD operations on the data on a per item basis. The latest version of the smart contract data is clear. The API is basically set with the smart contract - infra to get that has already been built with libraries like ethers, and will continue to be maintained since there are other contracts/products out there that rely on the same infra.

The blockchain does not need to be thrown at every source of data store.

Sometimes a tiny lil' db is all you need to serve some nice cacheable data :)