[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Transactions and locking



Falko,

I was thinking that you must be facing the same problem in the infozone
project as when integrating with Cocoon you have to give it an in memory
DOM.
So how are you handling it over there. Also, if you could give any more
information on Infozone and the time when you plan to release it I would
appreciate that.

Thanks

Rajiv

-----Original Message-----
From: Falko Braeutigam [mailto:falko@softwarebuero.de]
Sent: Thursday, May 11, 2000 2:59 AM
To: Rajiv Rawal; 'ozone-users@ozone-db.org'
Subject: RE: Transactions and locking


On Wed, 10 May 2000, Rajiv Rawal wrote:
> OK here goes the scenario.
> 
> We load the document / fragment the result of a query into an in-memory
> version. At this point we may want to lock the document in the database on
a
> specific level (Read only if no updates are going to be made) or (Write
lock
> if we don't want another user to read as well). Also need to provide some
> time out functionality so that if the user holds on to the lock for too
> long. The user then writes the in memory document / fragment back to the
> database.

The problem is that XML nodes are just to small - the ordinary ozone
single-instance architecture is not very suited for many typical XML apps.
It
isn't possible to control them via RMI because of performance reasons. This
leads to such in-memory vs in-database hacks which introduce exactly the
same
replication problems that we wanted to avoid with ozone.

Anyway, I'm not sure if you really need explicite locks to synchronize your
in-memory and in-database version of the document. When you access the
document
to make the in-memory version a READ lock is set. To set also a WRITE lock
just
call an update method of the document. When the user is done with the
document
he/she may writes something back to the db and commits the entire
transaction.


Falko
-- 
______________________________________________________________________
Falko Braeutigam                         mailto:falko@softwarebuero.de
softwarebuero m&b (SMB)                    http://www.softwarebuero.de