V4WS need to use semaphores when READ from table in case cause simultaneous indexing?

Steven srt at bigpond.net.au
Thu Nov 25 21:32:24 CST 2004


>Use semaphore also for safe.
>
>But taking into account that OS 9 is cooperative.
>Exists chance that you can avoid this step.
>You can self test if it works.

Ruslan,

are you saying that the only time I can allow simultaneous access to a
table is if there will be no change in the index of the table as a result
of allowing access?! Then if any action (add record, update, even READ!)
can cause the index to be modified I must only allow one user at a time
access to the table??? Before I thought I just had to take care to do
"record locking" (approximated in OS 9 by using semaphores labelled for the
record in question) - now you seem to be saying I need to do "table
locking" because the index might get messed up if there are simultaneous
requests to update it?

Is this just a problem for the OS 9 version (subject to testing) or is this
true for all platforms? It seems a limitation to me since you can't have
simulataneous access to a table except when you are not doing anything that
can change the index?

Specifically, will this be a problem for OS X when eventually we have
WebSiphon 3/V4WS for OS X? If so then I need to fix code now regardless of
whether it is safe in OS 9 or not.

Steven



>Hi Steven,
>
>> I have some confusion about when semaphores are needed when using
>V4WS in
>> WebSiphon.
>> 
>> I know if you are going to update or delete a record, you need to use
>> semaphores to prevent another template updating or deleting the same
>record
>> at the same time.
>> 
>> But what if I just read records from a table by doing
>> cursorRef=Select(...), and this causes an index for the search field to
be
>> created? If two templates try to read records from the same table at the
>> same time, couldn't this cause simultaneous index requests?
>
>Use semaphore also for safe.
>
>But taking into account that OS 9 is cooperative.
>Exists chance that you can avoid this step.
>You can self test if it works.









More information about the Valentina mailing list