Coder Social home page Coder Social logo

Comments (12)

greut avatar greut commented on June 19, 2024

web.by fires up a thread; I've done it by using an external worker.

from tornado.

lucky avatar lucky commented on June 19, 2024

You probably want subprocess.

from tornado.

 avatar commented on June 19, 2024

or celery

from tornado.

yashh avatar yashh commented on June 19, 2024

The better way to handle this is using a message queue. You push a job onto a queue and a worker picks it up and process it. Check out RabbitMQ, pyres, gearman, bealstalkd etc.

from tornado.

fictorial avatar fictorial commented on June 19, 2024

+1 for yashh

from tornado.

 avatar commented on June 19, 2024

you can find an example at http://brianglass.wordpress.com/2009/11/29/asynchronous-shell-commands-with-tornado/

from tornado.

parente avatar parente commented on June 19, 2024

The multiprocessing package in Python 2.6 std lib works well with Tornado's IO loop.

from tornado.

alexdong avatar alexdong commented on June 19, 2024

I wrote a module for tornado similar to the AsyncHTTPClient just for this purpose.
http://github.com/alexdong/tornado/blob/master/tornado/async_process.py

from tornado.

yashh avatar yashh commented on June 19, 2024

Is there a way to run a set of mysql queries in parallel. Bret Taylor's post on mysql explains that they query all mysql shards in parallel. Can we do this in tornado ?

from tornado.

alexdong avatar alexdong commented on June 19, 2024

Well, you might want to leverage the async_process and pipe the result into tornado.

from tornado.

mark-kubacki avatar mark-kubacki commented on June 19, 2024

Put the data (e.g. filename of the image in question) in a queue Q and process that queue in another process. Python comes already with everything you need:
http://docs.python.org/library/multiprocessing.html

If you want to do that distributed, check out ZeroMQ http://www.zeromq.org

from tornado.

bdarnell avatar bdarnell commented on June 19, 2024

Tornado 3.0 introduced tornado.process.Subprocess: http://www.tornadoweb.org/en/stable/process.html#tornado.process.Subprocess

from tornado.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.