CGI and DestroyStack property
Richard Gaskin
ambassador at fourthworld.com
Thu Apr 27 21:23:51 CDT 2006
Tariel Gogoberidze wrote:
>
> On Thu, 27 Apr 2006 08:42:30 -0700, Richard Gaskin wrote:
>
>> It sounds like you could safely use a separate stack file for each user,
>> which might also bring a modest performance boost since it would only be
>> loading the data for the current user.
>>
>> I have a bug reporting tool I'll be demoing at RevCon which uses that
>> approach: each user has a folder on the server, and while they can read
>> files from any folder they only write to the ones in their own.
>>
>> In your case that may be all you need. With the bug tool I also needed
>> to allow admins to write to those files, so to avoid conflicts I just
>> write a flag file to the folder to note that it's being edited, and any
>> attempt at write-access to the file first checks for that flag and
>> reports to the user if the file they want is in use. Once the save is
>> done the flag file is deleted.
>
> Thanks Richard, nice tips. I must have one stack however, because it
> summarizes quiz results for all students and sends summary back to each
> student.
> So, I guess my option is to manage users access through flag in external
> file and wait in CGI script either in repeat loop or with send in time
> until access to stack is allowed.
The stay-resident option will bring you speed, but since the only thing
a given user does with other user's stacks is read them I see no penalty
to reading them all, collecting what you need, and report that back to
the user.
This will work with just about any configuration, and if later you
migrate to FastCGI or other stay-resident scheme you'll also enjoy a
performance boost, but anything less needn't shut you down in the meantime.
--
Richard Gaskin
Fourth World Media Corporation
___________________________________________________________
Ambassador at FourthWorld.com http://www.FourthWorld.com
More information about the metacard
mailing list