Thanks Jens, much appreciate it. I agree with your concern about the bad
user experience but as you noticed there is a mandatory need to sync a
subset first and then continue. Without that there is a risk of creating a
conflict in the logic.
I will try your suggestion regarding the non-continious replication however
I still find the replication states confusing. Why would the real status
show IDLE even though no replication has been completed? Furthermore the
lastError throws an error initially ("server could not be contacted") but
subsequent notifications show lastError=nil.
On Thursday, October 30, 2014 1:23:35 PM UTC-7, Jens Alfke wrote:
>
>
> On Oct 30, 2014, at 1:12 PM, Christoph Berlin <[email protected]
> <javascript:>> wrote:
>
> I would expect that the status stays OFFLINE (1) the whole time unless I
> am missing something
>
>
> The Offline state means the *client* is offline, i.e. there is no network
> interface capable of reaching the server.
>
> - if that is the case could someone tell me what I miss? How would I
> implement a function that makes sure that the app doesn't continue without
> the successful sync.
>
>
> Use a non-continuous replication and wait for it to reach the Stopped
> state; then check for errors.
>
> Slightly off-topic, but it's a better user experience if the app doesn't
> block until the first sync is complete. If you've written your UI code to
> respond to database changes, then the app can usually start up right away
> with minimal/no data, and then gradually fill in as the data arrives. Or if
> there's some subset of the data that's mandatory before you can run, you
> could put those documents in a special channel and initially sync with just
> that channel, then unblock the UI and start the full sync.
>
> —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].
To view this discussion on the web visit
https://groups.google.com/d/msgid/mobile-couchbase/a4d7d5d3-aa25-46b3-9437-59083f9ba86a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.