HN user

Tractor8626

179 karma
Posts0
Comments56
View on HN
No posts found.

One would think that in 30 years there will be some sort of best practises established. Some articles to refer people to. Or at least some people to share their experience and answer practical questions.

And yet there is still only "you doing it wrong, and I won't tell you how to do it right"

If you're processing financial transactions you want your isolation level to be serialisable. As the order in which the transactions are processed matters.

So you don't know what serializable level is.

Even with 1ms latency. Amdahl's law will still make you cap out at a theoretical 1000 TPS if you have 100% row lock contention.

So why use 5ms and 10ms for examples?

I'm confused. I invented transactions?

"Interactive" transactions.

Sqlite is very cool. But what was the point of slowing postgress down?

But, wait our transactions are not serialisable, which they need to be if we want consistent transaction processing

You either don't know what serializable does or trying to mislead the reader. There is zero reason to use searializable here.

Let's say you have 5ms latency between your app server and your database.

5ms latency is unrealistic. Unless you use wifi or you database is in another datacenter.

I'm talking about transactions per second, specifically interactive transactions that are common when building web applications

No they are not common at all. You probably invented them just to make pg look bad.

read-modify-write is the canonical transactional workload. That applies to explicit transactions (anything that does an UPDATE or SELECT followed by a write in a transaction), but also things that do implicit transactions (like the example above)

Your "implicit transaction" would not be consistent even if there was no replication involved at all. Explicit db transactions exist for a reason - use them.

you can absolutely NAT without preventing the "outside" subnets from being allowed to route to the "inside" subnet

Under very specific conditions. Technically if you send packet with destination 192.168.1.10 directly to wan port of router - yes it can route it inside. The problem - how to deliver this packet over internet. You need to be connected to exactly same network segment to pull it off.

And you don't need statefull firewall to deny this kind of packets.

If you need sftp independent of unix auth - there is sftpgo.

Sftpgo also supports webdav, but for use cases in the article sftp is just better.

What I meant are "avoid copy paste at all cost" and "I'm center of the world. What I want is the only thing that matters"-thinking.

About access restrictions. We have two nice examples here

1. Stdio devs can't freely make modifications because someone's code depends on private implementation details

2. And yours example. You tried to do wrong thing and those access restriction made you suffer and do the right thing.

Works as intended I'd say.

Typical "early-in-carrier" thinking. Copying implementation is totally correct move here.

All projects mentioned should have forked stdio and added their hacks/optimisations/functionality to that.

They were just too lazy. Can't blame them though. Writing C code is torture after all. One should cut all the corners they could.