5 comments

  • tptacek 33 minutes ago
    "Idle cost is that one lightweight SELECT per millisecond per database — no page-cache pressure, no writer-lock contention, no kernel file watcher in the mix."

    I think (respectfully) the LLM that probably wrote this overshot the mark here because busy-polling a select does not actually sound better to me than a "kernel file watcher".

    • ncruces 2 minutes ago
      If you're not making any changes to the database, does the SELECT "kill" you?

      And if you are making changes, don't you have to poll regardless after the file watcher wakes you?

      For WAL mode, SQLite can probably satisfy this query just by inspecting some shared memory. But it is busy waiting, sure.

    • felooboolooomba 13 minutes ago
      "one lightweight SELECT per millisecond"

      This reminds me of the teenager who told her dad that she was just a tiny little bit pregnant.

    • d1l 5 minutes ago
      Yeah, I had the same instinct - this feels very much like a "nice idea" but the execution falls short. I mean - busily banging on sqlite like this? Shit at that point just use Redis.
    • djdillon 8 minutes ago
      [flagged]
  • vmsp 31 minutes ago
    Reminds me of Litestack for Rails. Eventually, it was abandoned because Rails itself started going all out on SQLite.

    https://github.com/oldmoe/litestack

  • itopaloglu83 1 hour ago
    It’s an interesting approach and can be quite fun to use for new projects.

    > How it works: honker polls SQLite’s PRAGMA data_version every millisecond. That’s a monotonic counter SQLite increments on every commit from any connection, journal mode, or process — a ~3 µs read for a precise wake signal.

  • EvanAnderson 1 hour ago
    Prior discussion a few days ago: https://news.ycombinator.com/item?id=47874647
  • arlobish 43 minutes ago
    At the end it says: "pg-boss and Oban are the Postgres-side gold standards" -- but Oban supports SQLite now too https://github.com/oban-bg/oban