Hi,
To make a note, the connection initially happens successfully and devices sync information between themselves. But when we keep those devices idle for some time (10+ hours) and then one of the device goes out of sync but remaining three works to sync information properly.
I will answer your questions above in points:
Point 1 - The transactions are sporadic and there frequency is not very high. Number of transaction per device per minute remains below 100.
Point 2 and 3 - We follow P2P topology and the connections are as:
Device-1:
file:/data/user/0/com.companyname.acustom.pos.mobileapp.android/files/.local/share/FirePOS.db?node=primary&total_primary_nodes=4&bind=tcp://0.0.0.0:1201
Device-2:
file:/data/user/0/com.companyname.acustom.pos.mobileapp.android/files/.local/share/FirePOS.db?node=primary&total_primary_nodes=4&bind=tcp://0.0.0.0:1202&connect=tcp://192.168.3.240:1201
Device-3:
file:/data/user/0/com.companyname.acustom.pos.mobileapp.android/files/.local/share/FirePOS.db?node=primary&total_primary_nodes=4&bind=tcp://0.0.0.0:1203&connect=tcp://192.168.3.240:1201,tcp://192.168.3.241:1202
Device-4:
file:/data/user/0/com.companyname.acustom.pos.mobileapp.android/files/.local/share/FirePOS.db?node=primary&total_primary_nodes=4&bind=tcp://0.0.0.0:1204&connect=tcp://192.168.3.240:1201,tcp://192.168.3.241:1202,tcp://192.168.3.243:1203
Point 4: On every device we open only one connection to the local database through singleton class.
Thank You!