You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@couchdb.apache.org by "Benoit Chesneau (JIRA)" <ji...@apache.org> on 2009/07/20 22:36:14 UTC
[jira] Created: (COUCHDB-421) add longpolling for _changes
add longpolling for _changes
----------------------------
Key: COUCHDB-421
URL: https://issues.apache.org/jira/browse/COUCHDB-421
Project: CouchDB
Issue Type: New Feature
Affects Versions: 0.10
Reporter: Benoit Chesneau
Implement longpolling on _changes. Instead of continuous, longpolling hold
request until an update is available then close it. The client will have
to ask a new connection. Should solve problem for XHR's that don't have that status changed (on ie, opera..) .
I've put all the code in my github repo :
http://github.com/benoitc/couchdb/tree/longpoll
diff against trunk is attached.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (COUCHDB-421) add longpolling for _changes
Posted by "Paul Joseph Davis (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/COUCHDB-421?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12733364#action_12733364 ]
Paul Joseph Davis commented on COUCHDB-421:
-------------------------------------------
I'm pretty sure that long poll is the standard name for this pattern. I'd be hesitant to call it something else.
> add longpolling for _changes
> ----------------------------
>
> Key: COUCHDB-421
> URL: https://issues.apache.org/jira/browse/COUCHDB-421
> Project: CouchDB
> Issue Type: New Feature
> Affects Versions: 0.10
> Reporter: Benoit Chesneau
> Attachments: longpoll.diff
>
>
> Implement longpolling on _changes. Instead of continuous, longpolling hold
> request until an update is available then close it. The client will have
> to ask a new connection. Should solve problem for XHR's that don't have that status changed (on ie, opera..) .
> I've put all the code in my github repo :
> http://github.com/benoitc/couchdb/tree/longpoll
> diff against trunk is attached.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (COUCHDB-421) add longpolling for _changes
Posted by "Damien Katz (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/COUCHDB-421?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12733361#action_12733361 ]
Damien Katz commented on COUCHDB-421:
-------------------------------------
Style wise this patch looks good, however you must change the indention tabs to spaces.
I recommend instead of adding the longpolling_changes call in the code, just reuse the keep_sending_changes call, and after the call to send_changes, add a check if EndSeq > StartSeq and the long poll option is on, stop,
Also I'm not sure about calling it "long_poll", but I don't have a better name myself.
> add longpolling for _changes
> ----------------------------
>
> Key: COUCHDB-421
> URL: https://issues.apache.org/jira/browse/COUCHDB-421
> Project: CouchDB
> Issue Type: New Feature
> Affects Versions: 0.10
> Reporter: Benoit Chesneau
> Attachments: longpoll.diff
>
>
> Implement longpolling on _changes. Instead of continuous, longpolling hold
> request until an update is available then close it. The client will have
> to ask a new connection. Should solve problem for XHR's that don't have that status changed (on ie, opera..) .
> I've put all the code in my github repo :
> http://github.com/benoitc/couchdb/tree/longpoll
> diff against trunk is attached.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (COUCHDB-421) add longpolling for _changes
Posted by "Jan Lehnardt (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/COUCHDB-421?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12734043#action_12734043 ]
Jan Lehnardt commented on COUCHDB-421:
--------------------------------------
to me too, if we need any more consensus :)
> add longpolling for _changes
> ----------------------------
>
> Key: COUCHDB-421
> URL: https://issues.apache.org/jira/browse/COUCHDB-421
> Project: CouchDB
> Issue Type: New Feature
> Affects Versions: 0.10
> Reporter: Benoit Chesneau
> Attachments: longpoll.diff, longpoll2.diff
>
>
> Implement longpolling on _changes. Instead of continuous, longpolling hold
> request until an update is available then close it. The client will have
> to ask a new connection. Should solve problem for XHR's that don't have that status changed (on ie, opera..) .
> I've put all the code in my github repo :
> http://github.com/benoitc/couchdb/tree/longpoll
> diff against trunk is attached.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (COUCHDB-421) add longpolling for _changes
Posted by "Benoit Chesneau (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/COUCHDB-421?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Benoit Chesneau updated COUCHDB-421:
------------------------------------
Attachment: longpoll.diff
patch implementing longpoll option.
> add longpolling for _changes
> ----------------------------
>
> Key: COUCHDB-421
> URL: https://issues.apache.org/jira/browse/COUCHDB-421
> Project: CouchDB
> Issue Type: New Feature
> Affects Versions: 0.10
> Reporter: Benoit Chesneau
> Attachments: longpoll.diff
>
>
> Implement longpolling on _changes. Instead of continuous, longpolling hold
> request until an update is available then close it. The client will have
> to ask a new connection. Should solve problem for XHR's that don't have that status changed (on ie, opera..) .
> I've put all the code in my github repo :
> http://github.com/benoitc/couchdb/tree/longpoll
> diff against trunk is attached.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (COUCHDB-421) add longpolling for _changes
Posted by "Benoit Chesneau (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/COUCHDB-421?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12733532#action_12733532 ]
Benoit Chesneau commented on COUCHDB-421:
-----------------------------------------
It will be more simple, maybe feed=continuous or feed=longpoll in this case ?
> add longpolling for _changes
> ----------------------------
>
> Key: COUCHDB-421
> URL: https://issues.apache.org/jira/browse/COUCHDB-421
> Project: CouchDB
> Issue Type: New Feature
> Affects Versions: 0.10
> Reporter: Benoit Chesneau
> Attachments: longpoll.diff, longpoll2.diff
>
>
> Implement longpolling on _changes. Instead of continuous, longpolling hold
> request until an update is available then close it. The client will have
> to ask a new connection. Should solve problem for XHR's that don't have that status changed (on ie, opera..) .
> I've put all the code in my github repo :
> http://github.com/benoitc/couchdb/tree/longpoll
> diff against trunk is attached.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (COUCHDB-421) add longpolling for _changes
Posted by "Benoit Chesneau (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/COUCHDB-421?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Benoit Chesneau updated COUCHDB-421:
------------------------------------
Attachment: longpoll4.diff
same patch as previous with indentation fixed.
> add longpolling for _changes
> ----------------------------
>
> Key: COUCHDB-421
> URL: https://issues.apache.org/jira/browse/COUCHDB-421
> Project: CouchDB
> Issue Type: New Feature
> Affects Versions: 0.10
> Reporter: Benoit Chesneau
> Attachments: longpoll.diff, longpoll2.diff, longpoll3.diff, longpoll4.diff
>
>
> Implement longpolling on _changes. Instead of continuous, longpolling hold
> request until an update is available then close it. The client will have
> to ask a new connection. Should solve problem for XHR's that don't have that status changed (on ie, opera..) .
> I've put all the code in my github repo :
> http://github.com/benoitc/couchdb/tree/longpoll
> diff against trunk is attached.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (COUCHDB-421) add longpolling for _changes
Posted by "Chris Anderson (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/COUCHDB-421?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12733528#action_12733528 ]
Chris Anderson commented on COUCHDB-421:
----------------------------------------
just looking at the new patch. definitely solid. One think I see: the changes_response_type/1 function may be a smell that we shouldn't have eg:
continuous=true
or
longpoll=true
but rather an single query parameter like:
connection=continuous
or
connection=longpoll
with a default of "normal".
This way we don't need a helper function to parse it and we also don't need to worry about cases where a user (or library) does something silly like:
continuous=true&longpoll=true
This involves changing the API but maybe it's worth it?
> add longpolling for _changes
> ----------------------------
>
> Key: COUCHDB-421
> URL: https://issues.apache.org/jira/browse/COUCHDB-421
> Project: CouchDB
> Issue Type: New Feature
> Affects Versions: 0.10
> Reporter: Benoit Chesneau
> Attachments: longpoll.diff, longpoll2.diff
>
>
> Implement longpolling on _changes. Instead of continuous, longpolling hold
> request until an update is available then close it. The client will have
> to ask a new connection. Should solve problem for XHR's that don't have that status changed (on ie, opera..) .
> I've put all the code in my github repo :
> http://github.com/benoitc/couchdb/tree/longpoll
> diff against trunk is attached.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (COUCHDB-421) add longpolling for _changes
Posted by "Benoit Chesneau (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/COUCHDB-421?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Benoit Chesneau updated COUCHDB-421:
------------------------------------
Attachment: longpoll2.diff
new patch following Damien's feedback. It now reuses the keep_sending_changes function. indentation should be fixed too.
> add longpolling for _changes
> ----------------------------
>
> Key: COUCHDB-421
> URL: https://issues.apache.org/jira/browse/COUCHDB-421
> Project: CouchDB
> Issue Type: New Feature
> Affects Versions: 0.10
> Reporter: Benoit Chesneau
> Attachments: longpoll.diff, longpoll2.diff
>
>
> Implement longpolling on _changes. Instead of continuous, longpolling hold
> request until an update is available then close it. The client will have
> to ask a new connection. Should solve problem for XHR's that don't have that status changed (on ie, opera..) .
> I've put all the code in my github repo :
> http://github.com/benoitc/couchdb/tree/longpoll
> diff against trunk is attached.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (COUCHDB-421) add longpolling for _changes
Posted by "Joan Touzet (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/COUCHDB-421?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12733710#action_12733710 ]
Joan Touzet commented on COUCHDB-421:
-------------------------------------
feed= makes sense, as it allows for extension to other methods in the future if there's demand (e.g., bayeux, html5).
I'll even volunteer to submit a fix for the Toast example that works cross-browser if this gets committed.
> add longpolling for _changes
> ----------------------------
>
> Key: COUCHDB-421
> URL: https://issues.apache.org/jira/browse/COUCHDB-421
> Project: CouchDB
> Issue Type: New Feature
> Affects Versions: 0.10
> Reporter: Benoit Chesneau
> Attachments: longpoll.diff, longpoll2.diff
>
>
> Implement longpolling on _changes. Instead of continuous, longpolling hold
> request until an update is available then close it. The client will have
> to ask a new connection. Should solve problem for XHR's that don't have that status changed (on ie, opera..) .
> I've put all the code in my github repo :
> http://github.com/benoitc/couchdb/tree/longpoll
> diff against trunk is attached.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Closed: (COUCHDB-421) add longpolling for _changes
Posted by "Jan Lehnardt (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/COUCHDB-421?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jan Lehnardt closed COUCHDB-421.
--------------------------------
Resolution: Fixed
Fix Version/s: 0.10
patch applied in r799862.
> add longpolling for _changes
> ----------------------------
>
> Key: COUCHDB-421
> URL: https://issues.apache.org/jira/browse/COUCHDB-421
> Project: CouchDB
> Issue Type: New Feature
> Affects Versions: 0.10
> Reporter: Benoit Chesneau
> Fix For: 0.10
>
> Attachments: longpoll.diff, longpoll2.diff, longpoll3.diff, longpoll4.diff
>
>
> Implement longpolling on _changes. Instead of continuous, longpolling hold
> request until an update is available then close it. The client will have
> to ask a new connection. Should solve problem for XHR's that don't have that status changed (on ie, opera..) .
> I've put all the code in my github repo :
> http://github.com/benoitc/couchdb/tree/longpoll
> diff against trunk is attached.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (COUCHDB-421) add longpolling for _changes
Posted by "Benoit Chesneau (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/COUCHDB-421?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Benoit Chesneau updated COUCHDB-421:
------------------------------------
Attachment: longpoll3.diff
patch that use feed=longpoll or feed=continuous as parameter instead of longpoll=true and continuous=true.
> add longpolling for _changes
> ----------------------------
>
> Key: COUCHDB-421
> URL: https://issues.apache.org/jira/browse/COUCHDB-421
> Project: CouchDB
> Issue Type: New Feature
> Affects Versions: 0.10
> Reporter: Benoit Chesneau
> Attachments: longpoll.diff, longpoll2.diff, longpoll3.diff
>
>
> Implement longpolling on _changes. Instead of continuous, longpolling hold
> request until an update is available then close it. The client will have
> to ask a new connection. Should solve problem for XHR's that don't have that status changed (on ie, opera..) .
> I've put all the code in my github repo :
> http://github.com/benoitc/couchdb/tree/longpoll
> diff against trunk is attached.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (COUCHDB-421) add longpolling for _changes
Posted by "Adam Kocoloski (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/COUCHDB-421?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12733752#action_12733752 ]
Adam Kocoloski commented on COUCHDB-421:
----------------------------------------
feed=continuous|longpoll also makes sense to me
> add longpolling for _changes
> ----------------------------
>
> Key: COUCHDB-421
> URL: https://issues.apache.org/jira/browse/COUCHDB-421
> Project: CouchDB
> Issue Type: New Feature
> Affects Versions: 0.10
> Reporter: Benoit Chesneau
> Attachments: longpoll.diff, longpoll2.diff
>
>
> Implement longpolling on _changes. Instead of continuous, longpolling hold
> request until an update is available then close it. The client will have
> to ask a new connection. Should solve problem for XHR's that don't have that status changed (on ie, opera..) .
> I've put all the code in my github repo :
> http://github.com/benoitc/couchdb/tree/longpoll
> diff against trunk is attached.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.