You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by GitBox <gi...@apache.org> on 2020/04/13 16:58:42 UTC
[GitHub] [couchdb-documentation] ronag opened a new issue #522: docs:
timeout option for continous feed uncldar
ronag opened a new issue #522: docs: timeout option for continous feed uncldar
URL: https://github.com/apache/couchdb-documentation/issues/522
[The docs for `_changes` mentions that the `timeout` option is valid for the `continuous` feed type.](https://docs.couchdb.org/en/stable/api/database/changes.html#changes-continuous)
However, it is unclear what this actually does:
> As with the longpoll feed type you can set both the timeout and heartbeat intervals to ensure that the connection is kept open for new changes and updates.
Given that there is a `heartbeat` I'm unsure what the purpose is. Is it so that the server can timeout clients which are not consuming the feed fast enough? If so, could we clarify the documentation with more a detailed description of the use case?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [couchdb-documentation] ronag commented on issue #522: docs:
timeout option for continous feed unclear
Posted by GitBox <gi...@apache.org>.
ronag commented on issue #522: docs: timeout option for continous feed unclear
URL: https://github.com/apache/couchdb-documentation/issues/522#issuecomment-613036797
Also, does the timeout apply if heartbeat is used? i.e. is the timeout relative to changes or data?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [couchdb-documentation] ronag commented on issue #522: docs:
timeout option for continous feed unclear
Posted by GitBox <gi...@apache.org>.
ronag commented on issue #522: docs: timeout option for continous feed unclear
URL: https://github.com/apache/couchdb-documentation/issues/522#issuecomment-613079267
> @ronag No timeout if you ask for a heartbeat. I thought that was clear:
Actually, I'm confused twice now :). First I thought this, but after your previously reply I though the opposite. So yea, I guess there is room for improvement.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [couchdb-documentation] ronag edited a comment on issue #522: docs:
timeout option for continous feed unclear
Posted by GitBox <gi...@apache.org>.
ronag edited a comment on issue #522: docs: timeout option for continous feed unclear
URL: https://github.com/apache/couchdb-documentation/issues/522#issuecomment-613036797
Also, does the timeout apply if heartbeat is used? i.e. is the timeout relative to changes or data?
The relationship between timeout and heartbeat might need a little more details.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [couchdb-documentation] wohali commented on issue #522: docs:
timeout option for continous feed uncldar
Posted by GitBox <gi...@apache.org>.
wohali commented on issue #522: docs: timeout option for continous feed uncldar
URL: https://github.com/apache/couchdb-documentation/issues/522#issuecomment-612989767
@ronag Hey, thanks for this question.
`timeout` means "Hold this connection open for `x` ms, and if no change arrives in that time, close the socket."
`heartbeat` means "Send a linefeed every `x` ms if no change arrives. Hold the connection open indefinitely." `heartbeat` overrides `timeout`.
See the query params higher up on that page: https://docs.couchdb.org/en/stable/api/database/changes.html#db-changes
You'd want that setup if you wanted to disconnect during idle periods at the database side, to reduce the # of active connections CouchDB has to maintain. This would be recommended rather than nailing up tens of thousands of continuous change feeds on the client side.
How would you recommend we improve this documentation?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [couchdb-documentation] ronag commented on issue #522: docs:
timeout option for continous feed uncldar
Posted by GitBox <gi...@apache.org>.
ronag commented on issue #522: docs: timeout option for continous feed uncldar
URL: https://github.com/apache/couchdb-documentation/issues/522#issuecomment-613012980
I think the same paragraph that you have for long polling would be appropriate:
> Because the wait for a change can be significant you can set a timeout before the connection is automatically closed (the timeout argument). You can also set a heartbeat interval (using the heartbeat query argument), which sends a newline to keep the connection active.
You might not read the long polling version if you are mostly interested in continuous mode. Also, it becomes ambigious whether that only applies to long polling or not.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [couchdb-documentation] wohali commented on issue #522: docs:
timeout option for continous feed unclear
Posted by GitBox <gi...@apache.org>.
wohali commented on issue #522: docs: timeout option for continous feed unclear
URL: https://github.com/apache/couchdb-documentation/issues/522#issuecomment-613077617
@ronag No timeout if you ask for a heartbeat. I thought that was clear:
> heartbeat (number) – Period in milliseconds after which an empty line is sent in the results. Only applicable for longpoll, continuous, and eventsource feeds. Overrides any timeout to keep the feed alive indefinitely. Default is 60000. May be true to use default value.
A PR would be welcome if you'd like to suggest specific text!
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [couchdb-documentation] ronag edited a comment on issue #522: docs:
timeout option for continous feed unclear
Posted by GitBox <gi...@apache.org>.
ronag edited a comment on issue #522: docs: timeout option for continous feed unclear
URL: https://github.com/apache/couchdb-documentation/issues/522#issuecomment-613079267
> @ronag No timeout if you ask for a heartbeat. I thought that was clear:
Actually, I'm confused twice now :). First I thought this, but after your previously reply I thought the opposite. So yea, I guess there is room for improvement.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services