HP3000-L Archives

November 1996, Week 2

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Brian White <[log in to unmask]>
Reply To:
Brian White <[log in to unmask]>
Date:
Wed, 30 Oct 1996 09:48:02 -0500
Content-Type:
text/plain
Parts/Attachments:
text/plain (41 lines)
Rick Winford wrote:
>
> Greetings to all:
>
> I'm working with a customer developing a fairly large-scale application
> using multiple Turbo databases (like about 15).  We're trying to establish
> a mechanism to enforce locking rules, since we are locking multiple
> data bases over the life of a transaction.  I want to have a "standard"
> which dictates the order every program uses to lock the multiple databases,
> and then have some way to enforce programs to do that.  We are localizing
> all DBLOCK calls into one copylib, so enforcement should be rather easy,
> if I can just figure out some nifty way to do it.
>

Here's a strategy I've used with success:

In each database, determine what the "most active" dataset will be (in
terms of locks). Then rank the ~15 datasets (one per base) in order by
expected lock activity. This will be your primary sort of dataset
locking order. If a lock is  going to fail, it is more likely to be one
of these datasets than any other sets. We found success locking at the
set level, due to the  inclusion of 4GL languages and 3GL languages in
the application.

The next "sort" would be an alphabetical sort of Image Master datasets.
Then sort the details alphabetically.

The first lock would unconditional, any further locks done while the
first is still held would be conditional. (You can set up a loop that
retries up to x times after pausing y seconds between locks.) If
a lock fails to be achieved, unlock the databases that you have locked
already.

Hope this helps. E-mail me if you need more detail.
--

Brian J. White
[log in to unmask]

"A paradox is a contradiction in which you take sides -- both sides! "

ATOM RSS1 RSS2