futursolo / furtherland

A Light-weight Blog Platform, running on Futures Field.
https://www.futures.moe
Apache License 2.0
36 stars 3 forks source link

Use asyncio and aiohttp instead of tornado ioloop and tornado. #44

Open futursolo opened 9 years ago

futursolo commented 9 years ago

It is clear that, the new, official and scalable asyncio is the future of Python asynchronous actions.

It provides a unified event loop, standard concurrent.futures and supports for incoming native coroutines in Python 3.5 and more.

Increasingly apps and libraries are going to support asyncio and choose asyncio as their recommended event loop, not the tornado ioloop.

Any app or library that needs asynchronous features but does not support asyncio will fall into disuse.

The list of asynchronous features and libraries that I use:

Currently, the most and the only difficulty is that Motor does not support asyncio.

I plan to use the list below of features and libraries to instead the one above:

Currently, I need the Tornado to Translate tornado.concurrent.Future into concurrent.futures.Future, so Tornado will be reserved in the requirements list until Motor supports the Asyncio(It is on the roadmap of Motor). I will also be happy to switch to asyncio_mongo if they start to use MongoClient and support MongoDB 3.0 WiredTiger engine.

futursolo commented 9 years ago

I have to admit that this may be an aggressive change for 「FurtherLand」, but I suppose that, like the PSF bravely broke the compatibility of Python2 when released Python3.0, 「FurtherLand」also needs a breakthrough, a great breakthrough. And I think here it is.

futursolo commented 9 years ago

Python 3.5 Released.

Just waiting for Motor 0.5.

futursolo commented 8 years ago

Motor 0.5 released.

Since the design pattern of aiohttp is difficult to practice in FurtherLand, I wrote another framework as instead.

I will use FutureFinity and asyncio completely replace tornado.web and tornado.ioloop.

https://finity.futures.moe/

https://docs.python.org/3/library/asyncio.html