Synchronize chat with multiple windows / tabs using the AppEngine Channel API

I am developing a chat application on top of the Google AppEngine channel API, and one of the problems is coordinating / synchronizing the chat when working in multiple windows / tabs (in the same browser).

In particular, if a user opens a dialog in a single window / tab and then opens a new window / tab that connects to my website, I would like the same conversation to appear in a new window / tab (this is the functionality that Facebook chat and other websites). I believe that this can be achieved by opening a new channel for each window opened by the user, and let the server ensure that each channel has the most up-to-date conversation data, but I’m worried about the limit (if there is one) limit on the number of channels allowed by the channel API , - and I am also concerned about the effectiveness of this approach.

So my question is: 1) From the point of view of efficiency / effectiveness, does it make sense to open a new channel for each window / tab for one user? 2) Is there any limit to the number of channels that I can open for a single user? 3) Is there a general limit to the number of channels I can open? 4) is there any other more intelligent way to achieve my goals (perhaps using cookies or by sharing data from one channel between several windows / tabs)?

Thanks and kindly Alex

+5
source share
2 answers

, sessionStorage, , !

0

All Articles