Live data from Hacker News

Backend of Meta Threads is built with Python 3.10

twitter.com

231–240 of 458 posts

Re: Backend of Meta Threads is built with Python 3.10

#231
post #207

Earlier quoted context omitted.

> all the 100 users That’s off by multiple orders of magnitude, if you believe their reports of 30 million sign ups in under a day. https://www.theverge.com/2023/7/6/23786108/threads-internal-...

You mean sign-in's?

I’m using their terminology. The distinction seems irrelevant for the conversation.

Re: Backend of Meta Threads is built with Python 3.10

#232
post #206
post #156

Earlier quoted context omitted.

I can't give Django enough praise. I never thought I'd be writing Python. I've mostly used Node, Java, and Rust, with about 12yrs experience now. Only about one year with Python and Django recently. I am so much more productive than anything else I've tried. Using anything else feels like a mistake for web apps or CRUD apis. I also use type hints. I use Django + django-ninja + django-unicorn for dynamic UIs. Building…

You are also running sidewaysdata.com with DEBUG turned on in production, apparently ;)

lol thanks. it's not really ready for use yet anyway :)

Re: Backend of Meta Threads is built with Python 3.10

#233

For the “Python isn’t fast enough for production backend” crowd from the same company that brought you the largest social network built on PHP + MySQL.

PHP didn't scale for the number of users or the number of developers. Presumably that's why they built their own PHP-like language called Hack with static types and a new runtime.

Re: Backend of Meta Threads is built with Python 3.10

#234
post #155

Earlier quoted context omitted.

Quite often, the choice of language is failing to see the forest for the trees. Saving nanoseconds or cycles because you chose C++ over Python pales in comparison to milliseconds spent at network barriers reading from a cache service or database

Perceivable latency isn't the only consideration. Depending on your business, compute for your proprietary workloads might be one of your biggest expenses. You could see an order of magnitude improvement to resource consumption depending on the type of workload and the language it is written in. Ultimately these these choices are all about trade-offs. Maybe python is fine for them, maybe they've built themselves into…

When they need a full re-write the specification will be easy: they've already got the pseudocode. (I kid because I love Python)

Re: Backend of Meta Threads is built with Python 3.10

#237

Earlier quoted context omitted.

Linking to it works better than linking to Twitter, in fact, as of this week (Twitter no longer shows replies unless you're logged in...)

Twitter no longer shows anything unless you're logged in. Everything just redirects to a login page.

[dead]

Re: Backend of Meta Threads is built with Python 3.10

#238

Earlier quoted context omitted.

They ended up compiling PHP to assembly! Facebook is a company that will go to ridiculous lengths to avoid rewrites.

I know you're being hyperbolic, but during my time there, your impact was measured only on measurable things like performance gains but never on lines of code. So engineers would always go in the direction of whatever gets you the biggest win. Sometimes that actually meant rewriting the thing from scratch, and other times that meant adding something else as a middleware to prevent touching the original thing. For the…

I spent five years there, and made that joke constantly.

It's mostly hyperbole but there's definitely a kernel of truth to it. I generally dislike rewrites and I wonder if FBs approach influenced me more than I realized at the time.

Re: Backend of Meta Threads is built with Python 3.10

#239
post #206
post #156

Earlier quoted context omitted.

I can't give Django enough praise. I never thought I'd be writing Python. I've mostly used Node, Java, and Rust, with about 12yrs experience now. Only about one year with Python and Django recently. I am so much more productive than anything else I've tried. Using anything else feels like a mistake for web apps or CRUD apis. I also use type hints. I use Django + django-ninja + django-unicorn for dynamic UIs. Building…

You are also running sidewaysdata.com with DEBUG turned on in production, apparently ;)

fixed

Re: Backend of Meta Threads is built with Python 3.10

#240

Earlier quoted context omitted.

Curiously, VKontakte also started from PHP+MySQL but went another way. PHP is compiled ahead of time with something called KittenPHP. It's open-source. For databases they switched some parts to their own bespoke solutions in C that talk with PHP over the memcached protocol. These are called KittenDB (or "engines") for the simple single-purpose ones, and there was also a more generic MySQL replacement in development w…

I’m not sure why someone of facebook’s scale would want JIT instead of AOT. That’s a lot of servers all JITing the same thing that could be done once at build time.

JIT compilation has the opportunity to do profile-guided optimization at runtime. JIT compilation is also simpler when distributing an application to non-identical servers, as it can optimize for the exact hardware it is running on.
Post reply on HN