syncing two pcs

Mike or Penny Novack stepbystepfarm at mtdata.com
Tue Jul 8 07:16:14 EDT 2008


I am going to jump in here.

There are THREE very different senses in which the term "synch" is being 
used.

a) GnuCash being used SEQUENTIALLY on two computers.
   You can synch this without too much trouble. For example, assume that 
the directory which contains the books (you can place them anywhere) is 
on an external UBS device. Then whichever computer has the device 
inserted into one of its USB ports can see the data and the other can 
not and whichever can see the data always sees the latest version and 
can update the data.

b) GnuCash being used simultaneously on two computers, chages made in 
real time.
   This requires a DBM (data bas manager) to mediate which computer can 
update the data. Only one can make changes AT A TIME with the other 
locked out until the change completes. In this case the data would 
probably reside on some server (but the server program COULD be running 
on one of the two machines). It is a lot of work writing a separate DBM 
for each application so the usual solution for this case is to have the 
application use a form of data which is universally controlled by a DBM 
(the applications does its reads and writes of data by making requests 
to the DBM).

  GunCash doesn't currently offer this but could be done. Perhaps 
somebody could report on the status of any "free software" projects 
working on providing a DBM. Or even just an operating system independent 
"queue on resource" call package.

c) GnuCash being used simultaneously on two computers with changes made 
on either synched later.
   Not only can't GnuCash do this but no application can do this RIGHT. 
The reason is very simple, you can't define "right". The change actions 
taken on the two computers might be incompatible. I have better give 
some examples:

  1) On computer ONE a transaction A is entered while on computer TWO a 
transaction B (either for the same or separate accounts). At some later 
time the synch program runs so that the books on both computers show 
both transactions have been entered.
   THIS is what you have in mind. What the "synch" is supposed to do is 
well defined (you can say "coded right" or "coded wrong" depending on 
what sych action occurs)

BUT CONSIDER THIS
  2) On computer ONE  a new account UVW is create with account XYZ as 
its parent and several transactions are entered to UVW. On computer TWO 
the account XYZ is deleted. The action you expect to result from the 
"synch" operation is?
    See the problem? You CAN'T combine these two. Even much simpler 
scenarios are unclear (they both rename account X, one to Y an done to Z 
-- the resulting name is..?)

BTW --- the name for "issue of this sort", the area of computing that 
deals with handling this sort of problem goes by the name of "concurrent 
proecessing". That's just in case you want to look this sort of stuff up 
to understand the issues. Amost any "Writing Operating Systems 101" or 
"Writing Database Managers 101" book would do.



More information about the gnucash-user mailing list