Better HN
topnewbestaskshowjobs
Log inSign up

hasyimibhar

119 karma · joined Nov 8, 2019 (7y ago) · 59 submissions

I'm building Polynya (https://polynya.dev/) and pg2iceberg (https://pg2iceberg.dev/). LinkedIn: https://www.linkedin.com/in/hasyimi-bahrudin/
Submissions

comment 6d ago · link · parent

There are software engineers out there who are not really into software engineering. Their day-to-day job is essentially translating requirements into working code. AI made it easy for the people who come up with the requirements to produce the code themselves, eliminating the need of hiring these “coders”.

comment 1w ago · link · parent

Validation here means that someone need to show that the Lean code is describing GRH. Just because the Lean is correct doesn't equal GRH is proven, because it's possible the Lean is describing the wrong thing. This is why it will probably take some time.

It's a common issue with formal verification, the same thing happens in computer science. Someone can write a TLA+ specification to show that their implementation of Paxos/Raft is correct, but it's possible that the specification does not match the code.

comment 1w ago · link · parent

If you are writing green field software, just structure it in such a way that makes DST possible. That's what I'm doing with pg2iceberg [1]. The DST harness has caught a lot of edge cases that cause data loss. It's hard to imagine building it without DST.

[1] https://github.com/polynya-dev/pg2iceberg

comment 1w ago · link · parent

I'm sorry, but this is AI psychosis.

comment 1w ago · link · parent

Personally I feel like it's insane to think that EM can be replaced by AI. EM are meant to solve people problems. The best thing that has ever happened in my career was having a good EM that stood up for me when I made expensive mistakes when he could have easily fired me. No way an AI could have done that.

comment 1w ago · link · parent

ZDR through AWS Bedrock is still safe right? AFAIK Bedrock self hosts all models they provide. Even proprietary weight models like Claude are run within AWS network.

comment 2w ago · link · parent

Yes, proving GRH is not as important as how it was proven. For example, take a look at how Fermat's Last Theorem was proven by Andrew Wiles [1], and what's the impact of his efforts had toward algebraic number theory. The fact that he proved FLT to be true has little consequence compared to the method he invented to get there. Before it was proven, most mathematicians have assumed FLT to be true anyway.

[1] https://en.wikipedia.org/wiki/Wiles%27s_proof_of_Fermat%27s_...

comment 3w ago · link · parent

Does this mean we can have scale-to-zero Postgres? One pain we have with Clickhouse Postgres is that we have to pay for dev/staging databases that receive no traffic most of the time.

comment 1mo ago · link · parent

I wonder if they have considered moving back to ClickHouse. ClickHouse Iceberg support has improved a lot over the past few months. You can easily run stateless ClickHouse on top of Iceberg. This solves the tenancy issue, and it can easily handle petabytes scale [1].

[1] https://clickhouse.com/blog/jump-trading-uses-clickhouse-wit...

comment 1mo ago · link · parent

It’s not pessimistic at all. Look at the advances in math thanks to hundreds years of pursuit to prove Fermat’s Last Theorem before Andrew Wiles finally did it in the 90s. You will not get that with LLM. That’s what mathematicians are mourning over.

comment 1mo ago · link · parent

I've never touched my ISP-provided router. But maybe it's just how it works in my country (Malaysia), we pretty much only have 1 ISP with monopoly, so maybe that helps.

comment 2mo ago · link · parent

Queues are for actions (do this), K2/event streams are for events (this happened).

comment 2mo ago · link · parent

It’s built for Cloudflare ecosystem, IMO using K2 on its own doesn’t make sense. I’ve worked with a startup that uses Cloudflare for everything except for Kafka. If K2 were to exist back then, I’m pretty sure they would have used it.

comment 2mo ago · link · parent

The homepage shows an example of an agent accidentally dropping a table.

1. This is such an insane example, I don't get why would you give agents write access to your production db in the first place. Are people really doing this? I don't even have production connection urls on my laptop. Any manual statements executed against the db must be treated as a war-room situation with at least another engineer reviewing your SQL before you execute it.

