←back to thread

1298 points jgrahamc | 1 comments | | HN request time: 0.799s | source
Show context
jgrahamc ◴[] No.22883548[source]
I posted this hours ago and then stepped away. The story captures so much about the Lee I knew so well. I'll add one piece of praise for Lee's early architecture of Cloudflare.

Everything was controlled by a single Postgres database that made very heavy use of stored procedures, that called other procedures, that called others. It was one giant program inside the database. It took me a while to comprehend what he'd done but it was really great. The database ran everything and all those functions made sure that audit logs were kept, that the calls were allowed for the user ID being passed in, and some of these procedures made external calls to APIs including getting things like SSL certificates.

It was a magnificent monolith inside a database.

I worked on the periphery of the database (it was truly Lee's domain) and he'd tell me what output to expect or API to create and I'd code to his spec. and we'd just hook it up.

If any single artefact represents what he did at Cloudflare, it's that database. And he used to code it on a laptop we called "The Beast" because it was so crazily heavy and overloaded with memory etc. that he'd carry around a mini, test Cloudflare wherever he went.

replies(2): >>22883751 #>>22883786 #
woah ◴[] No.22883786[source]
I’m sure he did a great job, but I’ve seen those things be a huge nightmare for anyone other than the irreplaceable genius code wizard who created them.
replies(2): >>22884527 #>>22884915 #
illumin8 ◴[] No.22884915[source]
Yeah, stored procedures making API calls to external services, sounds like a nightmare of tech debt to unwind.

I'm sure when you have a brilliant engineer like this you can make it work though.

replies(1): >>22890840 #
cookiecaper ◴[] No.22890840[source]
Step back and take an honest look, and in the vast majority of systems, it's hard to deny that stored functions and/or procedures are one of the most powerful tools in the toolbox. If anything, they're widely underutilized. This is especially the case with Postgres -- it has built-in support for functions in several non-SQL languages (including Python).

In practice, the aversion to stored funcs/procs mostly arises from political concerns. Most devs don't understand databases very well, and in most companies, independent DBA teams and independent dev teams end up burning tons of energy fighting for turf.

One of the advantages of a startup is that the smart people are free to utilize the best tools in the toolbox for the problem at hand, rather than having to conform to the social mores around "don't use that tool because it's under the control of the other team and we'll never be allowed to touch it again".

replies(1): >>22892338 #
1. eternalban ◴[] No.22892338[source]
I personally think consideration of this apprach speaks of the technical range and sophistication of the practitioner. It is unusual, but we're in agreement that this is due mostly due to soft and orthogonal issues.

(Tooling could be improved to make the development and debugging process more seamless.)