Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <h2>Generic Solution</h2> <p>As you are using a Comet server, make the client flag as "seen" each event it receives.</p> <h2>Problem</h2> <p>If each client needs to respond to each notification, the traffic to your server may increase significantly. So, your server performance and network might get affected.</p> <p>Other things, as event ordering might be considered for your solution.</p> <h2>Solving the problem</h2> <p>The solution you have to adopt will depend on how critical is for your application the awareness of such events. If the client is able to work as expected even missing some of those events, consider a more relaxed solution.</p> <ol> <li>Answer each event instantly</li> </ol> <p>Whenever you receive an event from the server, ask server to flag it as "seen". If the server has events sent and not flagged as seen, make sure to resend them to the client. Becareful not to process the same event more than one time (on client-side) due to network latency (when your server sends the same event a second time before receiving the acknoledgement the first has arrived).</p> <ol> <li>Relaxed approach</li> </ol> <p>When your client receives an event, storage it as the "last event received". Whenever your client reconnects, ask server to send again those missed events since the last you have stored. If you lose track of which one was the "last event received", make sure your server retransmission starts from a point which will make sense for your client</p> <hr> <p>These ideas might be implemented using a queue on the Comet server, but be sure to implement it correctly. If the order of those events are important, you must assure it on your implementation. Be sure not to create giant queues or indefinetly many of them. Consider other aspects too.</p> <p>Hope I helped.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload