|
|
|
|
|
- Overview
- Importance of pre-launched sessions
- Principle of a request for displaying an Active WEBDEV Page
- Benefit of pre-launched sessions
- Implementation
- Steps to follow
- Enable management of pre-launched sessions
- Correcting errors specific to pre-launched sessions
- Enabling pre-launched sessions on the server
A pre-launched session is a Web site (or Web service) session launched automatically on the Web server from the WEBDEV Application Server. The use of pre-launched sessions speeds up page display by anticipating time-consuming processes such as database connections and page configuration loading. Pre-launched sessions can be used with: - WEBDEV sites in Session mode,
- WEBDEV AWP sites,
- SOAP web services and REST web services.
New in version 2025For web services, it is also possible to use "pre-launched session recycling".
This operating mode is identical in any case. Note Pre-launched sessions are only allowed on the unlimited server or 10 connections. They are not enabled on the development computer. Importance of pre-launched sessions Principle of a request for displaying an Active WEBDEV Page To understand the importance of pre-launched sessions (especially for Active WEBDEV Pages), let's take a look at the principle of Active WEBDEV Pages. When a Web user performs a request from an Active WEBDEV Page, the following operations are performed: - The request is transmitted from the browser to the Web server.
- The Web server studies the request.
- The Web server transmits the request to the WEBDEV Application Server.
- The WEBDEV Application Server:
- loads the project corresponding to the page.
- runs the project initialization code, then the page code.
- returns the response to the Web server.
- The Web server returns the response to the browser.
Benefit of pre-launched sessions When displaying an Active WEBDEV Page, each call to the WEBDEV Application Server is entirely independent. Consequence Each time a request is made (and therefore each time a page is changed or an Ajax call is made), the WEBDEV Application Server reloads the project and re-executes the initialization code. The project initialization code often runs "long" operations: - connecting to the database,
- loading configuration files,
- ...
The pre-launched sessions ask the WEBDEV Application Server to perform these operations in advance. Therefore, when the request of the Web user reaches the WEBDEV Application Server, the application server only has to run the request and to return the result. Using pre-launched sessions results in shorter response times, since part of the code is executed in advance. However, pre-launched sessions do not reduce server load (the code is still executed) and do not replace the optimization of initialization code. New in version 2025Additional option for web services: In the case of web services, an additional option can be activated: recycling of pre-launched sessions. If this option is enabled: - At the end of the web service call, the WEBDEV Application Server does not terminate the pre-started session associated with it.
- The "Recycle a pre-launched session" event associated with the project is then executed. This event can, for example, reset variables or connections specific to the client that called the web service.
- WEBDEV Application Server waits for connection to the web service (in pre-started session mode).
Enable management of pre-launched sessions To activate the management of pre-launched sessions: - Display the description of the project configuration (of your site or web service):
- In the "Project Explorer" pane, select the desired configuration.
- From the context menu, select "Description".
- On the "Options" tab, check "Enable pre-launched sessions on the Application Server".
New in version 2025For a web service, you can also activate connection recycling by checking the "Recycle pre-launched sessions" option. - Validate. The project is recompiled.
To manage pre-launched sessions, several events are associated with the project: - "Initialization", a project event run before the request reaches the WEBDEV Application Server. This code is run when starting the pre-launched session.
- initialization in pre-launched session mode, executed when the WEBDEV Application Server processes the request.
New in version 2025the event "Recycling a pre-launched session" if session recycling has been requested for the Webservice configuration".
If your project configuration uses pre-launched sessions, certain functions can no longer be used in the project initialization code. The corresponding errors are displayed in the "Compilation error" pane. Reminder: To display the "Compilation errors" pane, under the "Home" pane, in the "Environment" group, pull down "Panes" and select "Panes" then "Compilation errors". Correcting errors specific to pre-launched sessions The errors of pre-launched sessions indicate which WLanguage functions are not allowed in the "Initialization" project event. To correct errors specific to pre-launched sessions, simply move the corresponding code to the "Initialization when connecting to a pre-launched session" event. When the site or web service is compatible with the pre-launched session mechanism, it can be deployed and pre-launched sessions activated on the WEBDEV Application Server. The list of functions not to be used in project initialization code is as follows:
| | ASPDisplay | Calls an external ASP script and returns the result page in the current browser window. | BrowserIPAddress | Returns the IP address of the client computer connected to the WEBDEV website. | BrowserName | Returns the name of the browser of the Web user ("user agent"). | BrowserPlatform | Returns the user's browser platform. | BrowserType | Returns the type of browser used by the Web user. | BrowserVersion | Returns the version of the browser used by the Web user. | CancelAWPContext | Deletes from the AWP context a variable that was added by DeclareAWPContext. | CancelWebserviceContext | Deletes from the web service context a variable added by DeclareWebserviceContext. | CertificateClientInfo | Returns information about the certificate used by the client computer. | ConfigureAWPContext | Configures the operating mode of the AWP context. | Confirm | Displays a message in a standard dialog box that proposes "Yes", "No", "Cancel" and returns the user's choice. | ContextClose | Closes a page context. | ContextOpen | Opens a new page context without returning the information to the browser. | CookieRead | Retrieves the value of a cookie saved on the computer of Web user. | DeclareAWPContext | Used to declare a list of variables whose values will be persistent between successive displays of Active WEBDEV Pages. | DeclareWebserviceContext | Used to declare a list of variables whose value will be persistent between the successive calls to a web service. | ExecuteDelayedProcedure | Runs a delayed procedure (in the WEBDEV Application Server). | FileDisplay | Displays a file in the user's browser. | FramesetDisplay | Displays a WEBDEV frameset in the user's browser. | FramesetRefresh | Refreshes a frameset displayed in the user's browser from the context on the server. | FramesetUse | Displays a WEBDEV frameset in the user's browser and closes all the current page and frameset contexts. | FreeAWPContext | Frees the AWP context in advance (on disk) to allow the other call on the same AWP context to be processed in parallel. | GglConnect | Manages authentication on a Google server (via the "OAuth 2.0" authentication mode). | gpwOpen | Opens the User Groupware login window or page. | IdentifierAWPContext | Returns the identifier of AWP context. | ImageArea | Returns the number of the image area clicked by the Web user. | ImageXPos | Returns the horizontal position (X) of the mouse cursor in relation to the specified Image control. | ImageYPos | Returns the vertical position (Y) of the mouse cursor in relation to the specified Clickable Image control. | OKCancel | Displays a message in a standard dialog box that proposes "OK" and "Cancel" and returns the user's choice. | PageCloseDialog | Closes the current page. This page was opened by PageDisplayDialog. A return value can be returned to the calling page. | PageDisplay | Displays a web page in the user's browser. | PageDisplayDialog | Displays a page in modal mode. This function is used to establish a dialog with the user. The page is displayed in the foreground while the opening page is displayed in the background, grayed by the DDW mechanism. | PageParameter | Returns the value of a parameter passed to the current page. | PageRefresh | Refreshes a page displayed in the user's browser from the context on the server. | PageUse | Displays a WEBDEV page in the user's browser and closes all page contexts currently open on the server. | PHPDisplay | Calls an external PHP script and returns the result page in the current browser window. | rssDisplay | Builds a RSS feed and returns the content of the RSS feed to the client. | ScriptDisplay | Calls an external script or page (.php, .asp, .mhtml or.mht) and returns the result page in the current browser window. | StringDisplay | Returns a specific string (or a buffer) to the client browser in response to a request. | UploadCopyFile | Saves a file "uploaded" by the user to the server. | UploadFileName | Returns the name of a file "uploaded" by the Web user. This file must have been uploaded: - via an "Upload" edit control.
- via a single-file or multi-file Upload field.
| WebserviceClientIPAddress | Returns the IP address of the computer using and calling the web service. | YesNo | Displays a message in a standard dialog box that proposes "Yes" and "No" and returns the user's choice. |
Enabling pre-launched sessions on the server To activate pre-launched sessions for a site or web service: - Start the WEBDEV administrator.
- Go to the "Configuration" tab.
- Check "Allow pre-launched sessions.". By default, all the sites and web services have 0 pre-launched sessions.
- Select the site or web service to be configured ("Sites" tab or "Webservices" tab).
- In the site parameters ("Parameters" option in the "Sites" tab) or Webservice parameters ("Parameters" option in the "Webservices" tab), specify the maximum number of pre-launched sessions to be used.
- Validate.
Remarks: - Pre-launched sessions are counted in the total number of connections to the site (or to the web service). This information must be taken into account when configuring the WEBDEV Application Server.
- The number of pre-launched sessions to be defined depends on the server usage and the number of requests.
- When a user logs in (sites in Session mode) or displays a page (AWP sites), the WEBDEV Application Server uses a pre-launched session of this application, if any. Otherwise, the WEBDEV Application Server launches a normal session, as if the site didn't have any pre-launched sessions.
- The number of available pre-launched sessions is checked every second, per site. Therefore, the number of pre-launched sessions depends on the number of connections (Session mode) or the number of times a page is displayed (AWP sites) per second.
- If a session takes longer than one second to (pre)launch, the number of pre-launched sessions actually available decreases.
New in version 2025Webservices with session recycling: - sessions are not recycled in the event of a problem (e.g. WLanguage error).
- sessions can be recycled a maximum of 200 times. Beyond that, the usual system of pre-launched sessions is used.
- the EnModeRecycling function lets you know whether the code currently being executed has been executed since the "Pre-launched session recycling" event.
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|