another multi-user "solution"?
Kurt Kaufman
kkaufman at snet.net
Tue Apr 26 07:58:49 EDT 2005
> sims wrote:
>> At 10:10 PM -0700 4/25/05, Richard Gaskin wrote:
>>
>>>
>>> I'm not sure if this will work for you, but lately I've been using
>>> tab-delimited text for the sorts of things I used to use cards for. I
>>> maintain a one-card window for display, pouring data into the fields
>>> as needed, but the data itself is maintained as just straight text.
>>> Fast, flexible, and about as small as it can be....
>>
>> Is this usually reading from text files or using custom properties?
As I mentioned, we need to have more than one user accessing parts of
the data concurrently, so I needed the data itself to be saved outside
of the user-operated stacks. I also wanted some sort of backup while
the data was being worked on. So I decided to try multiple text files,
one for each record.
When FirstRecord.txt is opened, a BusyFirstRecord.txt is created that
accomplishes two tasks: all of the existing data from FirstRecord.txt
is backed-up to BusyFirstRecord.txt, and the latter also serves as a
temporary block to any subsequent users that try to access
FirstRecord.txt. After user-updated data is saved to FirstRecord.txt,
BusyFirstRecord.txt is then deleted. If there is a problem (i.e.
user-operated stack crashes or computer problem, etc.), then the
original data is still available in BusyFirstRecord.txt, which can be
easily renamed or fixed in a text editor.
This app. is simply a "Rolodex" of accounts receivable; data across
accounts are not needed; it would be cumbersome (but possible) to do
calculations by opening/closing all of the accounts in succession using
the method described above.
So far I've accessed a single group of records concurrently from Mac
and Windows XP standalones (via VPC), and the mechanism seems to work
well. Today I'll try it in the real world and see if I can "break" it.
Kurt
More information about the use-livecode
mailing list