I have a demo application setup that is based on the sample Android TouchDB application. I have a Cloudant instance up with some test data and have been testing pulling data from Cloudant to the mobile device. It's been a fun learning experience. =)
Rapid fire questions: 1. I have about 2k documents in one database and wanted to test pulling all of them. Replication seems to pull about 200 (it's different every time) before stopping. Any ideas why that might be? 2. To try and solve (1) I made the documents smaller. I drastically trimmed the average document size and re-ran the replication. It would pull about 200 documents before stopping. Even after 20 minutes no more replication. Continuous is set to true. 3. I put only 25 documents in a database. That replicated quickly and it got all 25. However when I make a change to a document and then issue a pull, I don't see the change. What code should guarantee changes are being applied to the mobile device? 4. I'm curious why the HTTP request to CouchDB has a limit of 50 and yet the revisions that come back are always less than 50. If TouchDB asks for 50, and there are at least 50 available, why do I never get 50 at a time?
Replication code:
ReplicationCommand pullCommand = new ReplicationCommand.Builder()
On Tue, Nov 13, 2012 at 2:04 PM, Ryan Meyer <ryan1...@gmail.com> wrote:
> I have a demo application setup that is based on the sample Android
> TouchDB application. I have a Cloudant instance up with some test data and
> have been testing pulling data from Cloudant to the mobile device. It's
> been a fun learning experience. =)
> Rapid fire questions:
> 1. I have about 2k documents in one database and wanted to test pulling
> all of them. Replication seems to pull about 200 (it's different every
> time) before stopping. Any ideas why that might be?
> 2. To try and solve (1) I made the documents smaller. I drastically
> trimmed the average document size and re-ran the replication. It would
> pull about 200 documents before stopping. Even after 20 minutes no more
> replication. Continuous is set to true.
> 3. I put only 25 documents in a database. That replicated quickly and it
> got all 25. However when I make a change to a document and then issue a
> pull, I don't see the change. What code should guarantee changes are being
> applied to the mobile device?
> 4. I'm curious why the HTTP request to CouchDB has a limit of 50 and yet
> the revisions that come back are always less than 50. If TouchDB asks for
> 50, and there are at least 50 available, why do I never get 50 at a time?
It seems to work for small batches of documents! =)
I'm going to do some further investigation and see if I can get a better idea of what's going on. I was able to replicate data from Iris to Cloudant and from Cloudant to Iris, so I don't think the issue is on the provider side. Your answer confirms there is something going on with TouchDB.
I was about to evaluate TouchDB for Android - could you please elaborate on the project's status and vision? Should I evaluate if for upcoming applications with offline/online scenarios (requires replication)? If not, are there any alternatives - is CouchDB Mobile for Android more stable?
On Tuesday, 13 November 2012 17:56:41 UTC-5, Marty Schoch wrote:
> Regarding issues 1-3. The replicator is currently broken. It has been > broken for about 6 months now and I haven't had any time to work on it.
> Regarding 4 I haven't noticed that behavior, but if its repeatable it > would be a question for the CouchDB list.
> marty
> On Tue, Nov 13, 2012 at 2:04 PM, Ryan Meyer <ryan...@gmail.com<javascript:> > > wrote:
>> I have a demo application setup that is based on the sample Android >> TouchDB application. I have a Cloudant instance up with some test data and >> have been testing pulling data from Cloudant to the mobile device. It's >> been a fun learning experience. =)
>> Rapid fire questions: >> 1. I have about 2k documents in one database and wanted to test pulling >> all of them. Replication seems to pull about 200 (it's different every >> time) before stopping. Any ideas why that might be? >> 2. To try and solve (1) I made the documents smaller. I drastically >> trimmed the average document size and re-ran the replication. It would >> pull about 200 documents before stopping. Even after 20 minutes no more >> replication. Continuous is set to true. >> 3. I put only 25 documents in a database. That replicated quickly and it >> got all 25. However when I make a change to a document and then issue a >> pull, I don't see the change. What code should guarantee changes are being >> applied to the mobile device? >> 4. I'm curious why the HTTP request to CouchDB has a limit of 50 and yet >> the revisions that come back are always less than 50. If TouchDB asks for >> 50, and there are at least 50 available, why do I never get 50 at a time?
The past few months I've been working on tasks related to helping Couchbase
Server 2.0 get out the door. I hope to get back to TouchDB-Android this
winter. But I can't really predict when that might be. Also, the Android
version is now very far behind the iOS version, so I think it could take a
few months to get it caught up.
I wouldn't start using TouchDB-Android for a project right now unless you
are willing to debug/fix issues yourself.
The old Couchbase Mobile for Android may be more stable, but it is a
dead-end. No one is currently working on it, and if you run into a problem
there, you may likely find no one able to help.
I don't mean to sound too negative. The vision is the same as it always
has been for TouchDB-Android to be comparable to the iOS version.
marty
On Fri, Nov 16, 2012 at 2:40 PM, Michael Weinberg <weinbe...@gmail.com>wrote:
> I was about to evaluate TouchDB for Android - could you please elaborate
> on the project's status and vision? Should I evaluate if for upcoming
> applications with offline/online scenarios (requires replication)? If not,
> are there any alternatives - is CouchDB Mobile for Android more stable?
> Thanks,
> Michael
> On Tuesday, 13 November 2012 17:56:41 UTC-5, Marty Schoch wrote:
>> Regarding issues 1-3. The replicator is currently broken. It has been
>> broken for about 6 months now and I haven't had any time to work on it.
>> Regarding 4 I haven't noticed that behavior, but if its repeatable it
>> would be a question for the CouchDB list.
>> marty
>> On Tue, Nov 13, 2012 at 2:04 PM, Ryan Meyer <ryan...@gmail.com> wrote:
>>> I have a demo application setup that is based on the sample Android
>>> TouchDB application. I have a Cloudant instance up with some test data and
>>> have been testing pulling data from Cloudant to the mobile device. It's
>>> been a fun learning experience. =)
>>> Rapid fire questions:
>>> 1. I have about 2k documents in one database and wanted to test pulling
>>> all of them. Replication seems to pull about 200 (it's different every
>>> time) before stopping. Any ideas why that might be?
>>> 2. To try and solve (1) I made the documents smaller. I drastically
>>> trimmed the average document size and re-ran the replication. It would
>>> pull about 200 documents before stopping. Even after 20 minutes no more
>>> replication. Continuous is set to true.
>>> 3. I put only 25 documents in a database. That replicated quickly and
>>> it got all 25. However when I make a change to a document and then issue a
>>> pull, I don't see the change. What code should guarantee changes are being
>>> applied to the mobile device?
>>> 4. I'm curious why the HTTP request to CouchDB has a limit of 50 and yet
>>> the revisions that come back are always less than 50. If TouchDB asks for
>>> 50, and there are at least 50 available, why do I never get 50 at a time?
Thanks for your reply. I wish it wasn't so negative, but we got what we got...
So if I summarize would it be fair to say that there is NO solution for Android - Couch synchronization available for use right now? Are you aware of any other open source/commercial alternative implementations?
On Friday, 16 November 2012 14:58:42 UTC-5, Marty Schoch wrote:
> The past few months I've been working on tasks related to helping > Couchbase Server 2.0 get out the door. I hope to get back to > TouchDB-Android this winter. But I can't really predict when that might > be. Also, the Android version is now very far behind the iOS version, so I > think it could take a few months to get it caught up.
> I wouldn't start using TouchDB-Android for a project right now unless you > are willing to debug/fix issues yourself.
> The old Couchbase Mobile for Android may be more stable, but it is a > dead-end. No one is currently working on it, and if you run into a problem > there, you may likely find no one able to help.
> I don't mean to sound too negative. The vision is the same as it always > has been for TouchDB-Android to be comparable to the iOS version.
> marty
> On Fri, Nov 16, 2012 at 2:40 PM, Michael Weinberg <wein...@gmail.com<javascript:> > > wrote:
>> I was about to evaluate TouchDB for Android - could you please elaborate >> on the project's status and vision? Should I evaluate if for upcoming >> applications with offline/online scenarios (requires replication)? If not, >> are there any alternatives - is CouchDB Mobile for Android more stable?
>> Thanks, >> Michael
>> On Tuesday, 13 November 2012 17:56:41 UTC-5, Marty Schoch wrote:
>>> Regarding issues 1-3. The replicator is currently broken. It has been >>> broken for about 6 months now and I haven't had any time to work on it.
>>> Regarding 4 I haven't noticed that behavior, but if its repeatable it >>> would be a question for the CouchDB list.
>>> marty
>>> On Tue, Nov 13, 2012 at 2:04 PM, Ryan Meyer <ryan...@gmail.com> wrote:
>>>> I have a demo application setup that is based on the sample Android >>>> TouchDB application. I have a Cloudant instance up with some test data and >>>> have been testing pulling data from Cloudant to the mobile device. It's >>>> been a fun learning experience. =)
>>>> Rapid fire questions: >>>> 1. I have about 2k documents in one database and wanted to test pulling >>>> all of them. Replication seems to pull about 200 (it's different every >>>> time) before stopping. Any ideas why that might be? >>>> 2. To try and solve (1) I made the documents smaller. I drastically >>>> trimmed the average document size and re-ran the replication. It would >>>> pull about 200 documents before stopping. Even after 20 minutes no more >>>> replication. Continuous is set to true. >>>> 3. I put only 25 documents in a database. That replicated quickly and >>>> it got all 25. However when I make a change to a document and then issue a >>>> pull, I don't see the change. What code should guarantee changes are being >>>> applied to the mobile device? >>>> 4. I'm curious why the HTTP request to CouchDB has a limit of 50 and >>>> yet the revisions that come back are always less than 50. If TouchDB asks >>>> for 50, and there are at least 50 available, why do I never get 50 at a >>>> time?
On Nov 16, 2012, at 1:53 PM, Michael Weinberg <weinbe...@gmail.com<mailto:weinbe...@gmail.com>> wrote:
So if I summarize would it be fair to say that there is NO solution for Android - Couch synchronization available for use right now?
As Marty said, Couchbase Mobile is available and works. It’s just that it’s no longer in active development and there’s not really any tech support for it. It would also be fairly easy to port your application code from it to TouchDB for Android when that becomes more stable, because you’ll be using a higher-level API like Ektorp that talks to either one.
I spent some time looking at the PULL replication. You have the following:
- If number of revisions to be fetched go above 1000 then pause 500 seconds and pull one revision again - loop until 1000 revs condition is broken.
- When you try to pull number of revisions, you check number of MAX_OPEN_HTTP_CONNECTIONS (currently set to 16)
I tried playing around and I can see that replication stops because the number of revisions pending exceeds 1000 and the number of HTTP connections hit the limit too. The number doesn't seem to come down and thus gets into an infinite loop.
Any thoughts on what could be an issue? You had pushed some changes to the replicator branch - do they solve this issue?
On Saturday, November 17, 2012 3:34:30 AM UTC+5:30, Jens Alfke wrote:
> On Nov 16, 2012, at 1:53 PM, Michael Weinberg <wein...@gmail.com<javascript:>> > wrote:
> So if I summarize would it be fair to say that there is NO solution for > Android - Couch synchronization available for use right now?
> As Marty said, Couchbase Mobile is available and works. It’s just that > it’s no longer in active development and there’s not really any tech > support for it. It would also be fairly easy to port your application code > from it to TouchDB for Android when that becomes more stable, because > you’ll be using a higher-level API like Ektorp that talks to either one.