Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable Pause / Resume of Coweb Session #179

Open
Brian-Burns-Bose opened this issue May 16, 2012 · 2 comments
Open

Enable Pause / Resume of Coweb Session #179

Brian-Burns-Bose opened this issue May 16, 2012 · 2 comments
Milestone

Comments

@Brian-Burns-Bose
Copy link
Member

It would be desirable to have the ability to pause and resume a coweb session. A typical usage scenario would be the case where there are n number of coweb sessions in a web app and a user would be cycling through those sessions. It would be easier to pause the session rather than leave and rejoin. This saves on performance and bandwidth hits due to a session join process. For example if a coweb session is used to collaborate on a fairly large document, the late join process may be expensive if that document contains a large amount of data. Rather than leave and rejoin a session, a client could pause the session and resume at a later time. When the client rejoins the session, the client only receives the sync events that have been queued by the server since the pause began.

The Bayeux protocol already supports this when using long polling. The default implementation gives a 30 second timeout window to re-establish a long poll connection once data has been received. While the client and server re-establishes the long poll connection the server is queuing any messages destined for that client. When the connection is re-established the messages are then sent to the client. This part is already implemented for us.

In order to implement pause, coweb would expose a Javascript API for pause / resume. A pause would merely disconnect the long poll connection and resume would re-establish the long poll connection. We could possibly pass a timeout parameter. The timeout would be the max amount of time allowed to resume the session. If the timeout threshold is reached, the client is disconnected from the session.

@bitpshr
Copy link

bitpshr commented May 17, 2012

Note that there is already a collab.pauseSync() & collab.resumeSync() . See #69 .

@Brian-Burns-Bose
Copy link
Member Author

Yes we do have pause and resume sync on the collab level however we want to preserve the browsers limit on XHR requests so we want to break the sessions main XHR connection and take advantage of cometd's interval timeout.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants