Howdy,
First, I'm having a hard time logging into
forums.couchbase.com. Keep receiving "Sorry, there was an error authorizing your account. Perhaps you did not approve authorization?" Otherwise, I'd post there.
My question this time is: for Android CBL, should I be using one Manager per thread and one Database instance per database file per thread?
All of the examples I've run across appear to run on the UI thread. I'm confused on the documentation. I see this: "Android, Java It is safe to call Couchbase Lite from multiple
threads on the Android / Java platform. If you find any thread safety
related issues, please report a bug."
Do you have an example using multiple threads and maybe multiple databases?
Here's our scenario:
Our applications are primarily Cordova-based. Due to performance requirements and amount of data we're working with (100K+ documents), we're unable to effectively use JavaScript-based views. Also, last I checked, JavaScript-based views are not compatible between Android and.NET CBL implementations. Is this still the case? One solution we're looking into is generating the initial data (which changes daily) and indexes on a beefy server using .NET CBL and then downloading the initial .cblite file directly to the device.
For the moment, we're using Cordova plugins to wrap CBL-based processes. Some processes take a few seconds, so we have to run them on a background thread. And, outside of the Cordova plugins, there are background processes to manage synchronization with the remote server that also interact with the CBL databases.
On the plus side, pulling from the CBL master branch has lowered our indexing times from 5 minutes per index to 30 seconds. Thanks for that!