Readit News logoReadit News
DelaneyM commented on Kafka is Fast – I'll use Postgres   topicpartition.io/blog/po... · Posted by u/enether
oulipo2 · 4 months ago
I want to rewrite some of my setup, we're doing IoT, and I was planning on

MQTT -> Redpanda (for message logs and replay, etc) -> Postgres/Timescaledb (for data) + S3 (for archive)

(and possibly Flink/RisingWave/Arroyo somewhere in order to do some alerting/incrementally updated materialized views/ etc)

this seems "simple enough" (but I don't have any experience with Redpanda) but is indeed one more moving part compared to MQTT -> Postgres (as a queue) -> Postgres/Timescaledb + S3

Questions:

1. my "fear" would be that if I use the same Postgres for the queue and for my business database, the "message ingestion" part could block the "business" part sometimes (locks, etc)? Also perhaps when I want to update the schema of my database and not "stop" the inflow of messages, not sure if this would be easy?

2. also that since it would write messages in the queue and then delete them, there would be a lot of GC/Vacuuming to do, compared to my business database which is mostly append-only?

3. and if I split the "Postgres queue" from "Postgres database" as two different processes, of course I have "one less tech to learn", but I still have to get used to pgmq, integrate it, etc, is that really much easier than adding Redpanda?

4. I guess most Postgres queues are also "simple" and don't provide "fanout" for multiple things (eg I want to take one of my IoT message, clean it up, store it in my timescaledb, and also archive it to S3, and also run an alert detector on it, etc)

What would be the recommendation?

DelaneyM · 4 months ago
My suggestion would be even simpler:

MQTT -> Postgres (+ S3 for archive)

> 1. my "fear" would be that if I use the same Postgres for the queue and for my business database...

This is a feature, not a bug. In this way you can pair the handling of the message with the business data changes which result in the same transaction. This isn't quite "exactly-once" handling, but it's really really close!

> 2. also that since it would write messages in the queue and then delete them, there would be a lot of GC/Vacuuming

Generally it's best practice in this case to never delete messages from a SQL "queue", but toggle them in-place to consumed and periodically archive to a long-term storage table. This provides in-context historical data which can be super helpful when you need to write a script to undo or mitigate bad code which resulted in data corruption.

Alternatively when you need to roll back to a previous state, often this gives you a "poor woman's undo", by restoring a time-stamped backup, copying over messages which arrived since the restoration point, then letting the engine run forwards processing those messages. (This is a simplification of course, not always directly possible, but data recovery is often a matter of mitigations and least-bad choices.)

Basically, saving all your messages provides both efficiency and data recovery optionality.

> 3...

Legit concern, particularly if you're trying to design your service abstraction to match an eventual evolution of data platform.

> 4. don't provide "fanout" for multiple things

What they do provide is running multiple handling of a queue, wherein you might have n handlers (each with its own "handled_at" timestamp column in the DB), and different handles run at different priorities. This doesn't allow for workflows (ie a cleanup step) but does allow different processes to run on the same queue with different privileges or priorities. So the slow process (archive?) could run opportunistically or in batches, where time-sensitive issues (alerts, outlier detection, etc) can always run instantly. Or archiving can be done by a process which lacks access to any user data to algorithmically enforce PCI boundaries. Etc.

DelaneyM commented on So you wanna build an aging company   librariesforthefuture.bio... · Posted by u/apsec112
rhet0rica · 8 months ago
Unpopular opinion: Any medical intervention that delays or defeats the aging process will disproportionately benefit the wealthy, and is therefore unethical. The last thing a healthy democracy needs is millennium-old acolytes of Peter Thiel pulling the strings from the shadows.
DelaneyM · 8 months ago
The distance between a scientific revolution being accessible to the ultra-wealthy and the average consumer is measured in years, and shrinking rapidly.

I would rather billionaires get anti-aging technology 10yrs before I do than never get it at all.

DelaneyM commented on Many ransomware strains will abort if they detect a Russian keyboard installed (2021)   krebsonsecurity.com/2021/... · Posted by u/air7
thrtythreeforty · 8 months ago
Is there any downside to unironically doing this? Seems like it'd actually work.
DelaneyM · 8 months ago
It’s not much harder to just harden your system to not be vulnerable in the first place, and that protects your from a lot more.
DelaneyM commented on When, why, and how to stop coding as your day job   kevingoldsmith.substack.c... · Posted by u/kiyanwang
DelaneyM · a year ago
I cringe at the idea that beyond a certain level one stops writing code.

You never stop writing code, unless you truly just don’t enjoy writing code, and if that’s the case please don’t manage engineers.

You do eventually stop shipping critical code, because at a certain point your managerial leverage means there are many other more productive ways to spend your time.

But the day you “stop writing code” is the beginning of the end of your effectiveness, because when your job is augmenting the impact of others, you need to have a deep familiarity with their daily experience.

Consider that any manager who “stopped writing code” five years ago has (probably) never had the daily experience of being a fully remote developer in a fully remote organization, with all the collaboration challenges and focus opportunities that entails.

And a manager who “stopped writing code” two years ago probably doesn’t get how the process changes with the assistance of LLMs, what they can dramatically accelerate and where their limitations introduce risk.

Never stop writing code. Never stop building a local version of your code base. Never stop using your internal build tools and dev environment. Never stop watching production logs and chasing down the occasional bug.

_Do_ stop assuming your code is production-ready. Do stop commenting on code reviews. Do stop assuming that the code you write has meaningful value (except as a way for you to keep your situational awareness.)

Most importantly, stop letting “writing code” be a source of stress or an obligation, and start having fun again doing it. Your organization will thank you for it.

DelaneyM commented on As Florida Storms Worsen, Some in Tampa Bay Wonder: Is Living There Worth It?   nytimes.com/2024/09/28/us... · Posted by u/howard941
EasyMark · a year ago
What do you do about flooding or is your house above the levels that hurricanes tend to push water? Do you have water proof furniture? Just curious.
DelaneyM · a year ago
Our house is above the prevailing level, built on a cement slab foundation. We have no basement, and water would have to be >3' high above the land to get into the house, but that's only ~10' above sea level.

We have no electrical wiring below waist height, I think 3'? Our floors are tiles and our load-bearing walls are cement, so if we just had flooding we'd be able to get to ~13' above sea level before being in real trouble. Our furniture would be written off.

Our house is actually a bit more durable than the country. If we had a 15' storm surge, the house might survive, but the island would be toast. That would submerge nearly the entire island, and it would be happening during a hurricane. It would take months to recover even basic infrastructure. Our plan for that is to give up everything we own and return in a year or two to rebuild.

_But_, for a variety of reasons, a 15' storm surge is meteorologically improbable here. It's a once-in-a-millennium event, even accounting for the worst of global warming. Nothing is impossible, but there's no point in planning for it; it's like living within a thousand miles of yosemite national park. ¯\_(ツ)_/¯

DelaneyM commented on As Florida Storms Worsen, Some in Tampa Bay Wonder: Is Living There Worth It?   nytimes.com/2024/09/28/us... · Posted by u/howard941
xnx · a year ago
Is the Caribbean as low-lying the Florida coast. There's not much you can do if you have a foot of water surrounding your house.
DelaneyM · a year ago
Depends on the island!

As I said in a different response though, when you have a hardened home you fear storm surges, and we do. Our house would probably be obliterated by a 12’ storm surge at high tide.

We’re built on a 3’ high cement slab foundation though, so if we had only 1’ of water around the house we’d be fine. (This is a building code here, it’s nearly impossible to build a basement and your house must be floored 18” above your prevailing level.)

For a variety of meteorological reasons that’s exceptionally unlikely for my specific location, but it’s something we’re acutely aware of and plan ahead for.

DelaneyM commented on As Florida Storms Worsen, Some in Tampa Bay Wonder: Is Living There Worth It?   nytimes.com/2024/09/28/us... · Posted by u/howard941
JumpCrisscross · a year ago
> We build for extreme weather

Huh, apparently “wind is responsible for greater property loss than water” [1].

[1] https://hazards.colorado.edu/research/working-papers/94

DelaneyM · a year ago
It does depend on the housing in question too.

As the study concludes, wind will absolutely tear apart a cheap house, or a structure not built to be resilient to wind. And most aren’t.

_But_ once you’re ready for wind , as we are, you live in fear of the storm surge accompanying a major hurricane. Especially since it lasts 4-6 hours and can overlap with high tide, that’s a 15-20’ sea level rise of churning water. No house can be practically hardened against that, and when wind is gusting at 100+mph it’s not safe to run or move.

When we anticipate a major storm surge + storm, we plan for an island-wide evacuation of 50,000+ people to seven small shelters.

DelaneyM commented on As Florida Storms Worsen, Some in Tampa Bay Wonder: Is Living There Worth It?   nytimes.com/2024/09/28/us... · Posted by u/howard941
DelaneyM · a year ago
I live in the Caribbean, and we get a lot of hurricanes. A few every year.

We build for extreme weather. Our building codes (and common sense) protect us. My house has 10" of concrete on all our exterior walls and 1" concrete shingles on the roof, with no electrical system below waist height. We have 1/4" galvanized sheets of metal in the shed that we can bolt over all our windows when a cat-4 blows through. Don't get me wrong - a cat 2+ is still a giant pain in the ass to live through, but it's not a long-term problem.

Also, most people don't bother with home insurance (unless they have a mortgage) covering storm damage. You build your house in anticipation of repairing it and thus build better.

A lot of our current situation is only possible because we had an island-wide reset in 2004 (https://youtu.be/NzzeDGICjbA), that may be what it takes for Florida.

DelaneyM commented on Sonos CEO says the old app can't be rereleased   theverge.com/2024/8/20/24... · Posted by u/JimDabell
disillusioned · 2 years ago
Unrelated, but similarly, I am in a weird form of hell in the Nest/Google Home ecosystem, where trying to re-add a camera to my home fails because it cannot successfully connect with the "assisting device" in my home to fetch the wifi credentials from.

When you attempt to connect it to a _new_/unrelated structure/home, it connects fine, because the phone sends that information to the camera directly. When you try to add it to your existing Nest home, it attempts to be "helpful" by connecting it with an "assisting device," and invariably fails.

It fails with an arcane NC013 or NC024 error, and instead of falling back to a manual setup option, it just... cannot be added. They legitimately suggest that you add it to a new "structure" (which operates under a separate Nest Aware subscription), and then migrate all of the other devices over to the new structure. Which isn't reasonable, when I have a dozen of these things, some of which are mounted in very out of the way places.

And worse, it can still fail, randomly.

It's as if the "Nest network" becomes corrupted in some indecipherable way. This was exacerbated by Google murdering dead my Nest Secure alarm system, which was _also_ an assisting device, which took my locks offline. And when they shipped a Nest Connect wifi adapter, I _also_ couldn't onboard _that_ device to the home for the same reason, so I now have a separate structure called "Connect", which features... just my locks. And now, the camera I was trying to add back.

It's absolute unforced errors and complete madness.

My experience building out a Sonos system for onboarding wasn't too bad, but I have had Sonos Amps fall offline and do weird things, and it personally annoys me that TruePlay doesn't work on Android. This shift to a new app that doesn't hit parity, and seems to do the original things the S2 app did markedly worse... woof.

DelaneyM · 2 years ago
I’ve also burned my Google system.

In my case, I use a Google Apps email account so my family has a shared email domain (and I can better handle tech support and manage my kids’ use). That’s slowly become completely incompatible with nest and any consumer hardware or services, and that process of integration degradation was incredibly frustrating.

Google consumer software/hardware is dead to me now, I just can’t use it even if I weren’t holding a grudge.

Though it still has warts and opportunities for improvement, our house mostly runs on Unifi (for networking and security cameras.)

DelaneyM commented on Sonos CEO says the old app can't be rereleased   theverge.com/2024/8/20/24... · Posted by u/JimDabell
DelaneyM · 2 years ago
I am an experienced engineer with twenty five years of infrastructure and protocol development, and my experience setting up an all-Sonos home system is a _saga_ of epic proportions.

Unbelievably frustrating software decisions for otherwise excellent hardware. My favourite(?) part is the “Sonos net” independent network which takes over when one speaker in a group is connected via Ethernet, taking the rest off wifi silently and creating a dedicated wireless network. Then when you connect Ethernet to another speaker in the same group it loses its shit silently, creating and destroying new wifi private networks in an unending cycle, without any notification or visibility in the app. And speakers on a Sonos Net network announce and are discovered differently than spec, which adds a hop and breaks any other subnet connections in a way which is _very _ hard to debug.

And that’s just the setup. My partner and kids use them strictly as airplay targets, and refuse to use the app or voice assistant because of the UX and bugs.

If I didn’t have 5k sunk into the hardware already I wouldn’t touch it with a ten foot pole.

DelaneyM · 2 years ago
IMO the only chance for redemption here is opening up the devices to open source projects.

It’s good hardware, just let us use it.

(Also please ship a PoE++ adapter.)

u/DelaneyM

KarmaCake day2260August 26, 2015
About
https://www.linkedin.com/in/delaneymanders
View Original