reference another stack
Jeanne A. E. DeVoto
jeanne at runrev.com
Sat Jan 11 22:30:01 EST 2003
At 6:55 PM -0800 1/11/03, Howard Bornstein wrote:
>This raises another question I've been wondering about, since the app I'm
>developing may face this situation.
>
>If a writable stack is placed on a server, is there a way to insure that
>changes made to it by multiple people simulataneously are all kept?
No, not really. If you need multi-user access, a database is generally the
way to go - rather than a stack.
>>From your description, if two people are simulataneously writing to the
>stack, probably only one of their changes will be saved (the last person
>to save the stack back--the previous person might have saved their
>changes but it would be overwriten by the last save).
That's pretty much the size of it.
>What kind of strategy could one use to insure that any changes
>made to the stack appear on the server, even if someone else is
>using the stack at the same moment?
I suppose you could use some sort of semaphore system - for example, update
a text file with the date & time on the server whenever the stack is saved,
and have all the clients check that file periodically and reload the stack
if it's been changed.
I don't think there's a good way to create an ideal solution for this,
though - you'd need to handle all the usual problems of a database system
(what to do about collisions where two people are trying to save at the
same time; how to deal with the situation where someone's made changes to
their copy since the previous save-and-reload).
--
Jeanne A. E. DeVoto ~ jeanne at runrev.com
Runtime Revolution Limited - The Solution for Software Development
http://www.runrev.com/
More information about the use-livecode
mailing list