XML Size

Linas Vepstas linas@linas.org
Thu, 4 Apr 2002 09:36:39 -0600


Hi Chris,

Thanks for taking the interest.  Maybe the docos on our web site are
deficient.


On Thu, Apr 04, 2002 at 08:56:35AM -0500, Christopher Hicks was heard to remark:
> I'd like to add my vote for seeing things migrate to a data-access API
> with a SQL back-end.  There are several advantages to this I see:

already got one.

> - With a data-access API folks could maintain the XML way of doing things
> if they liked.  Nice clean API's make multiple implementations not only

The api supports multiple backends, including sql and xml.  Anyone can
add more, if desired.  There once was an http backend, there's a
proof-of-concept rpc backend.

> - A data-access API centralizes sanity checks and tends to make the
> program easier to maintain and thus less buggy.

Look in src/engine/*.h  The docos in the header files explain the
data-access api.  There's additonal docos for the programming api
in the doc directory.

> - An API provides an easy way to create a test suite to ensure that the
> data is being handled properly.  Regression testing an API is much easier

see the tests subdirectory.  Its there.  Its not complete, but its
extensive.

> - additional applications.  This is initially just a programmer thing -

feel free to write them ...

> The only "API" I've been able to find for gnucash

Gosh, you did not try very hard.  src/engine is the *only* officially
supported API.  All else is subject to change and suddent disappearence.

(actually, I think there will be more formal apis in the business side,
but only derek acan say for sure.)

> accounting applications.  It'd be quite lovely for the gnucash front-end
> and the SQL-ledger front end to be able to simultaneously access the same
> data set.  [evil take-over-the-world laugh.]

The sql-ledger guy (1) doesn't beleive in API's (2) wouldn't use the
gnucash API anyway.  We had that conversation years ago.

> A SQL back-end would have several major unique advantages:

It already exists.  src/backends/posgres

> - multi-user!  Oh my!  This has been one of the biggest agonies with the

Gnucash is currently multi-user.  Well, beta, actually.  Nobody
seems to care enough to have added the GUI to demand the passwd for 
database access, but the backend does support username/passwd 
access.  Try opening postgres://hostname/dbname?username=me&passwd=you
and if you've configured things right, it will work.

One user can edit a record, and if another user is viewing that 
record, the changes will show up automatically.

As far as I know, there are no bugs in it.  A number of people have
multi-user whacked it a bit, and it seems to work.  Some of the
automated test cases test this do this.

--linas


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