Is it possible for a request from one user to be executed over different channels?
Sent by FoxWeb Support on 12/01/2003 05:31:49 PM:
Each channel is a separate instance of VFP and can only execute a single request at a time, but requests can be executed simultaneously accross channels. Whenever a FoxWeb request is received by the Web server, it is passed on to the FoxWeb Broker, which assigns it to the next available channel. If all channels are in use, then the request is queued and is served as soon as a channel becomes available. This is transparent to users, who simply receive the requested data as soon as the request is executed by FoxWeb.
Synchronization issues between FoxWeb channels are exactly the same as what you would find when programming for multiple users accessing the same tables on a network file server. It is the programmer's responsibility to handle conflicts between the various channels using the techniques described in the Programming for Shared Access chapter of the VFP documentation.
Private VFP memory variables are not preserved between hits on the same channel (or across channels). Variables and objects defined in your scripts will not be available in the next request unless they are defined as public. You should NEVER use public variables to save user-specific information between hits. Whenever you declare a variable as public, this variable remains in memory ONLY for that particular channel, even after the request is processed. This means that:
In order to pass information between hits you need to use one of the techniques outlined in the "Session Management" topic of the FoxWeb documentation (http://www.foxweb.com/document/state.htm). Some of these techniques are illustrated in the ContactMine example.
The only situation where public memory variables can be used is if they contain information that is not specific to a particular user or application. For example, you should define your objects as public if their startup code takes too long and you do not want to define them at the beginning of every hit. If you chose to define your objects as public you should make no assumptions about the state of these objects (or even about whether they exist). Before using the objects your code should first check for their existence (IF TYPE('ObjectName') = 'O') and then, either create them, or re-initialize all properties.
Sent by Sergey Barinov on 12/01/2003 03:06:38 PM:
Does FoxWeb process WWW requests one at a time, or does it somehow try to Multitask them (with in the same channel or between channels).