I have received word that there are people combing through the PieFed code looking for anything that might be harmful. This is excellent and can only make PieFed better and less harmful.
We appreciate their interest in PieFed and look forward to answering any questions and showing people around the code. Please join us at https://chat.piefed.social/ or https://matrix.to/#/#piefed-developers:matrix.org.
There’s no need to listen to rumors and amateur speculation when we’re right here and happy to help. Come on in, the water’s fine!


I like FastAPI and PieFed uses it as well as Flask. Doing SSE (which involves holding HTTP connections open for a long time) was not going to work with Flask so that part is written using FastAPI.
Before starting development I did some experiments with Quart, an ASGI port of Flask. It was fine but didn’t offer significant performance benefits until there were many many concurrent users, a situation that is still far in the future. Also as a more obscure framework it seemed like a risky bet. And if ASGI becomes absolutely necessary, we can migrate from Flask to Quart relatively easily. There’s a good chance that PieFed 2.0 will use Quart.
I have also experimented with gevent as a way to make Flask do async. I got it working but every 5 or 6 hours everything falls over in a heap and needs to be restarted (DB connection leakage). Despite it being unreliable I was able to run it in production long enough to see how it performs and at our current scale it was not any better than what we have now. A bit worse, really.
It’s possible that the importance of async is a bit oversold - https://hackeryarn.com/post/async-python-benchmarks/
Also at the same time the latest versions of Python have done away with the GIL that used to ruin threaded performance so that could eventually mean that wsgi might start to use threads well enough to be pretty great. We’ll see.
GILless python is a good point it makes python scaling alot better. Though every python service ive maintained or created in the long term I always wish I never used python. I understand the calculus though for using the python, reason feels somewhat outdated in the modern world of AI coding imo.
Actually as an aside how much of the code is created by AI
Performance is something developers like to use as a way to assess quality but there are far more important things (which are harder to put a number on to be objective about) like how easy it is for new developers to contribute to. Besides, it’s what you do with it that counts - e.g. despite Lemmy being written in Rust people are finding it much heavier on the server than PieFed.
People can make slow software using any language or framework.
I don’t have a way to know whether code that others contribute is written by AI (except when the quality is really bad, then the PR is rejected) so I bet there’s some in there but I avoid it. I can’t afford the brain-rot of becoming dependent, at my age the rot is happening naturally pretty fast already. There is a whole spectrum of ways to do AI-assisted dev and it’s changing all the time so I’m not trying to police that and just focus on the quality of the code in the PR.
Does piefed image proxy by default? I noticed the homepage for lemmy.today is really heavy since the proxy’d images seem to be full resolution. I ask this since that thread is about people saying piefed runs smoother they said image proxy is by default on lemmy due to CSAM issues. The network utilization blogpost also seems kind of disingenuous since it puts equal weight on the network utilization on javascript, image compression, and a bad api pattern by the lemmy dev. Through those are issues it seems like its 99% you guys more heavily downscale the images vs lemmy.world (Though I like your guy’s solution better).
Do you also manage the piefed.social servers? What kind of cpu/bandwidth/memory utilization do you guys run for the instances serving the api gateway, am curious about the infra setup in general.
The image thing is complicated.
I run piefed.social’s infrastructure, it’s just a medium-sized VPS that has the database, web app, api, etc all in one. There’s also an old server at my home that’s used for some auxiliary stuff like translation services which are shared across all PieFed instances and which runs chat.piefed.social and translate.piefed.social.