couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From N/A N/A <pressley...@yahoo.com>
Subject Re: CouchDB _changes _view transactions
Date Tue, 01 Nov 2011 18:13:09 GMT
Hello,

Thx. So:
1: Application starts and querying view -> /_view/getState?update_seq=true&startkey=[\"something\"]&endkey=[\"something\",
{}]
2: seq = update_seq
3: .../_changes", { options: {"feed": "continuous", "heartbeat": 30000, "include_docs": true,
"since": seq}}, true)

_changes will give me everything since last seq, so i am not going to lose information. Looks
secure at first reading...

Regards,



________________________________
From: Jens Alfke <jens@couchbase.com>
To: "user@couchdb.apache.org" <user@couchdb.apache.org>; N/A N/A <pressley333@yahoo.com>
Sent: Tuesday, November 1, 2011 7:41 PM
Subject: Re: CouchDB _changes _view transactions


On Nov 1, 2011, at 10:20 AM, N/A N/A wrote:

> During view execution, is it possible to get newer message from continuous _changes?
Which information will arrive first ? The one from the view or _changes ? 

I don’t think there can be any guarantees, since the data is arriving over two separate
TCP connections. Even if the server sent the packets in a known order, that could be changed
during flight if some packets were delayed.

What might help is configuring your view to emit sequence numbers*. Then you can compare the
sequence numbers in the view rows coming back with the latest sequence number received from
_changes to see which is newer.

—Jens

* http://wiki.apache.org/couchdb/HTTP_view_API#View_Generation_Options
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message