📜 ⬆️ ⬇️

Python Meetup: November Meeting

image

At the end of November, a regular meeting of Python Meetup took place in Minsk. Four interesting reports on near-python themes, authoritative speakers. By the way, for the first time a speaker from outside Belarus came to us - it was Andrei Vlasovskiy, an experienced speaker from JetBrains company.

In November, we looked at optional typing in Python, asynchronous distributed task execution, an introduction to GIL and a new GIL, and the use of gevent to emulate a high load.
Video of all reports, as well as links to presentations, can be found under the cut.

1. Introduction to GIL and the new GIL , Andrew Nekhaychik gnomeby , Wargaming.net | COOO "Game Stream"

')
- Trends, differences from streams.
- How to use threads.
- Performance testing (and bummer).
- Introducing GIL, how it works.
- I / O exemption, 100 ticks.
- Why do I need GIL.
- Problems switching threads (slow capture).
- Problem 100 ticks.
- The problem of lack of priorities and their types.
- New GIL, 5 milliseconds, drop_request.
- When drop_request is not working.
- Competition CPU and I / O threads.
- How to combat GIL: theses on numpy, jython, multiprocessing.

2. Optional typing in Python , Andrey Vlasovskiy, JetBrains


With the advent of new libraries and dialects for typing Python revived
discussion of the need and ways to introduce optional types in Python. The report describes the current state of this area, including JetBrains initiatives.

3. Using gevent to emulate high load , Alexander Kolesen, SiliconMint


Mandatory action before the release of a more or less serious project - performance testing. On high-load projects, you need to know exactly what load they can withstand, and in advance. Therefore, we need a way to emulate high competitiveness, it is desirable that in theory it allows the channel to be fully loaded with traffic. In addition, it would be nice that it did not need to use several dozen servers. The report talks about the experience of using gevent for a similar task, which allows you to do with one t1.micro instance from which you are testing.

4. Asynchronous distributed task execution. Stdlib, Celery, RQ and own bikes , Roman Imankulov, doist.io


When it is necessary to force a web application to do hard work without degrading the user experience, or if you need to quickly assemble a cluster on your knee, there is a need for distributed execution of command queues. The report examined the options for organizing such queues with improvised means, found out why Celery is so good, if it has worthy alternatives, and how to write a working queue manager in thirty lines of code.

Source: https://habr.com/ru/post/206256/


All Articles