Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

127
Views
Problem of disconnect clients on Socket.io

Hi I am going to implement a project list with socket.io where any clients can update it.

For example, let's assume it's in such a format.

list 1
list 2
...
list 10k

A client can add a list say list 2.1, it will be stored to database and broadcast to other clients, and for efficiency we only broadcast list 2.1. The JavaScript program for all clients will insert it to the right position once receiving it, so now the list for all participants become:

list 1
list 2
list 2.1 
...
list 10k

Say now, client A and client B are tentatively disconnected from internet. And list 2.2 and list 2.3 are sent by other clients, and missed by client A and client B. After that client A and client B are then brought back, and received a new list 2.4. Their list become

list 1
list 2
list 2.1 
list 2.4
...
list 10k

which is incorrect (missing list 2.2 and list 2.3). How do we handle such as issue in the frontend or backend code (I am using next.js and node.js)? (One possible solution of course is by retrieving data again from database, but how do we know whether the clients missed any listing?)

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!