Hum... now I'm confused.
Let's imagine that the code was written as:
1. Make a longpoll request
2. If within 1 second of receiving the response header no body has been sent
down then call client.changeTrackerCaughtUp
3. Keep waiting on longpoll
4. When something does come in then call changeTrackerReceivedChange
What's the harm?
And while there is a perf component to my interest my real concern is making
sure I actually understand the code.
Thanks,
Yaron
________________________________
From: [email protected] <[email protected]> on
behalf of Jens Alfke <[email protected]>
Sent: Tuesday, September 23, 2014 3:40 PM
To: [email protected]
Cc: Traun Leyden
Subject: Re: Normal and Longpoll
On Sep 23, 2014, at 3:25 PM, Yaron Goland
<[email protected]<mailto:[email protected]>> wrote:
Makes sense. We could fix this by just flipping to idle as soon as we get back
the response header from the server if there is no immediate body but one thing
at a time.
No, it doesn't make sense to switch to idle as soon as you get the response
header, because you still don't know if you're caught up or not. You might be
about to receive a response with changes in it, as soon as the next TCP packet
arrives.
I assume you're worried about the performance of sending the extra request. If
so, you'd be better off implementing WebSocket support on the server side,
since it's more efficient (comparable to the continuous feed.)
-Jens
--
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/27D8A07C-6565-49CC-A31D-2B5DD82842A6%40couchbase.com<https://groups.google.com/d/msgid/mobile-couchbase/27D8A07C-6565-49CC-A31D-2B5DD82842A6%40couchbase.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout.
--
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/1411513330728.98950%40microsoft.com.
For more options, visit https://groups.google.com/d/optout.