1. I'm thinking to make one device as a master and, if possible, take the role of the sync gateway.
If I'm using the architecture with one master device as a star, do my devices need to know only the IP address of my master device? Or the master device need as well the IP address of the other remote devices in order to replicate any change on the database?
3. Any clues why is acting like that and how to do it properly?
3. Using phonegap, if i want to discover the other peers, how would you do that?I was thinking to make a plugin doing that in native language on Android and iOS, using for instance Bonjour service.
3. I tried a really simple example doing a p2p replication. It's working quite well when I provide both IP addresses. When I provide the IP address of my device A to my device B, the device A can make any change and the data is replicated well but it's not working in the other way, so from the device B to A.
3. Any clues why is acting like that and how to do it properly?
3. Using phonegap, if i want to discover the other peers, how would you do that?I was thinking to make a plugin doing that in native language on Android and iOS, using for instance Bonjour service.
This looks like an Android issue, but it could be with your LAN -- sometimes reachability can be tricky. Jens is correct that the only IP address that needs to be published is the hub in the hub and spoke arrangement.
For PhoneGap you probably want to use a plugin like https://github.com/jarnoh/cordova-dnssd or https://github.com/rossmartin/BonjourPluginDo you know if there is the equivalent for Android device? Or how would you do it?
Hi,I tried to implement a device as a master and the other one as a "client" that would connect to the master.I give the IP address of the master device to the client. But now, I can only replicate from the master device to the client, impossible to make a POST request to the master device according to the logs :05-02 14:10:50.611: V/Database(23718): *** com.couchbase.lite.replicator.Replication$1@42138898: BEGIN processInbox (1 sequences)05-02 14:10:50.611: V/Database(23718): *** com.couchbase.lite.replicator.Replication$1@42138898: END processInbox (lastSequence=null05-02 14:10:50.861: I/Database(23718): com.couchbase.lite.replicator.Pusher$2@422074c8: Sending 1 revisions05-02 14:10:50.861: V/Database(23718): com.couchbase.lite.replicator.Pusher$2@422074c8: Sending [{e8bb1d57-60b3-4cfd-b35a-812917c268e4 #3-185f2150-5903-46ec-b388-ec2194de94ca}]05-02 14:10:50.941: E/Database(23718): Got error 40405-02 14:10:50.941: E/Database(23718): Request was for: org.apache.http.client.methods.HttpPost@4212928805-02 14:10:50.941: E/Database(23718): Status reason: Not found
This question is primarily targeted at Java Couchbase Lite.
So today, in theory anyway, I should be able to set up two separate listeners on the same box (Android or otherwise) and have both listeners talk to the same database file without problem. SQLite certainly supports this behavior.
But I've heard Jens mentioning that Couchbase Lite might be changing their underlying database.
So I wanted to check how committed is Couchbase to continuing this behavior?
The reason I care is that it's looking very likely that I will need to support two different listeners running on the same database files. One listener would be listening on an Internet routable address and would have all sorts of fun security. The other listener would be listening on localhost and would use different security. In theory I could set up two different endpoints in TJWS but believe me, that isn't fun. It would be vastly simpler to just set up two different listeners who may both hit the same cblite file.
But when Jens new database comes in will that still work?
Thanks,
Yaron
So today, in theory anyway, I should be able to set up two separate listeners on the same box (Android or otherwise) and have both listeners talk to the same database file without problem. SQLite certainly supports this behavior.
But I've heard Jens mentioning that Couchbase Lite might be changing their underlying database.
So I wanted to check how committed is Couchbase to continuing this behavior?
And that's why I send mails to the group. :)
Normally I wouldn't care about the change listeners because I don't ever use them (we ONLY talk over HTTP so nobody gets to use the manager object directly) but I can see this being a problem for continuous replications which do need the change listeners.
I suspect the only sane approach is to take advantage of TJWS's dual listener support. It is able to listen to more than one port at once. Although I'll probably have to write a custom adapter to get it to do what I want. But that isn't brain surgery.
Thanks,
Yaron
To view this discussion on the web visit https://groups.google.com/d/msgid/mobile-couchbase/1399047661645.80137%40microsoft.com.
You say that now.... :)
Wait until I seriously start the thread on getting rid of TJWS. See https://github.com/NanoHttpd/nanohttpd/issues/63 for a taste. :)
Yaron