Articles Tagged async
Let's talk about i18n, i10n and tornado implementation. This post have a lot of text, but i wanted to describe many things that i faced during realization of i18n in tornado project. The step by step instruction is placed in the second part of this article.
i18n - shorthand from internationalization. It mean the process of multiple languages support in application. It is not the translation itself, but technical part of the ...
To enable celery in new django project i often look in previous ones to refresh in my memory some steps: what settings should be specified, how to launch, how to stop and so on.
Here i want to combine all together in one place.
What we must get as a result
- Add delayed task executing in django project, controlled by celery, to not load current django process. Examples of such tasks: email sending, working with ...
But recently i need to call API from tornado application. Mentioned lib works in synchronous, i.e. blocking mode. For tornado it will be much better to use asynchronous version. Tried to search for existing solution, but can't find it. So i create my async fork, that use tornado's AsyncHTTPClient: https://github.com/st4lk/python-bitcoinrpc-tornado.
Example (print current number of blocks ...
Tornado - async web framework for python. I'll cover shortly pros and cons about tornado and introduce typical web project, that is built on top of it.
By describing pros and cons i mean my own point of view in compare with django.
In tornado core there is a infinite loop called "ioloop", that listen for events. All that happens in one single thread. For example, somebody wants to fetch /home ...