Caching DB on Mirror Device

Hi guys, just wanted to see if this is possible or if someone has done this previously. We have a setup where we have one main server device and one mirror device connecting to the main device database and messaging server.

However, (as expected) when the mirror device (even temporarily) loses connection to the internet and we try to put an order through then SambaPOS crashes or shows the Network Issue message (as expected because it cannot communicate with the SQL server).

All that is fine, but I wanted to know if anyone had installed/implemented a caching mechanism (either through SQL Server Express or SQLite or similar with merging rules implemented) so that the DB is cached locally causing the tablet not to crash, then when the network connection resumes, the changes are pushed to the main DB (and any conflicts are either notified or handled).

If someone has experience I would appreciate any feedback on the process, challenges, considerations, etc… From the SambaPOS Team I would also appreciate any information about how this would affect the messaging server?

On a side note it does also raise the question for me about what the difference is between the database and messaging server from a mirror device POV. If the mirror device wants to make a change does it change the DB directly or does it do so via messaging server? What is the purpose of having both?

Appreciate any help, thanks in advance.

Message server communicates changes like table states across terminals. It also powers our api that powers mobile client 3, KDS, kiosk etc. for tablets and wireless devices we recommend mc3 as it does not require constant database connection.

For windows terminals they require constant connection to the database.

The way SambaPOS handles data, it doesn’t lend itself to a distributed infrastructure - there would be no way to sync local dbs into one central db in the event of loss of connectivity (mainly the guarantee of conflicting primary keys).

With the exception of things like order integration, payment processing, etc., losing connection to the internet should not cause issues for SambaPOS. If your db is off-site for some reason, you’ll have to look into SQL Server Replication. Whilst Express can subscribe to replication, you’ll need at least SQL Server Standard running locally to publish replication (see $$$).

If it’s just local connectivity issues, be sure your terminals are hard-wired.

Okay makes sense thanks for the information guys - really helpful.