End of journey

Well, it started as a small test and POC aiming to prove that I could be faster than PHP (it is, to be sure, a great language and I used PHP 4 and5 for some time many years ago). But then this benchmark turned out to be somewhat of an overkill.

“Happiness for everybody, free, and no one will go away unsatisfied” — Arkady Strugatsky, Roadside Picnic

The source code of this benchmark can be found at Github - python-tarantool-benchmark-and-bootstrap.

To install and run the benchmark, follow the instructions in install.md.

Final thoughts

  • Python 3.6 is 10–20% faster than Python 3.5 . I think it’s a great result for the entire Python community and the team of maintainers.
  • With coroutines and async syntax, Python gets a huge performance boost just in time.
  • New web frameworks take us to a new level of performance, at which good old databases would have to try hard to get the same speed as the main application.
  • Tarantool is great: it’s fast like Redis, though you can and even have to use it as a database.

Last quick questions and answers:

Q: Tarantool is in memory. What do you do when you’re out of memory?
A: I could write a Lua function that checks my transaction spaces and cleans them up on the fly. Additionally, I could create archive spaces on the Vinyl engine and save transactional data to disk, or I could use a PostgreSQL driver and write this data to the PostgreSQL DB, or…

Q: What Python web framework do you prefer or would recommend to use?
A: I’d use aiohttp. It’s great. Pure Python. Full-featured web server and client, WebSocket server and client. Everything you expect to work on a web server is working; if not, you just post an issue. Supports HTTP 1.0 and 1.1. Great team of maintainers and a very good community. As you can see from my solution, starting with aiohttp you can easily switch to other web servers.
Sanic is good, but it has the same problem as Flask. Sanic would be a good fit for functionally small projects and a small team. It is fast. Sure enough, I’d rather have an aiohttp port for httptools and get this performance. This is my personal opinion, but you definitely should give Sanic a try. It’ll be worth your time.
Japronto is like magic: you can’t use it without some well-trained magician and it only works in a very specific situation, BUT this is a very good project and it might be the first step to something revolutionary in the future. Looking forward to hearing more news from Japronto.

If you like this stuff, please give your star to:

  • Great guys from Tarantool:

Star Watch

  • Amazing aiohttp team:

Star Watch

  • Wonderful Sanic gang:

Star Watch

  • Japronto magicians:

Star Watch

Rate this article below and dive deeper into the source code at Follow @valentinmk

results matching ""

    No results matching ""