Live data from Hacker News

Backend of Meta Threads is built with Python 3.10

twitter.com

381–390 of 458 posts

Re: Backend of Meta Threads is built with Python 3.10

#381
post #186

Earlier quoted context omitted.

It wouldn't. Databases are fast, python is slow.

Network is slow. So you are waiting on the db for most of a request lifecycle.

Network latency within an AWS AZ is What percentage of python webapps do you think are hitting this as their latency and throughput limit?

(Assuming effective DB use of course, i.e. not doing dozens of DB roundtrips to server a single result or getting megabytes of data and filtering on the client etc.)

Re: Backend of Meta Threads is built with Python 3.10

#382
post #365

Earlier quoted context omitted.

Except that Shopify is actually paying a couple of enginners to write a Ruby JIT compiler. Not only that, the community felt the pressure to write several JIT compilers already. So....

So what? A company is trying to streamline their process and save costs? Is there any large company at all that hasn't invested in making their tool chain better? You talk about it like they are a failure. Lol

Costs that wouldn't have happened in first place if a scripting language hadn't been chosen in first place.

Re: Backend of Meta Threads is built with Python 3.10

#383
post #131

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.

While that is technically correct, they haven't been running vanilla PHP for quite some time - it's jitted into x86 and run natively on the machine. It's also pretty extensively optimized. And the VM that does the jitting is all C++. Their MySQL deployment is also an internal fork that's been heavily modified for scalability (storage/compute separation, sharding, RocksDB based storage engine instead of InnoDB, Raft f…

It terrifies me that they probably ran their numbers very carefully and realized that this feat of engineering was still cheaper than rewriting their platform using a more manageable tech stack.

Re: Backend of Meta Threads is built with Python 3.10

#384
post #131

Earlier quoted context omitted.

While that is technically correct, they haven't been running vanilla PHP for quite some time - it's jitted into x86 and run natively on the machine. It's also pretty extensively optimized. And the VM that does the jitting is all C++. Their MySQL deployment is also an internal fork that's been heavily modified for scalability (storage/compute separation, sharding, RocksDB based storage engine instead of InnoDB, Raft f…

It terrifies me that they probably ran their numbers very carefully and realized that this feat of engineering was still cheaper than rewriting their platform using a more manageable tech stack.

The decision is often inspired by two things A) how near impossible it is to migrate the sheer amount of services and code without breaking something. B) that often the needed performance is not needed is not having big jumps. So small but constant improvements are the way to go.

Re: Backend of Meta Threads is built with Python 3.10

#385
Threads is a repurposing of Instagram's backends / APIs. Instagram has been based on Python from the start. Therefore Threads happens to use Python. It doesn't mean that Python is the language that one should pick when building this sort of app given alternatives that don't require an in-house fork. The full post makes this reasonably easy to grok but I'm sure the hacker news "title-only" UI is misrepresenting.

Re: Backend of Meta Threads is built with Python 3.10

#386

Threads is a repurposing of Instagram's backends / APIs. Instagram has been based on Python from the start. Therefore Threads happens to use Python. It doesn't mean that Python is the language that one should pick when building this sort of app given alternatives that don't require an in-house fork. The full post makes this reasonably easy to grok but I'm sure the hacker news "title-only" UI is misrepresenting.

Sheesh, relax, dude. Python is a perfectly good language.

Re: Backend of Meta Threads is built with Python 3.10

#387
post #131

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.

While that is technically correct, they haven't been running vanilla PHP for quite some time - it's jitted into x86 and run natively on the machine. It's also pretty extensively optimized. And the VM that does the jitting is all C++. Their MySQL deployment is also an internal fork that's been heavily modified for scalability (storage/compute separation, sharding, RocksDB based storage engine instead of InnoDB, Raft f…

While you're technically correct that they aren't running vanilla PHP, the main takeaway here is that if you want to ultimately want to scale to billions of users then you should probably use vanilla PHP, or maybe Python.

Re: Backend of Meta Threads is built with Python 3.10

#388
post #115

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.

You mean the company that had to create their two PHP implementations and a translator to C++, to actually scale?

You're telling me that they chose to build with PHP and had the most successful scaling story of all time?

Re: Backend of Meta Threads is built with Python 3.10

#389
post #115

Earlier quoted context omitted.

You mean the company that had to create their two PHP implementations and a translator to C++, to actually scale?

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

I remember when I used to rewrite stuff before fully understanding the drawbacks of what I was rewriting it in.

Re: Backend of Meta Threads is built with Python 3.10

#390

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.

i don't think anybody really claims python can't be used to build large software the claim is usually more about how the maintenance costs are just way higher versus a statically typed language

But is that true if the dynamically typed language has type annotations?
Post reply on HN