in case you didn't see this

Derek Atkins warlord@MIT.EDU
16 Mar 2001 11:24:37 -0500


linas@linas.org writes:

> This is a bug; the calls are meant to be balanced.  However, the fix
> is not entirely obvious; pulling the backend out of a global would
> suffice, but I've tried really hard to avoid globals elsewhere ...

Globals are evil.  They are especially evil in my case, because the
server may be dealing with multiple 'books' at one time.  Indeed, if I
could, I'd go through and change EVERY function call to require either
a GNCBook * or an AccountGroup *, therefore removing the entity
database from being a global.  That way I could have multiple books
opened up together, or theoretically have multiple people 'opening'
the same book.

The way I would fix this would be to change xaccMallocTransaction() to
take either an AccountGroup or a a GNCBook argument.  Then you could
obtain the Backend from there.

> > Anyways, I think this is my last major bug that I know of.  The RPC
> > Backend seems to work fairly well for me, with a single user and a
> > file sitting behind the RPC Server.  There is probably an issue where
> > a user may lose their changes if they lose their connection to the
> > server.
> 
> If you back onto the database backend on the remote side, then stores
> are incremental, and should survive the loss of connection.

True.  However currently I still need to go through the engine, since
there is no way to have one Backend call another Backend directly..
The backends are specifically designed to interface to an engine.

> > Also, I don't have any support for the pricedb.
> 
> neither does the sqldb; I was holding off on that until there's a
> report that requires prices.

Fair enough.

> > I'll send patches probably this weekend or early next week.
> 
> what directory? src/experimental? a subdirectory of src/engine ?

Most of the code is in src/engine/rpc; with a few minor changes
elsewhere to hook it in.

> --linas

-derek

-- 
       Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
       Member, MIT Student Information Processing Board  (SIPB)
       URL: http://web.mit.edu/warlord/    PP-ASEL-IA     N1NWH
       warlord@MIT.EDU                        PGP key available