Comment by tmountain

Comment by tmountain a day ago

6 replies

Batching in general is slept upon. So many queue systems support batch injection, and I have seen countless cases where a poorly performing system is “fixed” simply by moving away from incremental injection. This stuff is usually on page two of the docs, which explains why it’s so overlooked…

mpweiher a day ago

My guess is that this is because our default way of expressing code execution is the procedure call, meaning the default unit of code that we can later is the procedure, which needs to execute synchronously. That's what our programming languages support directly, and that's just how "things are done".

Everything else both feels weird and also truly is awkward to express because our programming languages don't really allow us to express it well. And usually by the time we figure out that we need a more reified, batch-oriented mechanism. (the one on page 2) it is too late, the procedural assumptions have been deeply baked into the code we've written so far.

See Can programmers escape the gentle tyranny of call/return? by yours truly.

https://www.hpi.uni-potsdam.de/hirschfeld/publications/media...

See also: https://news.ycombinator.com/item?id=45367519

  • WilcoKruijer a day ago

    This analysis makes sense to me, but at the same time: we’re already switching between procedural and declarative when switching from [mainstream language] to SQL. This impedance mismatch (or awkwardness) is already there, might as well embrace it.

    • mpweiher a day ago

      We are switching...but how and at what cost? We put SQL programs as strings into our other programs, often dynamically constructing them using procedure calls and then dispatching them using yet more procedure calls.

      If that weren't yikes enough, SQL injection bugs used to be the #1 exploited security vulnerabilities. It's gotten a little better, partly because of greater usr of ORMs.

      ORMs?

      https://blog.codinghorror.com/object-relational-mapping-is-t...

      • koakuma-chan a day ago

        > It's gotten a little better, partly because of greater usr of ORMs.

        No, just use prepared statements.

tclancy a day ago

That last line is incredibly cruel. We should hang out. I like you.