Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

128
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda