Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# LR
.venv36
.venv3?
*.gif
.DS_Store
_build/
.vscode/

# Byte-compiled / optimized / DLL files
__pycache__/
Expand Down
Binary file added Concurrency-mindmap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
45 changes: 21 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,47 +1,44 @@
# concurrency
Example code for the workshop Modern Concurrency in Python
# Python Concurrency 2017

## Ideas
Example code for the workshop **Modern Concurrency in Python**, first presented at PyBay 2017 in San Francisco.

* Review speakerdeck talks
## Cloning

* Update vaurien tutorial
For faster cloning, get only the latest version of this repo:

* Load UnicodeData into PostgreSQL to demo [aiopg](http://aiopg.readthedocs.io/en/stable/)
$ git clone --depth=1 https://github.com/fluentpython/concurrency.git


## References

* [PEP-492: Coroutines with async and await syntax](https://docs.python.org/3/whatsnew/3.5.html#whatsnew-pep-492)

* [PEP-525: Asynchronous Generators](https://docs.python.org/3/whatsnew/3.6.html#whatsnew36-pep525)

* [PEP 530: Asynchronous Comprehensions](https://docs.python.org/3/whatsnew/3.6.html#pep-530-asynchronous-comprehensions)

### Benchmarking
* [Asynchronous Python for the Complete Beginner](https://speakerdeck.com/pycon2017/miguel-grinberg-asynchronous-python-for-the-complete-beginner) ([example code](
https://gist.github.com/miguelgrinberg/f15bc03471f610cfebeba62438435508) by Miguel Grinberg

#### ab: Apache Bench
* [async/await and asyncio in Python 3.6 and beyond](https://speakerdeck.com/1st1/await-and-asyncio-in-python-3-dot-6-and-beyond) ([video](https://www.youtube.com/watch?v=2ZFFv-wZ8_g)) by Yuri Selivanov

https://www.petefreitag.com/item/689.cfm
* [Unyielding](https://glyph.twistedmatrix.com/2014/02/unyielding.html): a defense of asynchronous programming by Glyph Lefkowitz, creator of Twisted

https://serverfault.com/questions/274252/apache-ab-please-explain-the-output
* [Asynchronous Python and Databases](http://techspot.zzzeek.org/2015/02/15/asynchronous-python-and-databases/) by Mike Bayer ([response](https://emptysqua.re/blog/response-to-asynchronous-python-and-databases/) by A. Jesse Jiryu Davis)

http://infoheap.com/ab-apache-bench-load-testing/ (graphic output)
* [ConcurrentPython](https://github.com/BruceEckel/ConcurrentPython): notes for an upcoming open book by Bruce Eckel


### Configuration notes
## Libraries and frameworks

#### nginx
* asyncio

On Luciano's, Mac, these are the notes output by `brew install nginx`:
* aiohttp

```
Docroot is: /usr/local/var/www
* aio-libs organization on github

The default port has been set in /usr/local/etc/nginx/nginx.conf to 8080 so that
nginx can run without sudo.
* [Sanic](https://github.com/channelcat/sanic)

nginx will load all files in /usr/local/etc/nginx/servers/.
* Curio

To have launchd start nginx now and restart at login:
brew services start nginx
Or, if you don't want/need a background service you can just run:
nginx
```
* Trio
58 changes: 58 additions & 0 deletions attic/NOTES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# concurrency
Example code for the workshop Modern Concurrency in Python

## Ideas

* Review speakerdeck talks

* Update vaurien tutorial

* Load UnicodeData into PostgreSQL to demo [aiopg](http://aiopg.readthedocs.io/en/stable/)

* [PEP-492: Coroutines with async and await syntax](https://docs.python.org/3/whatsnew/3.5.html#whatsnew-pep-492)

* [PEP-525: Asynchronous Generators](https://docs.python.org/3/whatsnew/3.6.html#whatsnew36-pep525)

* [PEP 530: Asynchronous Comprehensions](https://docs.python.org/3/whatsnew/3.6.html#pep-530-asynchronous-comprehensions)

### Benchmarking

#### ab: Apache Bench

https://www.petefreitag.com/item/689.cfm

https://serverfault.com/questions/274252/apache-ab-please-explain-the-output

http://infoheap.com/ab-apache-bench-load-testing/ (graphic output)

concurrency * timetaken * 1000 / done
timetaken * 1000 / done


### Configuration notes

#### nginx

On Luciano's, Mac, these are the notes output by `brew install nginx`:

```
Docroot is: /usr/local/var/www

The default port has been set in /usr/local/etc/nginx/nginx.conf to 8080 so that
nginx can run without sudo.

nginx will load all files in /usr/local/etc/nginx/servers/.

To have launchd start nginx now and restart at login:
brew services start nginx
Or, if you don't want/need a background service you can just run:
nginx
```

## References

https://speakerdeck.com/pycon2017/miguel-grinberg-asynchronous-python-for-the-complete-beginner

https://speakerdeck.com/1st1/await-and-asyncio-in-python-3-dot-6-and-beyond

https://glyph.twistedmatrix.com/2014/02/unyielding.html
2 changes: 0 additions & 2 deletions countries/.flake8

This file was deleted.

Loading