HI Adam, all,

On Dec 29, 2014, at 12:11 PM, Adam Fraser 
<[email protected]<mailto:[email protected]>> wrote:

Anton,

Here are the specific answers to the four questions you'd posted earlier:


1. Would you be able to shine more light on the technical details about how DCP 
solves the delivery of out of order and delayed updates?

The main difference when using DCP is reduced latency for updates appearing on 
the stream.  TAP waits for disk persistence before sending the update to the 
stream, which increases the potential for high latency under heavy load. DCP 
only waits for memory persistence before sending to the stream. In practice 
this means that there's much less chance that SG will reach the wait timeout 
and discard the document under DCP, particularly with the timeout change made 
in https://github.com/couchbase/sync_gateway/issues/517.


TAP doesn’t wait for disk persistence.  Update to views in releases prior to 
3.0 wait for disk persistence, but in 3.0 that no longer goes through disk IO.

I suspect the thing you’re thinking of is that if you restart a TAP stream from 
the beginning, it does have to do a “backfill” which involves getting all of 
the data on disk along with all of the items in memory.  In TAP, there is 
guaranteed delivery (for the life of the stream) but no guaranteed order and 
little ability to pick up at a particular place in time, which is the advantage 
DCP will bring.



2. Am I right that sequences can get permanently lost (e.g. if a sequence is 
acquired with an incr call, but then the update fails)? If so, even when using 
DCP, how will Sync Gateway be able to differentiate between permanently lost 
sequences and delays?

This case will need to be taken into consideration when implementing 
https://github.com/couchbase/sync_gateway/issues/525.

3. If we increase the timeout and provision enough hardware resources, but the 
changes feed with a gap still gets delivered, the only way one could get the 
client that received that feed to request the missed sequence is to do a sync 
from the start.

However, there does not seem to be a way (i.e. there is no API) to trigger a 
sync with no "since" parameter in Couchbase Lite.


As it is very hard to predict the exact load one will see, especially in AWS 
where sometimes things like disk and network delays spike, it is difficult to 
ensure that not a single update will be missed. In these rare cases we would 
love to be able to fix the problem for the customers who have been hit with it. 
Without the API to do a sync from scratch, from what I can see, we have no way 
to fix the problem, and have nothing to tell our customers who have hit it. We 
cannot be in this situation :) We need to be able to guide a customer to a 
resolution where they have all their data up to date.
This has been covered somewhat by Chris's previous updates on this topic, and 
will be included in https://github.com/couchbase/sync_gateway/issues/525.  This 
enhancement has been prioritized, and I expect it should be available (at least 
on a feature branch) in January.


4. Thank you for the suggestion to increase the time out in the Sync Gateway.

Would it be possible to do this in your code base? And maybe even accept a 
parameter from the command line?
This has been increased to 60 sec 
(https://github.com/couchbase/sync_gateway/issues/517).


Thanks,
Adam

--
You received this message because you are subscribed to the Google Groups 
"Couchbase Mobile" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to 
[email protected]<mailto:[email protected]>.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mobile-couchbase/d8ce82cb-a582-4de1-b89e-d51000299491%40googlegroups.com<https://groups.google.com/d/msgid/mobile-couchbase/d8ce82cb-a582-4de1-b89e-d51000299491%40googlegroups.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout.

--
Matt Ingenthron
Couchbase, Inc.

-- 
You received this message because you are subscribed to the Google Groups 
"Couchbase Mobile" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mobile-couchbase/F2D73B2D-071A-4D08-97E6-D078194CAA52%40couchbase.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to