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 <[email protected]>
To: "[email protected]" <[email protected]>; N/A N/A 
<[email protected]>
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

Reply via email to