Live data from Hacker News

Backend of Meta Threads is built with Python 3.10

twitter.com

331–340 of 458 posts

Re: Backend of Meta Threads is built with Python 3.10

#331
post #328
post #327

Aside: I see a ton of hype about threads.net all over HN and elsewhere, but it's still useless thus far. It loads a javascript-driven animation of what appears to be a galaxy, any not much else. There is a QR Code at the bottom right corner that appears to be invalid. Not sure what I'm missing. 10MM+ signups through what mechanism? There is no signup form as far as I can tell. Do they restrict full content access for…

There is no web interface, but they will almost certainly add one. MVP baby!

Got it, thanks.

But that's really odd because most mobile MVPs are either just PWAs or some React Native shit compiled to binaries.

Why the hell wouldn't they just release it on the web?

Re: Backend of Meta Threads is built with Python 3.10

#333
post #266

Earlier quoted context omitted.

> Facebook had hundreds of millions daily active users before writing a compiler. In other words, Facebook felt compelled to write a compiler when they had hundreds of millions daily active users.

If you have hundreds of millions of daily active users then needing to write a compiler isn't the end of the world.

Compiling PHP into machine code sounds pretty much impossible, are they using some subset of the language? Does the compiled code use a garbage collector? Or reference counting?

Re: Backend of Meta Threads is built with Python 3.10

#334
post #216

Earlier quoted context omitted.

How is Django now? I’m a long time python dev (data eng space) but new-ish to web dev. I started a Flask project 2 years ago and found it to be pretty full of footguns, mixed messaging on best practices for scalable apps, and the ecosystem feels overbloated with vapor ware extensions. Is this just a Flask problem, or does Django have the same issues?

I've used Flask/SQLAlchemy and Django a bunch in my day, professionally and on the side. It's a different strokes for different folks sort of deal. Django is very opinionated, in a way that is "eventually" correct (i.e. they might have had some bad opinions many years ago, but they have generally drifted in a better direction). If the opinions don't align with what you're building, the escape hatches are not generall…

As a minor rebuttal, I get sick of Flask because it is bring-your-own everything. Nothing I write will ever NeedToScale(TM) or be off the beaten path from the Django Way. No interest in plugging in an alternative template language, form validation, email library etc. When I get stuck in Django, I know someone else has experienced the exact same situation. With Flask, I have to pray to deity that Miguel Grinberg has written about a similar enough situation. The majority of documentation foregoes Flask Blueprints.

Re: Backend of Meta Threads is built with Python 3.10

#335
post #331
post #328

Earlier quoted context omitted.

There is no web interface, but they will almost certainly add one. MVP baby!

Got it, thanks. But that's really odd because most mobile MVPs are either just PWAs or some React Native shit compiled to binaries. Why the hell wouldn't they just release it on the web?

Most people access social media using mobile apps, not websites. I don’t think I’ve used the Facebook, Instagram, or Twitter websites in years.

Re: Backend of Meta Threads is built with Python 3.10

#336
post #186

Earlier quoted context omitted.

Whether it's in C++ or Rust or Python, almost all of any slowness would be from database waiting anyway.

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.

Re: Backend of Meta Threads is built with Python 3.10

#337
post #55

Really, all the performance intensive parts are in various c++ aggregator and recommendation type services. But the webserver is Django, yes.

Django is WSGI/ASGI framework not a webserver. What do they actually use to terminate HTTP?

Not sure about what Meta is using for Threads, but gunicorn and nginx are a common set up for Django in production.

Some will use `python manage.py runserver` in production, and they are using the defacto wrong set up. Don't ever do that.

Re: Backend of Meta Threads is built with Python 3.10

#338
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.

Every company should go to ridiculous lengths to avoid rewrites. Rewrites of significant tech (as a proxy, lets say 100+ kloc) spell doom. Doom.

Re: Backend of Meta Threads is built with Python 3.10

#339
post #117

Earlier quoted context omitted.

If you want real irony here, it's this: powering an app called Threads with Python that's got a global interpreter lock which makes threading hard. Get it? Threads, threading...? OK, I'll see myself out.

Gotten burned by that. Have a python utility that calls something that's very CPU intensive (GDAL) and I literally have to wrap this python process in java for real concurrency. Not a python expert by any means but I'd love to know what other people do when this happens. I'm assuming it's something revolving around containers and messaging (blech)...

Python works around this by having multithreading through multiprocessing and IPC. its made pretty easy to use with the futures builtin module but is finicky/slow/hard to support.

Re: Backend of Meta Threads is built with Python 3.10

#340
post #320

Earlier quoted context omitted.

Your semantics are irrelevant. People who write PHP end up with faster performing applications than people who write Python.

Am I seeing two people debating which language is faster without quoting any numbers?

I assumed it was common knowledge at this point.

https://www.techempower.com/benchmarks/#section=data-r21&l=z...

Post reply on HN