Questions about the Backend Interface
Tue, 6 Mar 2001 14:25:12 -0600 (CST)
It's been rumoured that Dave Peticolas said:
> I'll answer as best I can. Linas is more familiar with the Backend
> code so he will be able to give more information.
> Derek Atkins writes:
> > So, I've been working on implementing an RPC backend, but I've
> > got a few questions:
> > 0) There appears to be no way to allow the backend to callback
> > to the client to request a username/password or some other
> > authentication. I don't like the "hack" of putting the
> > username and password into the URL.
> I think Linas is planning on adding that in for the sql code so the
> RPC backend should be able to use the same hook. The dialog has already
> been created, it just needs to be added to the Backend infrastructure.
Any prefered API?
gnc_login(char * username, char * passwd) ?
This isn't enough for e.g. kerberos authentication, but maybe enough
> > 2) There appears to be no way for the backend to trigger an
> > event to the engine/GUI if something happens. For example,
> > I'd like the backend (server) to signal to the engine
> > (client) that some information changed, or perhaps even
> > pushing the changed information.
Terminology, as used in gnucash:
-- backend: the part of the client that knows how to talk to servers.
-- engine: the part of the client that provides a data cache and a
uniform API to the GUI.
To answer your question: in practice, the backend can 'push' new data
into the engine, because it has access to all the pointers & structures.
In principle, there is not yet any set policy: is the engine in charge
and telling the backend to do its bidding (including optionally handling
events that the backend generated?) Or is the backend in charge,
mangling engine data as it sees fit?