12 comments

  • bob10297 hours 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.
    • jandrewrogers1 hour 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.
    • roenxi2 hours 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.
    • alphazard6 hours 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.
      • megaBiteToEat5 hours 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.
    • DixieDev6 hours ago
      This line of thought works for storage in isolation, but does not hold up if write speed is a concern.
      • cannonpalms5 hours 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.
        • bob10295 hours 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>
      • sandworm1012 hours 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.
      • convolvatron6 hours 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
  • danans6 hours 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-015 hours 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.
      • megaBiteToEat4 hours 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-013 hours 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.
    • pixl975 hours 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.
  • ronsor6 hours 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.
    • nicbou6 hours 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.
      • ronsor5 hours 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.
      • soulofmischief6 hours ago
        Why not just use WARC and a program that can read them? Do archives need to be human-readable?
        • ronsor5 hours 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.
          • ElectricalUnion5 hours 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__8 hours 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.
    • Rygian8 hours 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;, …
    • teraflop3 hours 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>
    • dsvf7 hours ago
      It _does_ open up amazing opportunities for compression though.
    • HPsquared6 hours ago
      That&#x27;s fine so long as there&#x27;s an index!
    • lo_zamoyski8 hours 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.
  • vee-kay3 hours 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.
  • pbreit8 hours ago
    Postgres is close.
    • imhoguy8 hours 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.
      • rmwaite7 hours ago
        Relevant: <a href="https:&#x2F;&#x2F;sqlite.org&#x2F;mostdeployed.html" rel="nofollow">https:&#x2F;&#x2F;sqlite.org&#x2F;mostdeployed.html</a>
    • mjevans8 hours 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.
  • akhil08agrawal6 hours 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.
    • altmanaltman3 hours 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?
  • notepad0x906 hours 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?
  • eliasdejong6 hours 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.
  • kittikitti7 hours 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.
    • adrianmonk5 hours 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.)
  • 1970-01-015 hours ago
    Oh I know this one. False. Compress it first, then encrypt. :)
  • andix7 hours ago
    It&#x27;s always Markdown. Markdown is the best way to store information. ;)
    • eimrine5 hours ago
      Which implementation of Markdown is a correct Markdown? Why not org-mode syntax?
    • jsight6 hours ago
      Claude Code vehemently agrees.
      • andix6 hours ago
        You&#x27;re absolutely right!