News for hackers. Stuff that matters.
Re:Rob Pike's Rules of Programming (1989) by projektfu on Wednesday August 12, 2020 @09:57PM (#24139217)
Architecture is not optimization. This gets fuzzy with the decision to use caching, static generation, etc. Ideally, redis or memcached can be added when needed. It will require some changing of the app but hopefully in limited places.

This rule a la Pike is about doing things like writing assembly or manually unrolling loops in noncritical parts of code. However, in some code, almost everything is on the critical path, and that requires architecture. I’m thinking of Carmack’s single function game loop here.

I remember working on a project that claimed to want 10,000 transactions per second. “Okay”, I said, “how much can be accomplished in 100us?”

They looked at me like I was an idiot. “No, it’s going to be clustered and pipelined.”

“Ok, if you can do that maybe you have a budget of 1-5ms.”

“No, we’re going to give each transaction up to a second to get done”

I smiled and admitted that they were obviously a lot smarter than me. Oddly enough the product never saw the light of day.

Re:Rob Pike's Rules of Programming (1989) by Aeolun on Thursday August 13, 2020 @08:18AM (#24142564)
Don’t worry, we’ll use serverless! So we can support an unlimited amount of transactions per second!
Re:Rob Pike's Rules of Programming (1989) by formerly_proven on Sunday August 16, 2020 @12:38PM (#24179163)
Latency and throughput are not the same thing. A CPU can process multiple instructions per clock cycle yet instructions take longer than a clock cycle.
Re:Rob Pike's Rules of Programming (1989) by User23 on Wednesday August 12, 2020 @10:37PM (#24139413)
That’s not obviously absurd. If Amdahl’s law permits then Little’s law tells you whether or not it’s possible.
Re:Rob Pike's Rules of Programming (1989) by projektfu on Wednesday August 12, 2020 @10:47PM (#24139477)
Yep. As I said I’m not smart.
Re:Rob Pike's Rules of Programming (1989) by hawkesnest on Thursday August 13, 2020 @11:05AM (#24144051)
Wow, you are really good at this.

Let the "geniuses" figure out that to do 10k transactions/sec with processes that can handle 1 transaction/sec would take.....10k processes. Sure, doable, in specific contexts, given enough resources. But they sure as heck aren't free resources!