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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T16:33:40+00:00 2026-06-09T16:33:40+00:00

I am trying to use PubNub to set up a system for pushing simple

  • 0

I am trying to use PubNub to set up a system for pushing simple real time messages from my web server to clients. I am running Django on Heroku.

In particular, I’m interested how to establish a channel between the server and the client, which this requires sharing a unique channel id between the two.

Our website is a type of social networking site — lots of users will be logged in at once. We just want a way to update their interface when they get something like a new message or friend request, without requiring a refresh.

I have an idea of what to do, but I thought there might be some best practices I’m not aware of, so I wanted to get some feedback.

  1. At login, the client posts to an API endpoint
  2. The handler function for this POST checks to see if there is already a channel id record in the database for this user.
  3. If so, it updates the record with a new channel id (which is a UUID). If not, it creates a new record with this user’s id and a channel id.
  4. Return the channel id to the user.
  5. On logout, this record is deleted.

Technically, I am worried this violates REST principles. The single call to the API end point functions both to create data server side, like a POST, and return data to the client, like a GET.

I’d appreciate any thoughts on relevant best practices. Thanks!

  • 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-09T16:33:42+00:00Added an answer on June 9, 2026 at 4:33 pm

    It sounds like you’d benefit from using Pusher. They are more or less the defacto hosted websockets provider that lets you have clients subscribe (through their browser with sockets) to Pusher, listening on various channels. You then send simple API calls to Pusher, which broadcasts it to all the connected clients.

    This is the best way to handle realtime updates to many clients logged in at once, without doing polling via AJAX, or rolling your own websockets stuff.

    I highly recommend giving pusher a look. (As a note, their free tier is extremely generous.)

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

Sidebar

Related Questions

I'm trying to use NServiceBus to send messages from a console process (very similar
Looking in to using PubNub to send real-time updates to the user's web browser.
I was trying use a set of filter functions to run the appropriate routine,
I'm trying use self-signed certificate (c#): X509Certificate2 cert = new X509Certificate2( Server.MapPath(~/App_Data/myhost.pfx), pass); on
I'm trying use mod_rewrite to rewrite URLs from the following: http://www.site.com/one-two-file.php to http://www.site.com/one/two/file.php The
trying to use hibernate with my web app and getting following exception: Initial SessionFactory
Trying to use Powershell to script the removal of specific custom errors from an
I'm trying use Lift and CalendarMonthView widget to build a appointment system. CalendarMonthView works
I am trying use std::copy to copy from two different iterator. But during course
I'm trying use to selenium with firefox on CentOS from command line like this:

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.