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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T21:53:01+00:00 2026-05-20T21:53:01+00:00

I currently have a very simple web application written in Django, and I would

  • 0

I currently have a very simple web application written in Django, and I would like to implement something like a callback/push notification service in my application.

For example:
When one user(client) uploads a photo to the server, the server notifies all other connected users about that photo.

I suppose I can use Django signals to produce a callback when a user uploads a photo, but how do I get Django to post a notification to the other users? This notification could either be alerts or simply redirecting the other users to a new html that displays the uploaded picture. I would prefer the latter.

I am a beginner in web programming, so I am not sure if this fits the bill as needing a ‘real-time web application’ that implements things like comet or long-polling. My application is similar to that of a chat application, except that I am not submitting text files but image files. Because of that I thought comet solutions would work. I have tried looking at Orbited and Twisted for a very long time now but had no luck in implementing it with Django, probably because I do not understand how to accomplish what I want with comet solutions. I would like the more experienced programmers to point to me what is it exactly that I need in order to accomplish this, or if I am heading into the right direction or not (with comet).

I would really appreciate it if someone could give me some tips and hints as to how to proceed, as well as tutorial links or guides.

  • 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-05-20T21:53:02+00:00Added an answer on May 20, 2026 at 9:53 pm

    HTTP is inherently a “pull” protocol–i.e., a client pulls data from a server, waits around for a while and then pulls more data later. There’s actually no strictly HTTP way to “push” data to a client from a server.

    You have basically three options when you need to “push” to a client.

    (1) Do polling–use Ajax/javascript to poll the server every X amount of time. The smaller the X the more it “feels like” a push, but also the more overhead your server experiences having to constantly respond to these requests.

    (2) Use websockets. Part of the HTML5 spec is something called websockets. Websockets allows a browser to open up a persistent connection to a server. Once this connetion has been opened data can be pushed back and forth from client to server and server to client just like with more traditional TCP sockets. The trouble with websockets (last I heard) was that they can still be a bit temperamental between browsers, and of course wont work at all in older browsers.

    (3) Use Flash with a Javascript interface. Flash has the capability of setting up persistent TCP connections, which can be used to push/pull data just like with a ‘normal’ TCP connection. (See this SO question as well: HTTP push examples in Flex)


    If you were starting this project from scratch I would recommend you write your backend in Node.js with Socket.io. Socket.io is “socket-like” framework that you can program to and then the Javascript client (which runs in your webbrowser) intelligently determines the best “persistent connection” to use–first it tries to use Websockets, then Flash, then long polling of various types.


    But since you’ve said you want to use Python/Django then you should check out Django-Websockets–a framework for using websockets with Django. But be sure to read the Disclaimer the author puts on the page, there are some significant difficulties/limitations associated with using it, primarily because Django wasn’t designed with websockets in mind.

    I think your best bet will end up being using Websockets with an intelligent fallback to Ajax Polling when the user’s browser doesn’t support it.

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

Sidebar

Related Questions

I have a PHP based web application which is currently only using one webserver
I have a very simple Java application which downloads a set of foreign exchanges
I have a very large app, 1.5 million lines of C++, which is currently
Currently in our enterprise we have a situation that i think it's not very
I currently have an MS Access application that connects to a PostgreSQL database via
I currently have heavily multi-threaded server application, and I'm shopping around for a good
We currently have code like this: Dim xDoc = XDocument.Load(myXMLFilePath) The only way we
I have a simple task. I have an existing project with a web service
We currently facing some stability issues with our develop web application product. This product
I am currently working on an advanced web application that contains a number of

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.