> we make heavy use of asyncio because it’s more performant<p>more performant than....what exactly? If I need to load 1000 rows from a database and splash them on a webpage, will my response time go from the 300ms it takes without asyncio to something "more performant", like 50ms? Answer: no. async only gives you throughput, it has nothing to do with "faster" as far as the Python interpreter / GIL / anything like that. If you aren't actually spanning among dozens/hundreds/thousands of network connections, non-blocking IO isn't buying you much at all over using blocking IO with threads, and of course async / greenlets / threads are not a prerequisite for non-blocking IO in any case (only select() is).<p>it's nice that uvloop seems to be working on removing the terrible performance latency that out-of-the-box asyncio adds, so that's a reason that asyncio can really be viable as a means of gaining throughput without adding lots of latency you wouldn't get with gevent. But I can do without the enforced async boilerplate. Thanks javascript!
We've just recently started using Sanic[0] paired with Redis to great effect for a very high throughput web service. It also uses Python 3 asyncio/uvloop at its core. So far very happy with it.<p>[0] <a href="https://github.com/channelcat/sanic" rel="nofollow">https://github.com/channelcat/sanic</a>
Can anyone recommend a good book to get started on concurrency, with discussions of models, and a few implementations such as golang and python 3.5+?<p>While I can write this kind of code, I don't feel like I completely understand some of the concepts.
> Write Fast Apps Using Async Python<p>When working with Python and Ruby I find 80ms responses acceptable. In very optimized situations (no framework) this can do down to 20ms.<p>Now I've used some Haskell, OCaml and Go and I have learned that they can typically respond in <5ms. And that having a framework in place barely increases the response times.<p>In both cases this includes querying the db several times (db queries usually take less then a millisecond, Redis shall be quite similar to the extend that it does not change outcome).<p><5ms makes it possible to not worry about caching (and thus cache invalidation) for a much longer time.<p>I've come to the conclusion that --considering other languages-- speed is not to be found in Python and Ruby.<p>Apart from the speed story there's also resource consumption, and in that game it is only compiled languages that truly compete.<p>Last point: give the point I make above and that nowadays "the web is the UI", I believe that languages for hi-perf application development should: compile to native and compile to JS. Candidates: OCaml/Reason (BuckleScript), Haskell (GHCJS), PureScript (ps-native), [please add if I forgot any]
> Paxos.com<p>I'm confused by the relationship between Paxos, the company, and Paxos, the algorithm. Do the authors of Paxos work for Paxos?<p>Edit:<p><a href="https://en.m.wikipedia.org/wiki/Paxos_(computer_science)" rel="nofollow">https://en.m.wikipedia.org/wiki/Paxos_(computer_science)</a><p>Ah; both are named for a fictional financial systen
>>> The performance of uvloop-based asyncio is close to that of Go programs.<p>I would prefer standard benchmarks for this. I hope they submit their framework to TechEnpower benchmarks.<p><a href="https://www.techempower.com/benchmarks/" rel="nofollow">https://www.techempower.com/benchmarks/</a>
> You get the benefits of a database, with the performance of RAM!<p>One of the benefits of modern RDBMS is that they make extremely sophisticated use of RAM, and all levels of fast to slow storage below that SSD / RAIDs / slow single spindle.
Quite related, but if you want to use Redis as a SQL database I wrote an extension to do just that: <a href="https://github.com/RedBeardLab/rediSQL" rel="nofollow">https://github.com/RedBeardLab/rediSQL</a><p>It is a relative thin layer of rust code between the Redis module interface and SQLite.<p>At the moment you can simply execute statements but any suggestion and feature request is very welcome.<p>Yes, it is possible to do join, to use the LIKE operator and pretty much everything that SQLite gives you.<p>It is a multi-thread module, which means that it does NOT block the main redis thread and perform quite well.
On my machine I achieved 50.000 inserts per seconds for the in memory database.<p>If you have any question feel free to ask here or to open issues and pull request in the main repo.<p>:)
This is pretty neat. I've been using a plain Redis wrapper (aioredis) with uvloop and Sanic (<a href="https://github.com/rcarmo/newsfeed-corpus" rel="nofollow">https://github.com/rcarmo/newsfeed-corpus</a>), but I'm going to have a peek at subconscious.
>One of the common complaints people have about python and other popular interpreted languages (Ruby, JavaScript, PHP, Perl, etc) is that they’re slow.<p>Proceeds to show an animation of posting a blog post that performs no faster than if it was built using Django.
> 10k pageviews took ~41s<p>Might be that the server is insanely slow, but I would have no problems reaching 10k page views per second with some basic PHP and even MariaDB on a low end E3-1230 server. Pretty sure more would be quite easy to...
It seems strange that they would claim that Python's libuv based event loop is twice as fast as Node.js's libuv based event loop. There's some context missing to that statement or it's flat out false.