4 ms·
it would be superb if something like this can be built on the newer ASGI based frameworks - Starlette or Fastapi (which is built on Starlette). They are among
by sandGorgon 7y ago
it would be superb if something like this can be built on the newer ASGI based frameworks - Starlette or Fastapi (which is built on Starlette).
They are among the fastest python frameworks according to techempower benchmarks, have automatically included type checking and are async.
- necovek 7y agoIndeed, it's surprising that someone is building today a framework in Python that is not async, when it's pretty easy to do so (compared to eg. the twisted days, but even to pre3.6 days).
- mixmastamyk 7y agoAsync is not helpful for most projects and complicates the rest.
- caro_douglos 7y agoWhile async is a huge plus of fast api I’ve found the documentation creation to be the most helpful. My 2c.
- zedpm 7y agoThat's an odd assertion. What kind of things do you think most projects do? I'd say most projects have network IO happening (querying databases, storing data to e.g. S3, communicating with other web services), in which case async absolutely is helpful and far more performant.
- mixmastamyk 7y agohttps://techspot.zzzeek.org/2015/02/15/asynchronous-python-and-databases/ https://techspot.zzzeek.org/2015/02/15/asynchronous-python-a...
- zedpm 7y agoThat's nearly 5 years old now, so even the bits of that which are backed up with actual data aren't of much use. Benchmarks of asyncio in python 3.4.1 are going to be wildly different than in later versions. I understand the argument he's trying to make about db access and performance, but modern benchmarks seem to disprove his argument, e.g. https://www.techempower.com/benchmarks/#section=data-r18&hw=ph&test=db&l=zijzen-f https://www.techempower.com/benchmarks/#section=data-r18&hw=... and https://www.techempower.com/benchmarks/#section=data-r18&hw=ph&test=query&l=zijzen-f https://www.techempower.com/benchmarks/#section=data-r18&hw=... .
- mixmastamyk 7y agoNot sure what I’m looking for.
- necovek 7y agoIn the second URL, most async frameworks can deliver around 10x the number of http request for endpoints doing 20 sql queries to pg (15000 vs 1500 for flask/django...). Note that this thread is a discussion of a new web framework — one that will definitely do network requests, and likely to do db requests (over a network or a local socket, but I/O bound regardless).
- zedpm 7y agoYes, sorry, those are benchmarks for python web frameworks making db queries. All the top performers are async frameworks.
- mixmastamyk 7y agoYes I’ve seen this site before and knew that the top performers are async. However thought there was a particular application where it helped most, eg websockets rather than simple crud. Most apps aren’t making super simple queries like this either. Whether any of it matters much I’m not sure.