12 comments

  • bob102920 days ago
    The best way to store information depends on how you intend to use (query) it.<p>The query itself represents information. If you can anticipate 100% of the ways in which you intend to query the information (no surprises), I&#x27;d argue there might be an ideal way to store it.
    • jandrewrogers20 days ago
      This is connected to the equivalence relationship between optimal indexing and optimal AGI. The &quot;best&quot; way is optimal for the entire universe of possible queries but has the downside of being profoundly computationally intractable.<p>Requiring perfect knowledge of how information will be used is brittle. It has the major benefit of making the algorithm design problem tractable, which is why we do it.<p>An alternative approach is to exclude large subsets of queries from the universe of answerable queries without enumerating the queries that the system can answer. The goal is to qualitatively reduce the computational intractability of the universal case by pruning it without over-specifying the queries it can answer such as in the traditional indexing case. This is approximately what &quot;learned indexing&quot; attempts to do.
    • alphazard20 days ago
      This is exactly right, and the article is clickbait junk.<p>Given the domain name, I was expecting something about the physics of information storage, and some interesting law of nature. Instead, the article is a bad introduction to data structures.
      • megaBiteToEat20 days ago
        You both are affirming the title of the article.<p>&quot;No single best way&quot;, meaning &quot;it depends.&quot;<p>But don&#x27;t let something like literacy get in the way of a opportunity to engage in meaningless outrage.
    • DixieDev20 days ago
      This line of thought works for storage in isolation, but does not hold up if write speed is a concern.
      • sandworm10120 days ago
        Speed can always be improved. If a method is too slow, run multiple machines in parralel. Longevity is different as it cannot scale. A million cd burners are together very fast, but the CDs wont last any longer. So the storage method is is the more profound tech problem.
      • cannonpalms20 days ago
        So long as (fast&#x2F;optimal) real-time access to new data is not a concern, you can introduce compaction to solve both problems.
        • bob102920 days ago
          &gt; (fast&#x2F;optimal) real-time access to new data<p><a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Optimal_binary_search_tree#Dynamic_optimality" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Optimal_binary_search_tree#Dyn...</a>
      • convolvatron20 days ago
        as a line of thought, it totally does. you just extend the workload description to include writes. where this get problematic is that the ideal structure for transactional writes is nearly pessimal from a read standpoint. which is why we seem to end up doubling the write overhead - once to remember and once to optimize. or highly write-centric approach like LSM<p>I&#x27;d love to be clued in on more interesting architectures that either attempt to optimize both or provide a more continuous tuning knob between them
    • roenxi20 days ago
      Yes with the important caveat that a lot of the time people don&#x27;t have a crystal ball, can&#x27;t see the far future, don&#x27;t know if their intents will materialise in practice 12 months down the line and should therefore store information in Postures until that isn&#x27;t a feasible option any more.<p>A consequence of there being no generally superior storage mechanism is that technologists as a community should have an agreed default standard for storage - which happens to be relational.
    • ssivark20 days ago
      What if the various potential queries demand different &#x2F; conflicting compression schemes?<p>I&#x27;d say this is spiritually what the no-free-lunch theorems are about... Because whatever &quot;AI model&quot; &#x2F; query system you build -- it is implicitly biased towards queries coming from one slice of futures.
  • danans20 days ago
    Pedantic, but the article is talking about the way we structure&#x2F;organize information, not store it. When I think of the word store, I think of the physical medium. The way we organize the information is only partially related
    • 1970-01-0120 days ago
      It&#x27;s not pedantic, you are correctly using words as we understand them, and they are not. The headline needs a sharp correction. Editing jobs are in very short supply these days.
      • megaBiteToEat20 days ago
        Oh come on. Programmers discuss how to &quot;store&quot; data in memory as a data model all the time.<p>You&#x27;re reducing definitions and meaning too far to make an ultimately empty point just to contribute the thread.<p>If social medias only contribution is language policing, then it really should die off. What a waste of resources so functional illiterate nobodies can project ego.
        • 1970-01-0120 days ago
          No, I&#x27;ll think I&#x27;ll double down, because I do think I&#x27;m right here.<p><a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Data_storage" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Data_storage</a> is a different website from <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Data_store" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Data_store</a> because they are different, slightly overlapping concepts.
    • pixl9720 days ago
      I mean if we&#x27;re talking about the physical storage of medium, the single most dense way would be to write it on the surface of a black hole. I still haven&#x27;t figured out how to read it back though.
  • ronsor20 days ago
    There are plenty of good enough ways:<p>* For lossless compression of generic data, gzip or zstd.<p>* For text, documentation, and information without fancy formatting, markdown, which is effectively a plain-text superset.<p>* For small datasets, blobs, objects, and what not, JSON.<p>* For larger datasets and durable storage, SQLite3.<p>Whenever there&#x27;s text involved, use UTF-8. Whenever there&#x27;s dates, use ISO8601 format (UTC timezone) or Unix timestamps.<p>Following these rules will keep you happy 80% of the time.
    • nicbou20 days ago
      One format I&#x27;m missing: storage for conversations and social media posts. Both are complex media (text + images&#x2F;videos + metadata), and one is actually a collection of such posts.<p>How would you go about storing those in a somewhat human-readable format? My goal is to archive my chats and social media activity.
      • ronsor20 days ago
        Use a SQLite3 database. Have a table for the posts (or any other appropriate schema, depending on what metadata you have). Using SQLite3 has the advantage of future flexibility (new&#x2F;different tables and schema as needed, full-text search, etc.).<p>You can have another table for attachments (images, videos, etc.). If they&#x27;re small, store them directly in a BLOB. If they&#x27;re not, store them alongside the database, and only store the relative path in the attachments table.<p>You may opt to convert images and videos to a single format (e.g. PNG and H.264 MP4), but you can lose information depending on the target format. It may be preferable to leave them in the original (or highest quality) format.
      • ifh-hn20 days ago
        Depends on what you mean by humans readable. Sqlite, as the other sub comment mentions is good, but you could also just use a CSV file, unnormalised table, and sit the original media in the same or a sub folder. Hell, convert that CSV to a html table and you can display the data as a human readable local webpage. Through in some JS and you can navigate&#x2F;filter it too.
      • soulofmischief20 days ago
        Why not just use WARC and a program that can read them? Do archives need to be human-readable?
        • ronsor20 days ago
          The thing about archives is you either parse them now or parse them later. With how much JS and other crap is served in modern social media frontends, I&#x27;m not sure WARC is the best format for archiving from them.
          • ElectricalUnion20 days ago
            But that is the point of WARC: otherwise, your archival method need some sort of general inteligence (ai or human behind the scenes) to store exacly what you need.<p>With WARC (and good WARC tooling like Browsetrix-crawler) you store everything HTTP the site sent.
  • __MatrixMan__20 days ago
    There are, however, several objectively bad ways. In &quot;Service Model&quot; (a novel that I recommend) a certain collection of fools decides to sort bits by whether it&#x27;s a 1 or a 0, ending up with a long list of 0&#x27;s followed by a long list of 1&#x27;s.
    • Rygian20 days ago
      In a similar vein, someone decided that everyone should have subdirectories under home named &quot;Pictures&quot;, &quot;Videos&quot;, &quot;Music&quot;, &quot;Documents&quot;, …
    • hcs19 days ago
      Related seriously: You can make it more likely to have long runs of the same letters, reversibly, with the Burrows-Wheeler Transform: <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Burrows%E2%80%93Wheeler_transform" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Burrows%E2%80%93Wheeler_transf...</a><p>(No magic, though it still feels like it, BWT is most useful when there&#x27;s repeated substrings.)
    • dsvf20 days ago
      It _does_ open up amazing opportunities for compression though.
    • teraflop20 days ago
      There&#x27;s a similar anecdote in Iain M. Banks&#x27; <i>The Player of Games</i>.<p><a href="https:&#x2F;&#x2F;scifi.stackexchange.com&#x2F;questions&#x2F;270578&#x2F;negotiator-promises-not-to-destroy-conquered-territorys-cultural-heritage-but" rel="nofollow">https:&#x2F;&#x2F;scifi.stackexchange.com&#x2F;questions&#x2F;270578&#x2F;negotiator-...</a>
      • __MatrixMan__19 days ago
        Thanks for pointing it out.<p>I&#x27;m putting together a database along the lines of <a href="https:&#x2F;&#x2F;www.whosampled.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.whosampled.com&#x2F;</a> except instead of samples in music it&#x27;s fiction authors either:<p>- revisiting one another&#x27;s ideas<p>- stumbling across the same idea independently of one other<p>Now I get to add an edge between Tchaikovsky and Banks. It&#x27;s somewhat unsurprising. Tchaikovsky does this a lot.
    • lo_zamoyski20 days ago
      That depends on the aim. The purpose of something determines how fitting the means are.<p>Also, let us not confuse &quot;relative&quot; with &quot;not objective&quot;. My father is objectively my father, but he is objectively not your father.
      • __MatrixMan__19 days ago
        I&#x27;m frequently bothered by misuse of &quot;objective&quot; but I stand by it here. In the case of storage, one criterion supersedes all others: can you get the information back out? If you can then there are merits to discuss relative to use case. If you can&#x27;t then your storage mechanism is broken.
    • HPsquared20 days ago
      That&#x27;s fine so long as there&#x27;s an index!
      • __MatrixMan__19 days ago
        Presumably there was at some time, but they put it in long term bit storage also.
  • kittikitti20 days ago
    Or it&#x27;s the opposite, where the slowest possible retrieval time is the intended effect, as is the basis of many cryptographic algorithms.
    • adrianmonk20 days ago
      Or it&#x27;s neither, and the intended effect is zero variation in the retrieval time, as when trying to avoid leaking secrets via timing attacks.<p>(Or I guess, more generally, the intended effect is zero correlation between the information and the time it takes to retrieve it. If retrieval time were completely random, it would achieve the goal, but it wouldn&#x27;t have zero variation.)
  • pbreit20 days ago
    Postgres is close.
    • imhoguy20 days ago
      I would say Sqlite is closer, you find it on every phone, browser, server. I bet Sqlite files will be still readable in 2100. And I love Postgres.
      • rmwaite20 days ago
        Relevant: <a href="https:&#x2F;&#x2F;sqlite.org&#x2F;mostdeployed.html" rel="nofollow">https:&#x2F;&#x2F;sqlite.org&#x2F;mostdeployed.html</a>
    • mjevans20 days ago
      Or (real) SQLite for reasonably scaled work.<p>I also like (old) .ini &#x2F; TOML for small (bootstrap) config files &#x2F; data exchange blobs a human might touch.<p>+<p>Re: PostgreSQL &#x27;unfit&#x27; conversations.<p>I&#x27;d like some clearer examples of the desired transactions which don&#x27;t fit well. After thinking about them in the background a bit I&#x27;ve started to suspect it might be an algorithmic &#x2F; approach issue obscured by storage patterns that happen to be enabled by some other platforms which work &#x27;at scale&#x27; supported by hardware (to a given point).<p>As an example of a pattern that might not perform well under PostgreSQL, something like lock-heavy multiple updates for flushing a transaction atomically. E.G. Bank Transaction Clearance like tasks. If every single double-entry booking requires it&#x27;s own atomic transaction that clearly won&#x27;t scale well in an ACID system. Rather the smaller grains of sand should be combined into a sandstone block &#x2F; window of transactions which are processed at the same time and applied during the same overall update. The most obvious approach to this would be to switch from a no-intermediate values &#x27;apply deduction and increment atomically&#x27; action to a versioned view of the global data state PLUS a &#x27;pending transactions to apply&#x27; log &#x2F; table (either&#x2F;both can be sharded). At a given moment the transactions can be reconciled, for performance a cache for &#x27;dirty&#x27; accounts can store the non-contested value of available balance.
  • vee-kay20 days ago
    Millions of years of evolution has resulted in the human brain being the best way to store information.<p>I doubt we humans will be able to do better (faster, more capacity, more analytical, more intuitive, more logical) storage (at an individual level, not at mass scale, since that&#x27;s kinda achieved already by the behemoths like Google, etc.) in a few thousand years of civilization.<p>Quantum computing may be the game changer though.<p>I read somewhere that the entirety of humanity&#x27;s information, including all knowledge and data of past (of every human ever) and current, if stored via quantum computing - that quanta of quantum information will just be the size of a football.
  • notepad0x9020 days ago
    would it be more accurate to say &quot;to store using information, using information&quot;? Since everything ultimately boils down to information, humans trying to store information is a bit recursive?
  • eliasdejong20 days ago
    See also, RUM Conjecture: <a href="https:&#x2F;&#x2F;www.codementor.io&#x2F;@arpitbhayani&#x2F;the-rum-conjecture-16z2ckqte9" rel="nofollow">https:&#x2F;&#x2F;www.codementor.io&#x2F;@arpitbhayani&#x2F;the-rum-conjecture-1...</a><p>Conceptually similar to CAP, but with storage trade-offs. The idea is you can only pick 2 out of 3.
  • andix20 days ago
    It&#x27;s always Markdown. Markdown is the best way to store information. ;)
    • eimrine20 days ago
      Which implementation of Markdown is a correct Markdown? Why not org-mode syntax?
    • _ea1k20 days ago
      Claude Code vehemently agrees.
      • andix20 days ago
        You&#x27;re absolutely right!
  • 1970-01-0120 days ago
    Oh I know this one. False. Compress it first, then encrypt. :)
  • akhil08agrawal20 days ago
    This clicked for me in a way I didn&#x27;t expect.<p>I&#x27;ve been thinking about trade-offs as &quot;pick two of three&quot; in the abstract, but the bookshelf example made it concrete. The insight that matters is: if you know your query patterns, you can optimize differently.<p>As a PM, I keep trying to build systems that work for &quot;every case.&quot; But this article reminded me that&#x27;s the wrong goal. The hash table works because it accepts the space-time trade-off. The heap works because it embraces disorder for non-priority items.<p>Sometimes the best system isn&#x27;t the most elegant one—it&#x27;s the one that matches how you&#x27;ll actually use it.<p>Good reminder to stop over-optimizing for flexibility I&#x27;ll never need.<p>Thanks for sharing.
    • altmanaltman20 days ago
      You&#x27;re a PM and this basic-level watered down article barely discussing anything &quot;clicked for you in a way&quot; you didn&#x27;t expect? Of course the best system is desinged based on requirements, how can a PM not know this before being a PM?