Questions about the Backend Interface

Derek Atkins warlord@MIT.EDU
06 Mar 2001 10:38:43 -0500


Thanks.

More responses inline...

Dave Peticolas <dave@krondo.com> writes:

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

That's what I thought.  Since all the edits are done in the engine
cache, the backend really just needs to unlock the structure.  Is
there any reason that we don't have a rollback on an account edit,
too?

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

Fair enough...  Although I'm not exactly sure how 'save-as' will work
for a fine-grained backed.  For those backends the current file would
always be up-to-date with the engine cache, so you're right, save
would do nothing, and save-as would just copy the data elsewhere.
However 'save-as' would never leave the original file as it was before
any edits were made.

I thought of another issue..  There doesn't appear to be a way for the
backend to notify the engine that and account or transaction was
deleted out from under it.  This is probably related to question #2
below.  Unless I'm missing something, during a sync operation there is
no way to tell the difference between a "new" object or an object that
was deleted in the backend.

Thanks,

> dave

-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