erikras / erikras/react-redux-universal-hot-example

notification based on server side update

Open
#1,209 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
12.1k
Forks
2.5k
PR merge metrics
No merged PRs in 30d

Description

This is not really tied together with this specific boilerplate. But since I started with this popular (and awesome) example, maybe I can get some help here.

In our setup, we have fairly separated backend and frontend. The backend is a pure api server (django + django REST framework), and Frontend communicates to the backend exclusively via api calls (through the api proxy server).

So here is the scenario, a user signs up, frontend calls backend with user info. The backend creates a new user, and returns a signup success msg. Meanwhile, the backend starts fetching data from other web services for this new user, which could take from a few seconds to a few min. We'd like to notify the user once the data fetching is complete.

The boilerplate already has socket.io integrated for realtime communication among different clients. I'm wondering how can I leverage that to implement real time notification based on server side status. Of course in our case, the tricky part is that the backend server is only waiting for requests. Should I have a infinite loop on the frontend api server that keeps querying backend server for update? That sounds like a really bad idea. I'd love to hear different ideas.

Contributor guide

Open the contributing guide

Research direction

No repository file or test is named. Start by reading the existing socket.io integration and the API proxy path, then examine how the Django REST backend reports completion to the frontend. Done would require a decided, documented server-to-client notification flow rather than an open-ended polling discussion.

Written by the indexing model from the issue text.

Assessment

Tech stack
django, express, javascript, react, redux
Domain
api, backend, distributed-systems, frontend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.