1,995 karma · joined May 20, 2020
…or you're on AWS RDS, which will automatically bump your db cluster if it goes EOL and you ignore the notices for more than a year.
It works with basically no downtime but I agree this kind of thing should definitely be easier, even turnkey.
That's a true shame considering how easy it is to make a read replica of any size and then fail over to it as the new primary. Definite skill issues.
Transactional DDL: migration errors never leave the database in an intermediate/inconsistent state.
Range types + exclusion constraint: just no way to do this in MySQL without introducing a race condition.
Writeable CTEs: creating insert/update/delete pipelines over multiple tables deterministically. Seriously though, the RETURNING clause is something I use all the time both in and out of CTEs.
Filtered aggregates and grouping sets: cleanly get multiple data points for a dashboard in one shot.
Unnest: converting arrays into a set of rows. Inverse of array_agg(...).
Types: arrays, booleans, IP/subnets, UUIDs (without binary(16) hacks), etc.
Materialized views: seriously, how does MySQL not have this yet?
Statement-level triggers: another option from per-row.
Row-level security: setting data visibility based on configurable policies.
I can cite specific use cases I've deployed to production for each of these and more.
That said, everything on your list is provided out of the box with managed cloud vendors like AWS's Aurora DB clusters.
Replica lag: check.
Primary and replica status checks: check.
Auto-failover with strategies: check.
Split brain: I'll be honest, this is a deceptively hard problem that is strongly dependent on use cases and setting expectations. CAP theorem exists for a reason. Do NOT trust anyone who tells you they have a one and done solution to this. They're selling snake oil.
After failover recovery: check.
----
Please note that I recognize you want to learn this for yourself, and I wholeheartedly encourage you to. I think it's important to know that there are already mature solutions out there that trade money in exchange for your time to be spent in other areas.
This was not what Google and others found when they studied it.
https://www.theregister.com/AMP/2024/03/31/rust_google_c/
> More significant, Bergstrom said, is the comparison of rewrites of C++ code into Rust.
> "In every case we've seen a decrease by more than 2x in the amount of effort required to both build the services in Rust as well as maintain and update those services written in Rust," he said.
C++ is better than it used to be, but it was truly atrocious in that regard for decades. It was simply the least worst option for those decades.
I do not consider it the least worst option anymore.
Unlike Go that only really requires experience in general programming to become rapidly productive, Rust basically requires that you read The Book in its entirety before you even think about applying that knowledge in production. There are just to many interdependent concepts to hand wave away the prep time. It all (mostly) makes sense once you've familiarized yourself with the basic concepts, but it's a training step you simply cannot skip without inflicting a fair amount of pain on yourself and others.
Typescript, Python, Go, Swift, and even Bash depending on the situation are all quicker to code in than Rust.
If any of those languages are inadequate for the requirements whether they be memory-bound, CPU-bound, or sensitive to gc pauses, Rust is an excellent option that is far superior to C++ in 2024 and beyond.
The notion of "one true language" has always been and will always remain a fool's errand.
Memory corruption bugs are no joke. If you've got staff that already knows C++, their ramp up time for Rust will be much shorter compared to typical devs working only in Python, JS, etc.
https://blog.cloudflare.com/how-we-built-pingora-the-proxy-t...
Sure, I'd lose access to the React ecosystem, but I'd also gain access to the vast ecosystem of vanilla JS libraries without having to write/use a wrapper, so that's a wash. (bind:this is awesome!)
Svelte's is about 2.1KB last I checked. Can React get below 40KB?
2. You haven't seen Angular lately, have you? It's on 18 now. 15 and 16 really trimmed things down.
Walks like an XHTML duck. Talks like an XHTML duck. It's an XHTML duck despite the JS interop and the lack of DTD preamble.
I consider the core Postgres codebase to be the gold standard in development even though it's in a language I do not prefer to write in if given the choice.
Shout out to the pgrx folks. You're awesome! https://github.com/pgcentralfoundation/pgrx
Strong foundational knowledge in HTML and CSS helps as well. Still amazes me how many folks put onclick handlers on div tags and freak out when margins collapse.
With an experienced and top-notch developer, anything is possible in any language or framework. For the other 95% of devs out there—especially on a team where the lead doesn't keep a strong grip on the reins—React turns to mud awfully fast. But it's mud with an extensive ecosystem and tons of inertia helping it succeed.