2. Dropping the table could have easily caused writes to fail. Most likely there is no way to recover these writes (especially if it's from user requests), so it could have lead to loss of data. Reversing the table drop doesn't fix this issue.

comment 3mo ago · link · parent

Having worked at a large company that misuses feature flag service for everything, here are some examples why you shouldn’t:

- one team uses feature flag for product gating. Feature flag service goes down. Users temporarily got locked out of the features they paid for.

- one team uses feature flag for dynamic pricing by leveraging targeting rules (how hard is it to write a bunch of if else in code?). It’s evaluated against all users, even if they are not active (for analysis reasons). Feature flag service charges by MAU. We have millions of users. Our feature flag service bill is now 6 digits per year.

- one team uses feature flag as literal json store instead of a proper db (god knows why). Someone updated the value but the “schema” is wrong. Shit breaks.

comment 3mo ago · link · parent

> Examples? Ok -> Let us look at data storage.

> They got D1 (SQLite serverless), Durable Objects with their own SQLite, KV, R2, Queues, and Hyperdrive to speed up external Postgres or MySQL.

Maybe it's just me, but I don't see this as confusing:

- D1 is SQLite on cloud, their go-to relational database

- Durable object is the cousin of durable execution (via actor model instead of saga)

- KV is for caching like Redis (sub-ms read latency)

- R2 is S3, R2 SQL is Iceberg + Athena (for OLAP queries)

- Queue is SQS

- Hyperdrive is bridge to allow CF worker to use native Postgres/MySQL driver (since v8 isolate cannot maintain persistent connection)

I've built some stuff on top of CF, and the data ecosystem is actually useful.

comment 3mo ago · link · parent

DMS is so unreliable though.

comment 3mo ago · link · parent

I’m waiting for Cloudflare R2 to eventually support mirroring Postgres into R2 catalog. It seems like a nice fit because they already have R2 SQL.

comment 3mo ago · link · parent

Yes I’m not suggesting to do this inside Postgres. I’m hoping that a Postgres provider can provide this mirroring capability out of the box, similar to how they provide a connection-pooled endpoint out of the box so I don’t have to self-host pgBouncer. I just want to be able to check a box somewhere and have a table in Postgres automatically mirrored to Iceberg, with guarantee that no data is lost. They can charge more for it, I will gladly pay.

comment 3mo ago · link · parent

It's interesting to watch how different companies that offer both Postgres and warehousing solution under 1 roof approach the same problem:

- ClickHouse focuses on traditional CDC (ClickPipes) and just make it blazingly fast

- Databricks leans on their unified storage architecture (LTAP) to avoid copying data (though you can argue there is still a copy in the cache)

- Snowflake uses a data mirroring CDC as extension so it runs directly on Postgres

I'm still waiting for a Postgres provider to just let me mirror data directly to Iceberg, so I can plug in my own stateless query engine.

comment 3mo ago · link · parent

> Almost always they end up setting up a separate system such as Clickhouse and replicating the data between the two systems. Now they can have one system that's Postgres-compatible, and it's faster than either of the original systems.

I can see the appeal for pgrust for smaller teams who need analytics, and don't want to deal with having to ETL to something like ClickHouse. But beyond a certain complexity, replicating your data to a warehouse or lakehouse _is_ the right approach and more scalable for several reasons:

- Analytics tend to be centralized, i.e. you want data from several Postgres databases spread across multiple teams to be replicated into 1 place, so people can start joining data across the entire business

- Analytics tend to fall under a different team ownership with their own set of non-technical requirements (e.g. data governance)

- Lakehouse architecture (Iceberg + [insert query engine]) is more scalable in terms of cost

- In some cases, you want to be able to swap different query engines depending on the use case, e.g. use PuppyGraph to query your data in Iceberg for fraud analysis

comment 3mo ago · link · parent

I'm guessing it's something like MongoDB TTL index[0]. It's useful for huge append-only tables where you want a row to be automatically removed after a period of time. The postgres approach is usually to partition your table by the event/insertion timestamp, and use something like pg_partman[1] to automatically drop entire partitions over time.

[0] https://www.mongodb.com/docs/manual/core/index-ttl/

[1] https://github.com/pgpartman/pg_partman

comment 4mo ago · link · parent

Sorry but that is not pixel art.

comment 4mo ago · link · parent

If your domain is analytics-heavy, don't try to optimize your Postgres for analytics. Follow the standard pattern of mirroring your data to a data warehouse and go to town there instead. There will be upfront cost of having to pay for a warehouse and the ETL, but it will be worth it.

comment 4mo ago · link · parent

As a parent with 3 kids and both my wife and I working, folding clothes is the most tedious household chore. It's physically and mentally exhausting (unlike doing the dishes, which is only physically exhausting as I can wash piles of dishes while zoning out). And not to mention take so much time, a week's worth of unfolded pile of clothes for our entire household can take me 1-2 hours to fold uninterrupted (2-3 hours if I do it while watching Netflix or something).

comment 4mo ago · link · parent

I'm surprised no one has mentioned Multigres yet, they are the competitor of Neki. I'm a big fan of both and has been following them since they were announced last year. I think this blog post is the first time they are talking about the internals of Neki. In contrast, Multigres is being built in public since day 1, you can see their high-level architecture here [1], though I'm still waiting for more details on their sharding model.

[1] https://multigres.com/docs/architecture

comment 4mo ago · link · parent

At huge companies, it's hard to prioritize this because it's hard to pin dollar values to removing legacy code, while it's easier to show how building feature X will earn the company $Y amount of revenue. And because of that, there is also no incentive to do it, you don't get promoted by deleting old code, you get promoted by showing how your effort helped contribute to company revenue. At my previous company (100+ engineers, hundreds of microservices), teams that regularly clean legacy codebase tend to be platform teams (cost centers), while teams that struggle to get these prioritized are product vertical teams (revenue centers).

comment 5mo ago · link · parent

How does LTAP architecture deals with major Postgres upgrade? Is it truly zero-downtime for both upstream and downstream?

comment 5mo ago · link · parent

> If you have something like dolt (not affiliated), a version controlled database, you wouldn’t have to slap change dates on anything OR create your historical table. The changes would be implicit in the version history.

Nope, even if I have the ability to see the exact changes of each row, I would still add timestamps everywhere, because timestamp of row change does not equal event timestamp. For example, if I have an order table with status column, and I see a CDC event where status changed from in_progress to completed, I cannot simply assume that the CDC timestamp is the timestamp when order was completed. It's possible that the source database received the event late a few minutes late due to delay upstream, or it's backfilling some missed orders a few days ago. Having a completed_at timestamp (and a bunch of other timestamps for each order lifecycle) would eliminate any ambiguities, and your data analyst will thank you for it.

It's the same thing with row history. You cannot simply assume that your row changes are aligned with the logical history of your entity.

12