XML-RPC interface (was: Will GnuCash ever work for me?)

Dave Peticolas dave@krondo.com
26 Sep 2001 00:04:39 -0700


--=-2YUq4CR8e0zmr6k0G5S1
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

> I don't quite understand. Clearly, the GUI can only operate one 'book'
> at a time.  But the engine doesn't (shouldn't) have any globals, and
> so it should be possible for one process (that is coding to the engine
> API) to open multiple books at once.  I've never tried this ...=20
> I don't know if we're really clean on this.

I don't think we are completely clean on this. We still have a few
globals, like the commodity table and the GUID->entity hash table.


> There's the obvious unwritten rule that one must not try to split a
> transaction between differnt books.  But there are utilties, e.g.
> xaccGetBookFromTransaction() that, given a transaction, will tell you=20
> which 'book' its from.  =20

Are you referring to a function you are writing? There is=20
xaccGroupGetBook, but I'm not familiar with a transaction
function.


> The converse is also true, at least with the sql backend: you can have
> multiple gnucash engines updating the same database at the same time.
>=20
> This is why I say that the gnucash 'book' is misnamed.  It was designed
> to be a session,  but the common 1-to-1 mapping lead to some confusion.

If we need something called a 'session' object, I think we should
create a new object and take out the session handling code in gnc-book
and leave the gnc books as the top-level data structure. When we
just had account groups, we could just stick the account group in
a session and the relationship was simple. But with commodities
and scheduled transactions now, and possibly budgets, memorized
transactions, etc. in the future, there is a lot of other data
that is part of a gnucash data set. I think it is conceptually
cleaner to have a top-level data object that represents an entire
gnucash dataset, independent of a session, like account groups
did before.

dave


--=-2YUq4CR8e0zmr6k0G5S1
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQA7sX4H5effKKCmfpIRAtrQAKCJLbfqinAHjbTzxjmX2N3dIyeXOACgi+3G
S2rK5vT5ywxO/tQzkF9JmXA=
=fIXq
-----END PGP SIGNATURE-----

--=-2YUq4CR8e0zmr6k0G5S1--