another multi-user "solution"?

Dan Shafer revdan at danshafer.com
Mon Apr 25 14:24:07 EDT 2005


Two comments.

First, check the total number of "records" you need. I think that there 
are (at least used to be) upper limits on the total number of files in 
a directory in some OSes. (That may have only applied to Mac Classic, 
but it's worth being sure about up front.)

Second, using the semaphore file approach that Jacque suggested is 
eminently doable and quite simple to implement. It would be pretty 
easy, e.g., to have a single file that just contained a list of all the 
card numbers currently open for editing and checking it before allowing 
a user to edit a card's contents. Equally easy and perhaps a little 
better from a robustness perspective would be to create a text file 
called, e.g., card.lok, where card is the name or ID of the card, for a 
card when it's opened for editing and then deleting that file when the 
user's done. In either case, a pretty simple command could check to 
ensure the card the user asks to edit isn't already being edited and 
take some appropriate action.


On Apr 24, 2005, at 12:56 PM, J. Landman Gay wrote:

> On 4/24/05 10:39 AM, Rob Cozens wrote:
>
>> I concluded that, since Transcript reserves write capability for the 
>> first person to open a stack until she closes it, any scheme that 
>> requires concurrent update by more than one user meant opening and 
>> closing the data stack with each read or write--which I considered 
>> unacceptable overhead.  But note that all read-only stacks can be 
>> shared by multiple users now.
>
> Actually, while HyperCard works that way, Revolution lets multiple 
> users open a stack and write to it. If two people have the stack open 
> at the same time, either one can overwrite the other's changes. Record 
> locking has to be scripted; often accomplished by writing a small text 
> file to disk that tracks usage.
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Dan Shafer, Co-Chair
RevConWest '05
June 17-18, 2005, Monterey, California
http://www.altuit.com/webs/altuit/RevConWest



More information about the use-livecode mailing list