summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGoogle Code Exporter <GoogleCodeExporter@users.noreply.github.com>2015-04-10 12:44:27 -0400
committerGoogle Code Exporter <GoogleCodeExporter@users.noreply.github.com>2015-04-10 12:44:27 -0400
commitc28372755c1bdbf814ec950c64ffa1d64edfcae2 (patch)
treea9ed0d230106fd58eaeedf8a4d6ef20c2f2e85b8
downloadtrollius-git-wiki.tar.gz
Migrating wiki contents from Google Codewiki
-rw-r--r--Benchmarks.md12
-rw-r--r--Contributing.md19
-rw-r--r--ProjectHome.md41
-rw-r--r--ThirdParty.md100
4 files changed, 172 insertions, 0 deletions
diff --git a/Benchmarks.md b/Benchmarks.md
new file mode 100644
index 0000000..0a81098
--- /dev/null
+++ b/Benchmarks.md
@@ -0,0 +1,12 @@
+# asyncio benchmarks #
+
+ * [Macro-benchmark with Django, Flask and AsyncIO (aiohttp.web+API-Hour)](http://blog.gmludo.eu/2015/02/macro-benchmark-with-django-flask-and-asyncio.html): Ludovic Gasc, 25 February 2015
+ * [bigdata](https://bitbucket.org/zzzeek/bigdata/) (created: 2015-02-16): INSERT queries to a PostgreSQL server, asyncio vs gevent vs threads; article: [Asynchronous Python and Databases](http://techspot.zzzeek.org/2015/02/15/asynchronous-python-and-databases/) (Mike Bayer, 2015-02-15)
+ * [API Hour](https://github.com/Eyepea/API-Hour/): Flask, PostgreSQL (aiopg), asyncio, JSON
+ * [asyncio-redis/examples/benchmarks/ directory](https://github.com/jonathanslenders/asyncio-redis/blob/master/examples/benchmarks/); see [redis: benchmark gevent vs asyncio on python3.4](https://gist.github.com/yihuang/eb0a670c9fab188c6e3e)
+ * [aiohttp: benchmark/async.py](https://github.com/KeepSafe/aiohttp/blob/master/benchmark/async.py)
+ * [irc3: examples/benches.py](https://github.com/gawel/irc3/blob/master/examples/benches.py)
+
+Trollius:
+
+ * [Tobias Oberstein tweeted](https://twitter.com/oberstet/status/550741713762136064): "unbelievable: #PyPy doing 90k reqs/sec on netperf TCP\_RR at 50% CPU on _one_ core over 10GbE! https://github.com/oberstet/scratchbox/blob/master/python/asyncio/tcp_echo_server.py" (Trollius works on PyPy, but asyncio doesn't work on PyPy yet) \ No newline at end of file
diff --git a/Contributing.md b/Contributing.md
new file mode 100644
index 0000000..d730fd5
--- /dev/null
+++ b/Contributing.md
@@ -0,0 +1,19 @@
+There are two items here: how to submit your patch for review (known as "pull requests" in the git world), and the red tape necessary before your first patch is accepted.
+
+# Submitting patches #
+
+The preferred way to submit patches for review is to use Rietveld (https://codereview.appspot.com/). You need a Google Account in order to use this; it will send email responses to the email address associated with your account (not necessarily a GMail address).
+
+You also need a Mercurial checkout of the Tulip project -- see the Source tab above. (Yes, you may have to install Mercurial. It's shaving yaks all the way down. :-)
+
+To get started with your first code review, download the upload.py script from https://codereview.appspot.com/static/upload.py and install it in your personal 'bin' directory (or somewhere else along your shell's $PATH).
+
+Instructions on how to use upload.py are at http://code.google.com/p/rietveld/wiki/UploadPyUsage. In my own workflow, I don't usually commit patches to my local repo while they're being reviewed; the script is optimized for this case, and I basically just have to type "upload.py" in my working directory.
+
+It's important to get the tool to send email to a reviewer. The easiest way to do this is to use the --reviewers and --send\_mail options on the upload.py script. You can also go to the URL printed by the script and click on the "Publish+Mail Comments" link; then enter the reviewer's email address and click "Publish all my drafts" (never mind that you probably don't have any drafts comments).
+
+Who to send reviews to? You can use the python-tulip mailing list or send them to Guido. (The email addresses are not in this wiki to deter spammers.)
+
+# Red Tape #
+
+Python and Tulip are open source, and that brings along a small amount of red tape. Before we can accept contributions you must agree to the Python Software Foundation's Contributor Agreement: http://www.python.org/psf/contrib/contrib-form/. Fortunately signing it once covers all your current and future contributions to Python and Tulip (and any other software covered by the PSF license). Do beware that if your contribution was created on your employer's behalf the rules are different, and your manager has to sign. \ No newline at end of file
diff --git a/ProjectHome.md b/ProjectHome.md
new file mode 100644
index 0000000..3290a76
--- /dev/null
+++ b/ProjectHome.md
@@ -0,0 +1,41 @@
+The Tulip project is the [asyncio module](https://docs.python.org/dev/library/asyncio.html) for Python 3.3. Since Python 3.4, asyncio is now part of the standard library.
+
+Help:
+
+ * [asyncio documentation](https://docs.python.org/dev/library/asyncio.html)
+ * [asyncio examples](https://code.google.com/p/tulip/source/browse/#hg%2Fexamples)
+ * Mailing list: [python-tulip Google Group](https://groups.google.com/forum/?fromgroups#!forum/python-tulip)
+ * IRC: `#asyncio` channel on the [Freenode network](https://freenode.net/)
+
+Pages:
+
+ * [Contributing](Contributing.md): To contribute.
+ * [ThirdParty](ThirdParty.md): A list of 3rd party integrations with asyncio.
+ * [Benchmarks](Benchmarks.md): asyncio benchmarks
+
+The asyncio module provides infrastructure for writing single-threaded concurrent code using coroutines, multiplexing I/O access over sockets and other resources, running network clients and servers, and other related primitives. Here is a more detailed list of the package contents:
+
+ * a pluggable event loop with various system-specific implementations;
+ * transport and protocol abstractions (similar to those in [Twisted](https://twistedmatrix.com/trac/));
+ * concrete support for TCP, UDP, SSL, subprocess pipes, delayed calls, and others (some may be system-dependent);
+ * a Future class that mimics the one in the concurrent.futures module, but adapted for use with the event loop;
+ * coroutines and tasks based on ```yield from``` (PEP 380), to help write concurrent code in a sequential fashion;
+ * cancellation support for Futures and coroutines;
+ * synchronization primitives for use between coroutines in a single thread, mimicking those in the threading module;
+ * an interface for passing work off to a threadpool, for times when you absolutely, positively have to use a library that makes blocking I/O calls.
+
+Hello World using an asyncio coroutine:
+
+```
+import asyncio
+
+@asyncio.coroutine
+def hello_world():
+ print("Hello World!")
+
+loop = asyncio.get_event_loop()
+loop.run_until_complete(hello_world())
+loop.close()
+```
+
+For asyncion on Python 2, see the [trollius project](http://trollius.readthedocs.org/). \ No newline at end of file
diff --git a/ThirdParty.md b/ThirdParty.md
new file mode 100644
index 0000000..57b22ef
--- /dev/null
+++ b/ThirdParty.md
@@ -0,0 +1,100 @@
+See also [asyncio.org](http://asyncio.org/) (asyncio resources) and [Trollius](http://trollius.readthedocs.org/) (port of asyncio to Python 2).
+
+# Libraries #
+
+ * [aiofiles](https://github.com/Tinche/aiofiles/): File support for asyncio
+ * [aiohttp](https://github.com/KeepSafe/aiohttp): http client and server infrastructure for asyncio
+ * [aiodns](https://pypi.python.org/pypi/aiodns): Async DNS resolver
+ * [aiorwlock](https://pypi.python.org/pypi/aiorwlock): Read write lock for asyncio.
+ * [aioutils](https://pypi.python.org/pypi/aioutils): Python3 Asyncio Utils, Group (like gevent.pool.Group), Pool (like event.poo.Pool), Bag and OrderedBag.
+ * [tasklocals](https://github.com/vkryachko/tasklocals): Task-local variables
+
+# Clients #
+
+ * Asterisk: [panoramisk](https://panoramisk.readthedocs.org/), a library based on python’s asyncio to play with asterisk‘s manager
+ * ElasticSearch: [aioes](http://aioes.readthedocs.org/), client library
+ * IRC: [irc3](https://irc3.readthedocs.org/), plugable irc client library based on python's asyncio
+ * IRC: [bottom](https://github.com/numberoverzero/bottom), asyncio-based rfc2812-compliant IRC Client
+ * XMPP (Jabber): [slixmpp](http://git.poez.io/slixmpp), SleekXMPP (XMPP Library) fork using asyncio, for poezio
+
+# Databases #
+
+SQL drivers:
+
+ * MySQL: [aiomysql](https://github.com/aio-libs/aiomysql), MySQL driver
+ * PostgreSQL: [aiopg](http://aiopg.readthedocs.org/), PostgreSQL client library built on top of psycopg2
+
+NoSQL and key-value store drivers:
+
+ * CouchDB: [aiocouchdb](http://aiocouchdb.readthedocs.org), CouchDB client
+ * memcached: [aiomemcache](https://github.com/fafhrd91/aiomemcache), minimal memcached client
+ * MongoDB: [asyncio-mongo](https://bitbucket.org/mrdon/asyncio-mongo), MongoDB driver (ported from Twisted)
+ * redis: [asyncio-redis](http://asyncio-redis.readthedocs.org/), Redis client
+ * redis: [aioredis](http://aioredis.readthedocs.org/), Yet another Redis client
+
+ORM:
+
+ * [peewee](https://peewee.readthedocs.org/): [peewee-async](http://peewee-async.readthedocs.org/en/latest/), library providing asynchronous interface powered by asyncio for peewee ORM.
+
+# Web frameworks #
+
+ * [aiopyramid](https://pypi.python.org/pypi/aiopyramid): Tools for running [pyramid](https://pypi.python.org/pypi/pyramid) using asyncio.
+ * [aiowsgi](https://github.com/gawel/aiowsgi): minimalist wsgi server using asyncio
+ * [API hour](https://pypi.python.org/pypi/api_hour): Write efficient network daemons (HTTP, SSH, ...) with ease.
+ * [AutobahnPython](https://github.com/tavendo/AutobahnPython): WebSocket and WAMP framework
+ * [interest](https://pypi.python.org/pypi/interest): event-driven web framework on top of aiohttp/asyncio.
+ * [muffin](https://github.com/klen/muffin): A web framework based on Asyncio stack (early alpha)
+ * [nacho](https://github.com/avelino/nacho): web framework
+ * [Pulsar](http://pythonhosted.org/pulsar/): Event driven concurrent framework for python. With pulsar you can write asynchronous servers performing one or several activities in different threads and/or processes.
+ * [rainfall](https://github.com/mind1master/rainfall): another web framework
+ * [Vase](https://github.com/vkryachko/Vase): web framework
+ * [websockets](https://github.com/aaugustin/websockets): Websockets library
+ * [WebSocket-for-Python](https://github.com/Lawouach/WebSocket-for-Python): another websocket library
+
+Looking for WSGI? Read this thread: [WSGI implementation compatible with asyncio?](https://groups.google.com/forum/#!topic/python-tulip/Gs3bZ2AbS9o).
+
+# Integration with other application libraries #
+
+ * [aioamqp](https://github.com/dzen/aioamqp): AMQP implementation using asyncio
+ * gunicorn: gunicorn has gaiohttp worker built on top of aiohttp library
+
+# Run asyncio on top of #
+
+ * eventlet: [aiogreen](http://aiogreen.readthedocs.org/), asyncio API implemented on top of eventlet
+ * gevent: [aiogevent](https://pypi.python.org/pypi/aiogevent), asyncio API implemented on top of gevent
+
+# Adapters for other event loops #
+
+Some people have already written adapters for integrating asyncio with other async I/O frameworks.
+
+ * [eventlet](http://eventlet.net/): [greenio](https://github.com/1st1/greenio), Greenlets support for asyncio (PEP 3156)
+ * [gevent](http://www.gevent.org/): [tulipcore](https://github.com/decentfox/tulipcore), run gevent code on top of asyncio, alternative gevent core loop
+ * GLib: [gbulb](https://bitbucket.org/a_ba/gbulb), event loop based on GLib
+ * [libuv](https://github.com/libuv/libuv): [aiouv](https://github.com/saghul/aiouv), an event loop implementation for asyncio based on [pyuv](https://pyuv.readthedocs.org/)
+ * Qt: [Quamash](https://github.com/harvimt/quamash), implementation of the PEP 3156 Event-Loop with Qt.
+ * [Tornado](https://github.com/facebook/tornado) has [experimental asyncio support](https://groups.google.com/forum/#!topic/python-tulip/hg0HzhoPuFE) built right into it.
+ * [ZeroMQ](http://zeromq.org/): [aiozmq](http://aiozmq.readthedocs.org/), ZeroMQ integration with asyncio
+ * [ZeroMQ](http://zeromq.org/): [Zantedeschia](https://github.com/takluyver/Zantedeschia), experimental alternative integration between asyncio and ZeroMQ sockets.
+
+# Misc #
+
+ * [aiocron](https://github.com/gawel/aiocron/): Crontabs for asyncio
+ * [aiomas](http://stefan.sofa-rockers.org/2015/02/13/aiomas/): A library for multi-agent systems and RPC based on asyncio
+ * [aiotest](https://bitbucket.org/haypo/aiotest/): test suite to validate an implementation of the asyncio API
+ * [aioprocessing](https://github.com/dano/aioprocessing): A Python 3.3+ library that integrates the multiprocessing module with asyncio
+ * [blender-asyncio](https://github.com/akloster/blender-asyncio): Asyncio Bridge for Blender Python API
+ * [ipython-yf](https://github.com/tecki/ipython-yf): An ipython extension to make it asyncio compatible
+ * [aiogearman](https://github.com/jettify/aiogearman): asyncio [gearman](http://gearman.org/) support. Gearman provides a generic application framework to farm out work to other machines or processes that are better suited to do the work.
+ * Serial port using the serial module, see [using serial port in python3 asyncio](https://stackoverflow.com/questions/21666106/using-serial-port-in-python3-asyncio) at Stackoverflow, serial.Serial can be registered with loop.add\_reader().
+
+# Filesystem #
+
+asyncio does **not** support asynchronous operations on the filesystem. Even if files are opened with O\_NONBLOCK, read and write will block.
+
+Read [asynchronous disk I/O](http://blog.libtorrent.org/2012/10/asynchronous-disk-io/) (October 2012 by arvid).
+
+The Linux kernel provides asynchronous operations on the filesystem (aio), but it requires a library and it doesn't scale with many concurrent operations. See [aio](http://lse.sourceforge.net/io/aio.html).
+
+The GNU C library (glibc) implements the POSIX aio interface, but it is implemented with threads. See [aio(7) manual page](http://man7.org/linux/man-pages/man7/aio.7.html).
+
+Recent discussion on the Linux Kernel: [Non-blocking buffered file read operations](http://lwn.net/Articles/612483/) (September 2014). \ No newline at end of file