Questions about the Backend Interface

Dave Peticolas dave@krondo.com
Mon, 05 Mar 2001 21:26:00 -0800


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.


> 	1) What is the purpose of the trans_rollback_edit() method?  I
>            can't seem to find any information on it, and as far as I
>            can tell nothing actually implements it.  My only guess is
>            that it's the opposite of "begin_edit" when there aren't
>            any changes (so, it's basically a "commit" without making
>            any changes to the transaction.  Is this true?

The rollback is supposed to undo any changes which have been made
since TransBeginEdit and restore the transaction to its original
state. Restoring the data is actually done by the engine, so I'm
presuming that backends would implement this by releasing any locks,
etc. that were created by trans_begin_edit. Presumably, single user
backends have no need to implement this callback. Linas will know
more about this, though.


> 	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.

Again, this hasn't been added yet. As Linas is starting to work on
multi-user support for the sql backend, now is the time to explain
what functionality the RPC backend needs as well.


> 	3) The 'sync()' operation seems to be an extremely heavy
>            operation, especially for a networked backend.

The operation is probably going to change. It is invoked by both
'Save' and 'Save As' functionality. But backends which implement
the 'fine-grained' backend calls (like the sql backend) don't
need to do anything during a 'save'. So the call will probably
be split into two calls for that reason.

dave