Programming Reference Manual
 
Syntax
 
object.Delay
 
Description
Signals the web server to not create and send the HTTP response after returning from the event.
 
Part
Description
object
Evaluates to a ParentResponse Object
 

Data Type

Boolean

Remarks

The value for this property is already set in the configuration of your web server. When you enable the "Force real-time" option in the CBBS/32 WebServer Configuration dialog window, this property will be set to False. Otherwise, the value is set to True.
 

Multi-threaded Use

Like most controls, the web server control in the CBBS/32 Web Server application is apartment model threaded. All events fire on the same thread that created the control. Consequently, any processing that takes place within the body of an event, such as the Get event, normally block processing of all other events fired on the same thread. Thus, any lengthy database query made within the body of an event could negatively impact other connections, because those additional connections would not be serviced until the first was completed. Consequently, the design is a single control with asynchronous support.
From within any HTTP event, a new thread can be spawned using MTS or some other mechanism that ultimately responds to the event, while the user thread returns to the WebServer Control to process other requests. The mechanism is accomplished by setting Delay to True, creating an object on a new thread, passing it a reference to the Response Object, and calling TrmPrint once the lengthy operation is complete.
 
Although this approach is less "pure" than having a dedicated thread for each TCP connection, it is useful for servers that anticipate high loading, while maintaining simplicity and speed of operation for developers anticipating medium to light loads. For heavily loaded website, use a computer with a fast Intel i9 or Xeon type processor.
 

Application Partitioning

Besides the single application, multi-threaded approach discussed above, the compiled nature of your web application allows you to partition your application into multiple tasks, each listening on unique ports and operating independent of other applications. For example, suppose you have a number-crunching task that is not often exercised, but when it is it needs to be on it's own thread. You can rund a second CBBS/32 application for this task, have it listen on port 81, and link to it whenever it needs to be run. Your main CBBS/32 application never notices because your second application is running in its own task space.
 
See Also