Saving data to stacks via CGI

Björnke von Gierke bvg at mac.com
Sun Dec 4 17:40:52 EST 2005


Unfair asking for my help explicitly ;-)

The ChatRev server is no CGI, it's a plain RunRev stack. It does not 
have the ability for simultaneous writes, as every message the server 
receives is handled in one instance (not threaded). Of course you could 
make it more complex, so that such situations could happen, but right 
now the server is like a single handler, not like several different 
handlers.
CGI however have for each access it's own instance, thus they can 
easily overwrite a shared resource, like a stack. To prohibit that, you 
should try to manage the access. For example you could have each of 
your CGI's save a little file named "prohibited".If that file already 
exists, then your CGI's should abort the writing to the stack process, 
or retry it later. Of course you'd need to delete the file after 
writing the information into your stack.

I hope this gives you some idea how to handle multithreaded write 
access to a stack.

greetings
Björnke

On Dec 04 2005, at 23:08, Alejandro Tejada wrote:

> ...
> Pierre Sahores and Bjorke had a lot of experience in
> this
> area, so maybe they could answer too.
>
> ...
>
> Bjorke manages the RevChat server, so he know what
> happens when multiple users try to post messages at
> the same time. Did they get queued in some arbitrary
> order? or Some of them get lost in the transmission
> ...



-- 

official ChatRev page:
http://chatrev.bjoernke.com

Chat with other RunRev developers:
go stack URL "http://homepage.mac.com/bvg/chatrev1.3.rev"




More information about the use-livecode mailing list