TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Async Django in Production

50 pointsby jonathan-adly6 months ago

6 comments

singularity20016 months ago
When will it be common knowledge that introducing async function coloring (on the callee side, instead of just 'go' on the call side) was the biggest mistake of the decade?
评论 #42228875 未加载
评论 #42228586 未加载
评论 #42227906 未加载
评论 #42228788 未加载
评论 #42229119 未加载
评论 #42228743 未加载
评论 #42230176 未加载
jonathan-adly6 months ago
We have traditionally used Django in all our projects. We believe it is one of the most underrated, beautifully designed, rock solid framework out there.<p>However, if we are to be honest, the history of async usage in Django wasn&#x27;t very impressive. You could argue that for most products, you don’t really need async. It was just an extra layer of complexity without any significant practical benefit.<p>Over the last couple of years, AI use-cases have changed that perception. Many AI products have calling external APIs over the network as their bottleneck. This makes the complexity from async Python worth considering. FastAPI with its intuitive async usage and simplicity have risen to be the default API&#x2F;web layer for AI projects.<p>I wrote about using async Django in a relatively complex AI open source project here: <a href="https:&#x2F;&#x2F;jonathanadly.com&#x2F;is-async-django-ready-for-prime-time" rel="nofollow">https:&#x2F;&#x2F;jonathanadly.com&#x2F;is-async-django-ready-for-prime-tim...</a><p>tldr: Async django is ready! there is a couple of gotcha&#x27;s here and there, but there should be no performance loss when using async Django instead of FastAPI for the same tasks. Django&#x27;s built-in features greatly simplify and enhance the developer experience.<p>So - go ahead and use async Django in your next project. It should be a lot smoother that it was a year or even six months ago.
评论 #42228508 未加载
olgeni6 months ago
I was using Daphne and then found out that it read the whole files in a POST before passing it along - needless to say I am no longer using Daphne \o&#x2F;
beestripes6 months ago
Nearly all of the work done on Django ninja is by someone who lists their location on GitHub as Kharkiv. I hope that’s not current.
pacifika6 months ago
Learned quite a bit thanks!
andrewstuart6 months ago
Async Django is a bit of a puzzle …. who is it for?<p>People who like synchronous Python can use Django.<p>People who like asynch Python can use Starlette - the async web server also written by the guy who wrote Django.<p>It’s not clear why Django needs to be async, especially when I get the sense there’s developers who like async and developers who prefer synch. It’s a natural fit for Django to fulfill the sync demand and Starlette to fulfill the async. They’re both good.
评论 #42226938 未加载
评论 #42228744 未加载