Skip to content

Clouds, Torrent, IPFS, and Blockchains

Vipertech (Affolter Matias) edited this page Oct 21, 2023 · 1 revision

In this article, we will compare different systems for storing lightweight images, such as pixel art of around 5 kB when encoded in a PNG of type indexed palette, which reduces the weight of the image by 70% when using tools like PNGQuant or OXIpng.

PNGQuant and Image File Sizes

PNGQuant is a popular tool for reducing the size of PNG images by optimizing the color palette. It achieves significant file size reduction, making it a great choice for images like pixel art. To put this in perspective, a typical JPEG image may weigh around 300 kB on average, while smartphone pictures can easily reach 5 MB due to their higher quality and resolution.

Lossy vs. Lossless Image Formats

Before diving into image storage systems, it's essential to understand the difference between lossy and lossless image formats. Lossy formats, like JPEG, achieve compression by discarding some image data, which can lead to a reduction in quality. In contrast, lossless formats, like PNG, preserve all image data, maintaining the highest quality but often resulting in larger file sizes.

Efficient Storage of 5 kB Images

A 5 kB image can be stored more efficiently, making it 50 to 1000 times cheaper to store compared to larger images. This efficiency makes it an ideal candidate for various storage systems.

Cloud Storage (10 Years)

Centralized cloud storage involves storing an image once and often maintaining backup copies in different data centers. While this approach is convenient, it may be vulnerable to human intervention and natural disasters. For instance, the OVH cloud experienced fires twice, highlighting the risks associated with centralized storage.

Torrent and IPFS (100 Years)

Torrent and IPFS represent distributed storage systems. Torrent relies on a network of peers (nodes) to share and store files. However, it may lose interest over time if peers stop participating. IPFS works similarly but may face similar challenges.

Blockchains (1000 Years)

For a distributed network like Torrent or IPFS to be effective, there must be consensus and incentives for participants (Like a blockchain) to respect the rules. If only a few individuals or a single node within a massive network persist, the data can survive multiple generations. This resilience requires disrupting the consensus and interests of the network based on cryptography and finance.

Security Levels

Peer-to-peer networks are quadratically more secure than clouds, and blockchains offer exponential security.

In this context, consider the time frames for data storage: clouds store images for 10 years, IPFS for 100 years, and blockchains for 1000 years.

In summary, the choice of an image storage system depends on various factors, including image size, quality requirements, security concerns, and long-term storage needs. Each system has its advantages and disadvantages, and understanding these can help you make an informed decision for your specific use case.

time-complexity

Time Complexity is a notation / analysis that is used to determine how the number of steps in an algorithm increase with the increase in input size. Similarly, we perceive the security of storage system with pure mathematics and a bit of popularization.