Topic: synchronizing offline databases with online ones

Hi,
I am new to frontaccounting and I was wondering if it is possible to have one client be offline (and have a locally installed mysql server which he connects to) and at the end of the day "connect and synchronize" to the online server which everyone else is connected to. One of the users cannot be online all the time (no connection).

Any help would be appreciated.

THanks

Re: synchronizing offline databases with online ones

I am not sure what you would gain, but you could do a nightly backup (mysqldump) and then restore that backup to the offline server.

Of course you would not be able to perform any updates to the offline db that would be retained.

tom

Re: synchronizing offline databases with online ones

thats not really what i need. One client (who will do regular transactions like make sales orders, etc. while not connected continuously to the main server) can only be offline and not connected to the other people who are also making transactions (i.e. sales orders). at the end of the day, id like their transactions to be synchronized. is this possible?

Re: synchronizing offline databases with online ones

It might be possible through mysql.

Since we use innodb type we do everything in transactions and I believe there are mysql tools that can be used to sync.

If you do not have access to a mysql expert, let me know I may be able to find one (or figure it out myself)

tom

Re: synchronizing offline databases with online ones

I do not have access to a mysql expert. can you point me to the right direction? thanks

Re: synchronizing offline databases with online ones

Hello Marche

Take a look at this: http://symmetricds.codehaus.org/ maybe it could be used for data synchronization?

We will need the same thing for a good POS module... when we get there.

Alvin

"The roots of education are bitter, but the fruit is sweet."  - Aristotle.

Re: synchronizing offline databases with online ones

The main issue in such cases is to avoid duplicate IDs such as order numbers, invoice, etc. between the offline DB and the online DB.

Both start from the same starting point after a synchronization, but the moment a transaction is entered both will start with the next available number. Now both DBs have a new transaction with the same transaction ID, unless you operate with a different transaction number offset in the two databases.

Plain DB synchronization is unlikely to solve the issue.

Re: synchronizing offline databases with online ones

roger wrote:

The main issue in such cases is to avoid duplicate IDs such as order numbers, invoice, etc. between the offline DB and the online DB.

Both start from the same starting point after a synchronization, but the moment a transaction is entered both will start with the next available number. Now both DBs have a new transaction with the same transaction ID, unless you operate with a different transaction number offset in the two databases.

Plain DB synchronization is unlikely to solve the issue.

I posted the question over at the SymmetricDS forum, and this is the response I received:

By: chenson42

You might be able to do something programmatically in an IDataLoaderFilter.
You would have access to the node_id the data is coming from so you could add
a column to a central database that is also part of the primary key.   Or you
could apply some type of offset algorithm based on the node that is
synchronizing.

"The roots of education are bitter, but the fruit is sweet."  - Aristotle.