Synching with two PCs sharing the same profile on same LAN

If BirdieSync 2.x constantly replaces your girlfriend's photo with your mother's one, this forum is for you...
Post Reply
AriMc
Posts: 11
Joined: Fri Apr 08, 2011 11:27 am

Synching with two PCs sharing the same profile on same LAN

Post by AriMc »

I have two PC-workstations in the same LAN with obviously different fixed IP-addresses. They both run Thunderbird/Lightning and have a shared profile in my home directory on server disk so I always have the same e-mails, calendar and contacts available regardless of the PC I'm using.

When I use BirdieSync (2.3.1.2 for Android) on just one PC it synchs fine and synchronizes only the changed records. However, when I switch to the other PC and change the IP-address in the settings of the mobile BirdieSync before synchronizing, then it seems to do a peculiar full synchronization first deleting everything and then reloading both the new and old data. I haven't seen any loss of data because of this but I'm a bit worried it may happen especially if records are changed on both devices between the change of IPs. Also the full synch takes quite a lot of time since I have hundreds of records to keep up-to-date.

I was wondering if this behaviour is intended and/or avoidable. The server is a Linux machine so I can't simply install BirdieSync there and keep the IP-address constant. Also I don't really want to boot the other PC just for the syncronization when I wouldn't need it for anything else.

Birdy
Site Admin
Posts: 3118
Joined: Tue Apr 18, 2006 11:43 am
Contact:

Re: Synching with two PCs on same LAN

Post by Birdy »

Hello AriMc,

If you access the same profile from both PCs and synchronize both with your mobile device, you may get a full resynchronization and potential duplicates. It's because, BirdieSync doesn't realize that you are synchronizing the same profile. It's as if you were synchronizing two different profiles (one for each PC). In that case, by now, it would be recommended to synchronize your profile only on one PC.
That may be improved in the future but it would impact the synchronization engine.
Birdy

AriMc
Posts: 11
Joined: Fri Apr 08, 2011 11:27 am

Re: Synching with two PCs on same LAN

Post by AriMc »

Hi Birdy,

Ok, does BirdieSync decide the scheme based on the IP-address of the contacted PC and detect changes in it?

I can see BirdieSync listens to TCP port 2664 for incoming connections. What if I wrote a simple TCP/IP-forwarder service on my server which would listen to the same port and upon connection would check which workstation is on and running Thunderbird and then simply redirect the traffic to that workstation and the returning packets back to the mobile. Then I could set the IP-address on the mobile to always point to the server and BirdieSync wouldn't even know which workstation it is actually talking to. And because both workstations are still using the same shared network profile, everything would be always in synch.

Do you this would work?

Birdy
Site Admin
Posts: 3118
Joined: Tue Apr 18, 2006 11:43 am
Contact:

Re: Synching with two PCs on same LAN

Post by Birdy »

Which connection do you want to forward: the connection between the mobile device and BirdieSync server or between BirdieSync server and Thunderbird ? (I suppose the latest)
Birdy

AriMc
Posts: 11
Joined: Fri Apr 08, 2011 11:27 am

Re: Synching with two PCs on same LAN

Post by AriMc »

I actually tried it already. I got the forwarding to go but it didn't solve the issue of full synch and duplicates. Here is the setup I tried:

- Mobile BirdieSync IP-address settings are constantly set to point to server.
- Server is running a forwarder software listening to port 58927 (not 2664 as I thought earlier)
- When I start sync on the mobile, it connects to my server.
- The server accepts the incoming connection from mobile and tries to open a new connection
first to port 58927 of PC1 and if it fails then to port 58927 of PC2.
- If either connection is established then all packets in both direction between mobile and PC1
or mobile and PC2 are forwarded.

With this setup I can synch to either PC1 or PC2 through the server acting as a "proxy" in the middle and without changing the IP-address on the mobile, but still whenever the final destination (PC1 or PC2) is different than during the previous synch, it performs a full synch and creates duplicates.

Birdy
Site Admin
Posts: 3118
Joined: Tue Apr 18, 2006 11:43 am
Contact:

Re: Synching with two PCs on same LAN

Post by Birdy »

Yes, the problem is that in any case, you must synchronize with a unique BirdieSync server. The solution could have been to always connect to the same BirdieSync server and forward the connection to a Thunderbird instance running on another machine. But this is not that simple: BirdieSync server would check if Thunderbird is running on the same machine and launch it if not. And the second problem is that the incoming port used by Thunderbird is dynamic and so can change when you relaunch Thunderbird. It would be necessary to use a tool like netstat to catch Thunderbird port. Furthermore, it could be necessary to close Thunderbird if the connection with the server had already be done on the same machine. So it might be possible but it doesn't seem simple to put a forwarder between BirdieSync server and Thunderbird.
Birdy

AriMc
Posts: 11
Joined: Fri Apr 08, 2011 11:27 am

Re: Synching with two PCs sharing the same profile on same L

Post by AriMc »

I see. What makes a BirdieSync server "unique" then? I was wondering if there was a way to force two BirdieSync servers to appear the same when I know they share the same profile. I tried looking in the installation directory and registry but couldn't find anything computer specific.

Sorry for bombarding you with these questions of probably quite rare user scenarios.

Post Reply