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 9112619
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T03:46:42+00:00 2026-06-17T03:46:42+00:00

Original problem I want to run queries on database from within Twisted async app.

  • 0

Original problem

I want to run queries on database from within Twisted async app. In example to add new record, update something or just get some data.

My proposal

I think about making special views in django that only Twisted app can access, which will do all sort of operations on database I need.

In example url domain.com/server/getuserdata/{{ user_id }}/ would return data about user in some convenient format (json).

GET/POST request would be deffered in Twisted so it won’t block my Twisted app (correct me if I’m wrong).

My Twisted app would only run those requests once in a while. It’s not realtime updating data. Realtime data will be stored in Redis and once I’m ready to store it Django database I run request to Django using data stored in redis.

But still there can be lot of requests from server per second (lets say from 100 to 1000).

Another approaches I read about

  • twisted nadbapi, but it’s not updated since 2007 so I dont want to use it honestly
  • storing requestes in Redis and run them by another deamon/app or cron.

Questions

  • Is using deffered objects for GET/POST requests to Django a good approach?
  • Can I somehow tell Django that Twisted app is trusted, so it won’t treat it like a DDOS?
  • Will this be fast enough with so many requests (using cache of course)?
  • Is there any better approach of this task?

I’m new to Twisted and intergrating async app with sync app, so I’m sorry if I typed something stupid

  • 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-17T03:46:44+00:00Added an answer on June 17, 2026 at 3:46 am

    Is using deffered objects for GET/POST requests to Django a good
    approach?

    I wish i had the experience to answer this one in depth. I believe that as long as the request is asynchronous you are going to be fine on the twisted side. I am basing this on my basic experirience with tornado. It is relativly common for an app to have to request a webservice and tornado provides an async way of doing this built in to the framework.

    Can I somehow tell Django that Twisted app is trusted, so it won’t
    treat it like a DDOS?

    I don’t think django inherently knows what service is requesting it. It doesn’t throttle speed or requests out of the box. It just responds to whatever requests are made to it. If these are more requests that it can handle it will crash. HOw many request django can handle is variant on your project and how you deploy it. You could run it using gunicorn easily and have nginx sit in front of it. If it is not performing as it shoudl you can start another gunicorn instance.

    Will this be fast enough with so many requests (using cache of
    course)?

    I don’t think anyone can say. YOu might have to benchmark it yourself. There are a number of blog posts/articles that benchmark various django server configurations.

    Is there any better approach of this task?

    I think this is a relatively common approach. Expose your methods via django through a RESTful interface. Make async reqeusts from twisted.

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

Sidebar

Related Questions

Original Problem In building our projects, I want the mercurial id of each repository
I run a project on sourceforge called mqmanager.NET that I inherited from the original
we are installing RPM to a new system and want to run all the
So here's the situation. I want to add 'old' news from our previous website
1) I have problem when i want to make url Xdebug run on Zend
I'm fairly new to RequireJS and I've run into a bit of a problem.
I want to run some code before an object is removed from a has_many
So the original problem is that we run an industry standard java based web
I redefined a built-in command in gdb, for example run, I want to do
Original Problem: I have 3 boxes each containing 200 coins, given that there is

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.