Greetings

Linas Vepstas linas at linas.org
Mon Aug 16 14:46:19 EDT 2004


On Fri, Jul 30, 2004 at 07:27:06PM -0400, Derek Atkins was heard to remark:
> As much as this sounds like a great idea, at this point in time the gnucash
> busiess features do not support the pg/sql backend. :(

But we're working on it, slowly.

> Quoting "Craig P. McDaniel, Jr." <craig-list at datafathom.com>:
> > I am searching for an alternative to our current QuickBooks setup.  We
> > currently have billing software that invoices, charges and records all
> > payments from our company.  This data is then exported daily into a
> > QuickBooks database by customized exporting software.  Exports are
> > automatically tracked so that duplicate data isn't exported, thus
> > screwing up the QuickBooks database.
> > 
> > It would be wonderful to automate the export process by plugging code in
> > to update a pgsql database on a daily basis instead of having an
> > operator manually do the updating via the intranet.  
> > 
> > My question, specifically, is as follows:  What multi-user issues will
> > arise if I attempt to do nightly database updates to the pgsql backend
> > DB if gnucash clients are logged in?  Obviously there probably will be
> > data out of sync resulting in hell breaking loose.
> > 
> > Possible ideas:
> > 
> > a) force the logout of all clients and then do the update to the
> > database, allowing clients to login only when the update has completed.

No, goal is to not have to do this.  There's a whole bunch of mechanisms
in place to make sure that clients can distinguish old from new data,
although these are rather complex.

> > b) figure out the session management code that gnucash uses to somehow
> > register the export script as another gnucash client entering data into
> > the database, thus possibly bypassing any problems with data clobbering.

Yes, this is the best/correct way to do this.    The suggested API is
that provided by the gnucash 'engine', viz, the header files in
src/engine/*h.  Unfortunately, there are few/no example programs showing
how to use this, and useful things like perl bindings have aged away ... 

> > c) perhaps its just an issue with sql transactions, but I think its more
> > complicated than that -- some kind of session is registered when each
> > gnucash "client" "logs in," but I am not sure how it works.

This is mostly to help provide some amount of auditability and possibly
some future security extensions.

--linas

-- 
pub  1024D/01045933 2001-02-01 Linas Vepstas (Labas!) <linas at linas.org>
PGP Key fingerprint = 8305 2521 6000 0B5E 8984  3F54 64A9 9A82 0104 5933


More information about the gnucash-user mailing list