4 ms·
Honestly, no. Despite all the supposed advantages of async, I haven't found a use for it. When it comes to web apps a nginx + uwsgi + a sync framework is an un
by euphetar 8y ago
Honestly, no.
Despite all the supposed advantages of async, I haven't found a use for it.
When it comes to web apps a nginx + uwsgi + a sync framework is an unbeatable combination.
The only times I have used async were when I made website scrapers and telegram bots for And if I was to scrape websites now, I would just use scrapy. My favorite telegram bot framework is synchronous too.
- siddhant 8y agoThere are some use cases in web programming. For example, if a request handler (view, in Django's terminology) is in turn calling out some external endpoints, you don't want those external requests to block other requests to your API. For things like those, async is actually quite nice.
- nsomaru 8y agoYou can mix asynchronous code with Django?
- dec0dedab0de 8y agoYou kick off an async task in celery or use some other way to keep track of it. Then return a key, and have your front end poll for status
- siddhant 8y agoThere are things you can do to achieve async in Django. But I only used Django terminology because Django is more popular than other frameworks.
- zepolen 8y agoAre you talking about blocking other requests to the request handler or to external endpoints? Because both can be solved in a sync server via thread pools.
- viraptor 8y agoIt really depends on how responsive your endpoints are. If they're really slow (or slowly streaming data), you can probably do hundreds/thousands via thread pools. (depends how you do the dispatch / locking) You can go orders of magnitude higher with async. (as in epoll - specific async frameworks may have their own bottlenecks)