TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Async Django in Production

50 点作者 jonathan-adly6 个月前

6 条评论

singularity20016 个月前
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 个月前
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 个月前
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 个月前
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 个月前
Learned quite a bit thanks!
andrewstuart6 个月前
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 未加载