Questions about the Backend Interface
Dave Peticolas
dave@krondo.com
Tue, 06 Mar 2001 14:33:26 -0800
Derek Atkins writes:
> Dave Peticolas <dave@krondo.com> writes:
>
> > We must be careful here. Presumably the Backend is going to receive
> > information that the engine needs to be updated by some out-of-band
> > mechanism like a signal. Right now, the Backend must not mess with
> > the engine outside of the normal flow of control. Everything outside
> > the engine has been written under the assumption that the engine
> > cannot change outside of the current thread of control. Relaxing
> > that assumption would require a significant amount of work.
> >
> > I think it would be much easier if the Backend informed the engine
> > that it needs to be synchronized with the external source, and then
> > the GUI event loop would poll the engine and, if needed, tell it to
> > synchronize with the external source.
>
> This works well for Transactions. I could just have the server
> send a list of all the 'changed' transactions. The backend can just
> save that transaction list and signal that there is update work to be
> done. Then it can request the updated list of transactions from the
> server.
>
> I suppose I could do the same thing with accounts. However I'm going
> to have to change how I think about it. In particular, I need to
> change how I cope with account parenting. Currently I'm only
> transfering complete AccountGroups.. If I'm going to transfer a
> single account at a time, I'm going to need a way to signal that the
> parent changed. Unfortunately an AccountGroup doesn't have a GUID, so
> I really need to grab account->parent->parent->guid to figure out who
> my parent is (and assume that I'm a top-level account is
> account->parent->parent is NULL).
Yes, that is the case. As long as the change happens in the normal
flow of control, the GUI should handle reparenting gracefully.
dave