12 Corel WebServer: Interaction between Paradox and Corel WebServer
VERSIONS: P8 and later

SUBJECT: Paradox web request treatment operations

BY: VLADIMIR MENKIN
Date: 30 November 2004

Paradox is a single-threaded program, CorelWebServer (CWS) - multithreaded. Their interaction can be described as following:

CWS receives a request and transfers it to Paradox. If, during the request treatment by Paradox, CWS receives another request, it handles it and put it into internal queue (FIFO). When Paradox finishes handling the first request, it returns the result to CWS. CWS starts to transfer the result to the browser, and, at the same time, passes the next buffered in the queue request to Paradox. If Paradox returns the result for this request back to CWS until CWS finished transferring the first result to the browser, CWS simultaniously transfers the second result in another thread.

So, CWS can recevie requests (and put them into queue) and transfer results back to the browser independently from Paradox.

There is one thing you should know. If Paradox processes a request when another requests wait in the CWS queue , and OPAL code in Paradox issues sleep(), formVar.open(), reportVar.open() or some other commands, the first request goes to the Paradox stack, and Paradox starts to process the next request. When this second request is handled, Paradox resumes prosessing of the first (postponed) request. This means that in OPAL libraries which handle requests you should use *global* variables (if any) with extreme care.

To index