Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8497847
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T00:14:30+00:00 2026-06-11T00:14:30+00:00

i was hoping tornado support for asynchronous sql database opertion ,after i read the

  • 0

i was hoping tornado support for asynchronous sql database opertion ,after i read the source code,

http://www.tornadoweb.org/documentation/_modules/tornado/database.html#Connection

sigh,they are blocking version.here’s some choice .

Plan A: find a set of api similar to mysqldb module except they use callback to return the reuslt.sorry i didn’t find one that show examples that’s their api can handle non-blocking mysql operation

Plan B: use the block version .i heard the writer of tornado suggest developers use block version,and extremely optimize your sql query for shorten the blocking period.

in my case: the server need to handle receive 2k request per second in peak hour and most of them need query and update from database ,suggest every operation take 10ms,10ms*2k over 20s ,that would be a nightmare.in multi thread programming at least i can make more connections for more average response time.

maybe i missed some point here,i have not much experience for backend development.however i still think using blocking io api is a suck idea while the framework is non-blocking.

Plan C: drop MySql use mongoDB, i heard mongoDB has an asynchronous Python implement api named asyncmongo, but im not sure the risk to learn mongoDB and take mongoDB as our business choice

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T00:14:32+00:00Added an answer on June 11, 2026 at 12:14 am

    Another option is to setup Multiprocessing ( http://docs.python.org/library/multiprocessing.html?highlight=multiprocessing#multiprocessing ) and use on of the processes as a Queue manager for the DB.

    Combine Multiprocessing with efficient SQL queries and you should minimize your overall impact. The blocking calls will only be done on the DB Processing Queue Manager process and the rest of the application can run without being blocked. The only people affected are the ones attempting to run a DB query at the same time.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

hoping to get some help here. I have locations on a database that I
Hoping for some help after reading into MVC routing and not coming up with
Hoping someone can help me design this correctly. In my TCP code, I have
Hoping this is trivial for a SQL-Ninja... Been trying to get the following query
hoping someone has experience with both sql server and postgresql. Between the two db's,
Hoping someone has an idea on how to use a type from my linq-to-sql
Hoping I am just missing something simple here: $sql = Select * FROM user_info,
Hoping you can help me with the code below, when a user logs into
Hoping for a quick answer here. OK, since I do a lot of single
Hoping this is just a case of syntax. I'm writing a custom search function

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.