1. 11
  1.  

  2. 4

    Don’t use N computers when 1 will do.

    This is so important, because people seem to forget that computers are fast. Really fast. Absolutely, mind-mindbogglingly fast. CPUs operate on a level of granularity of billionths of a second, while humans can barely sense thousandths of a second.

    The only reason computers are “slow” is because most software is crap. I mostly blame Windows and the Web, since they’ve mislead average computer users into believing they have to wait for bloat to run (rather than regularly shouting at developers to profile their code).

    An average laptop running F-Stack and a decent web server could host a website and handle millions of concurrent requests per second. Distributed systems on AWS are nice and all, but they’re way harder to build than systems that run on a single server. And they’re far harder to profile and optimize.

    /rant

    Out of curiosity, I wonder how the author managed to handle concurrency in SQLite, since it locks the whole DB on writes. He mentions writing multiple SQLite databases, but I’d be interested in more details.

    1. 1

      Hmm, not come across F-Stack before. Ironic, in the context of your rant, that opening their page showed me nothing but a loading animation for a few seconds :P

      1. 1

        Out of curiosity, I wonder how the author managed to handle concurrency in SQLite, since it locks the whole DB on writes. He mentions writing multiple SQLite databases, but I’d be interested in more details.

        He also mentions using a nifty new (first appeared in 2010 :)) SQLite feature called WAL (Write-Ahead Logging). It makes writers and readers not block each other, plus it makes writes so fast (essentially just an append to a log) that they very rarely block each other.

        I’m not sure why it’s not on by default, but that’s probably just standard SQLite conservatism in practice.

        https://www.sqlite.org/wal.html