OiO.lk Community platform!

Oio.lk is an excellent forum for developers, providing a wide range of resources, discussions, and support for those in the developer community. Join oio.lk today to connect with like-minded professionals, share insights, and stay updated on the latest trends and technologies in the development field.
  You need to log in or register to access the solved answers to this problem.
  • You have reached the maximum number of guest views allowed
  • Please register below to remove this limitation

Reliable Message Resending in WebSocket Web App

  • Thread starter Thread starter Mark Igushkin
  • Start date Start date
M

Mark Igushkin

Guest
I am developing a chat web application using WebSocket and faced the problem that WebSocket is unreliable. To improve reliability, I have implemented the following:

  1. Implemented heartbeat messages to maintain the connection.
  2. Added receipt messages from the server to confirm message delivery.

The last feature I would like to implement is saving messages locally on the client if they are not delivered to the server, which allows the user to resend them after the connection is restored. I saw something similar on WhatsApp.

Could you provide advice or best practices for implementing this feature?

What I expected to happen: If a message fails to be delivered, it would be saved locally on the client (in the browser), the user would be notified of the delivery failure, and then would be allowed to resend the message once the connection is restored. This is similar to the behavior seen in WhatsApp.

<p>I am developing a chat web application using WebSocket and faced the problem that WebSocket is unreliable. To improve reliability, I have implemented the following:</p>
<ol>
<li>Implemented heartbeat messages to maintain the connection.</li>
<li>Added receipt messages from the server to confirm message delivery.</li>
</ol>
<p>The last feature I would like to implement is saving messages locally on the client if they are not delivered to the server, which allows the user to resend them after the connection is restored. I saw something similar on WhatsApp.</p>
<p>Could you provide advice or best practices for implementing this feature?</p>
<p><strong>What I expected to happen:</strong>
If a message fails to be delivered, it would be saved locally on the client (in the browser), the user would be notified of the delivery failure, and then would be allowed to resend the message once the connection is restored. This is similar to the behavior seen in WhatsApp.</p>
 

Latest posts

B
Replies
0
Views
1
Blundering Ecologist
B
Top