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

Intermittent long poll maintains connection but is not receiving all server messages #733

Open
aquacode opened this Issue Jul 21, 2017 · 3 comments

Comments

Projects
None yet
2 participants
@aquacode

aquacode commented Jul 21, 2017

Scenario 1:
Using JavaScript library, the client establishes cometd handshake and proceeds to long poll to keep client and server connected. The client receives all expected data over the long poll connection upon subscribing and publishing to various channels.

Scenario 2:
Using a different library in which the long poll is programmatically handled, the client establishes the cometd handshake and proceeds to long poll, but sends the long poll request at random times, albeit, within the required time frame to maintain connection to the server. The client appears to not receive all expected data over the long poll requests/responses upon subscribing and publishing to various channels.

Is there any potential for loss of data/messages from the server for clients that don't long poll in exactly the manner implemented in the JavaScript library? Are there configuration settings that might cause data to get lost after a certain amount of time if there isn't a long poll connection available on which to publish available messages/data?

@sbordet

This comment has been minimized.

Show comment
Hide comment
@sbordet

sbordet Jul 23, 2017

Member

@aquacode you need to be more precise on what the different library is doing. Sending random /meta/connect to the server is not going to fly. Please provide a precise explanation of what the library is doing, debug logs and possibly a network trace.

BTW, why you need to use another library ?

Member

sbordet commented Jul 23, 2017

@aquacode you need to be more precise on what the different library is doing. Sending random /meta/connect to the server is not going to fly. Please provide a precise explanation of what the library is doing, debug logs and possibly a network trace.

BTW, why you need to use another library ?

@aquacode

This comment has been minimized.

Show comment
Hide comment
@aquacode

aquacode Jul 24, 2017

Why are random /meta/connects not going to fly if they are sent before the timeout on server and client? The question is, does the server drop messages or data for the client ever if an open connection is not available within a certain amount of time?

aquacode commented Jul 24, 2017

Why are random /meta/connects not going to fly if they are sent before the timeout on server and client? The question is, does the server drop messages or data for the client ever if an open connection is not available within a certain amount of time?

@sbordet

This comment has been minimized.

Show comment
Hide comment
@sbordet

sbordet Jul 24, 2017

Member

The server may write data to a connection that the client considers gone, so in this case data can be lost.

To cope with this scenario, CometD uses the Message Acknowledgment Extension.

The server has a protection mechanism so that if it does not see a client heartbeat within maxInterval it expires the session.

As I said, you have not explained how this other library exactly works, so it's difficult to say anything about what woks and what does not.

Member

sbordet commented Jul 24, 2017

The server may write data to a connection that the client considers gone, so in this case data can be lost.

To cope with this scenario, CometD uses the Message Acknowledgment Extension.

The server has a protection mechanism so that if it does not see a client heartbeat within maxInterval it expires the session.

As I said, you have not explained how this other library exactly works, so it's difficult to say anything about what woks and what does not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment