Efficient server handling of multiple requests from a web browser
First Claim
1. A computer program product comprising a computer usable medium tangibly embodying computer readable program code means implementable on a web application server system for receiving and processing an initial request for a URL from a client and for receiving a subsequent set of requests, the subsequent set of requests being for the URL and from the client, and being initiated before the completion of the processing of the initial request, the web application server system allocating an associated thread for each request received, each request received having a specified client-server connection, the computer readable program code means comprising:
- code means for processing the initial request to generate a result for communication to the client, code means for suspending the execution of the threads associated with the subsequent set of requests, and code means for, on termination of the processing of the initial request, utilizing the client-server connection specified for the last received request in the subsequent set of requests to communicate the result to the client.
1 Assignment
0 Petitions
Accused Products
Abstract
A system and method for handling multiple identical requests received by a server from a client by a web application server. When multiple requests for the same URL are received by a web application server from the same client browser which results in the allocation of multiple threads on the server to handle the requests, a response to the client is obtained from the processing carried out by the first thread launched by the web application server. Results of the initial thread are passed to the client using the last opened connection between the client and server relating to the client'"'"'s request for the URL. Other threads are placed in a wait state and are deallocated, at the earliest opportunity, where possible.
-
Citations
9 Claims
-
1. A computer program product comprising a computer usable medium tangibly embodying computer readable program code means implementable on a web application server system for receiving and processing an initial request for a URL from a client and for receiving a subsequent set of requests, the subsequent set of requests being for the URL and from the client, and being initiated before the completion of the processing of the initial request, the web application server system allocating an associated thread for each request received, each request received having a specified client-server connection, the computer readable program code means comprising:
-
code means for processing the initial request to generate a result for communication to the client, code means for suspending the execution of the threads associated with the subsequent set of requests, and code means for, on termination of the processing of the initial request, utilizing the client-server connection specified for the last received request in the subsequent set of requests to communicate the result to the client. - View Dependent Claims (2, 3, 4)
-
-
5. A computer-implemented method for a web application server system for receiving and processing an initial request for a URL from a client and for receiving a subsequent set of requests, the subsequent set of requests being for the URL and from the client, and being initiated before the completion of the processing of the initial request, there being an associated thread in the web application server for each request received, each request received having a specified client-server connection, the method comprising the steps of:
-
a. processing the initial request to generate a result for communication to the client, b. suspending the execution of the threads associated with the subsequent set of requests, and c. communicating the result to the client on termination of the processing of the initial request, utilizing the client-server connection specified for the last received request in the subsequent set of requests.
-
-
6. A computer-implemented method for a server to receive and process multiple requests from a client for a URL made using an HTTP protocol, comprising the steps of:
-
a. receiving a first request for the URL from the client;
b. allocating a first thread to process the first request and to generate a response;
c. receiving, prior to the first thread generating a response, a subsequent set of requests for the URL from the client;
d. allocating an associated thread for each one of the subsequent set of requests, each thread being executable to initiate a reply to the associated request by a specified connection to the client and using an associated response buffer, and for each newly allocated associated thread for the subsequent set of requests;
i. generating a terminate event for any previously active associated thread for the subsequent set of requests, ii. placing the newly allocated associated thread in a wait state to wait for an event e. executing, following the generation of the response by the first thread, the following steps;
i. transferring the response to the response buffer associated with the thread for the last request which is in a wait state, ii. sending a handle response event to the thread associated with the last request which is in a wait state, whereby the indicated thread will wake up and reply to the client request with the contents of the associated response buffer, by the specified connection to the client of the associated request, and f. terminating the first thread. - View Dependent Claims (7)
-
-
8. A computer-implemented method for a web application server to receive and process multiple requests from a client for a URL made using an HTTP protocol, each request having an associated thread in the web application server and a specified client-server connection, the method comprising executing the following steps on the server for the associated thread for each request:
-
a. creating, for the associated thread, a client context data object containing the URL, an identifier for a response object for the request, and a current thread identifier, b. obtaining a client identifier for the client, and saving the client identifier in association with the client context data object for the associated thread, c. determining if there is an outstanding request from the client by interrogating a globally accessible client table, the client table having entries for clients, each entry referencing the client identifier and the client context data object for the last received request, d. updating the client table to include the client identifier and the client context data object, thereby recording the request as the outstanding request for the client, e. in the case when there is an outstanding request from the client, i. sending a terminate event to the thread associated with the previously outstanding request, whereby any such thread other than the first such thread is woken from a wait state and deallocated, and ii. determining if the previous request was for the same URL, and in such a case, putting the associated thread into a wait state to wait for an event, whereby when the associated thread receives a handle response event, the associated thread will clear the client table entry for the client, reply with the contents of the associated response buffer using its specified client-server connection and will be deallocated, and when the associated thread receives a terminate event, the thread will be deallocated. f. in the case when there is no outstanding request or when the previous request was for a different URL;
i. executing the business logic associated with the request, ii. upon completion of the execution of the business logic, determining if any new requests have been received from the client, iii. in the case when no new request has been received, clearing the client table entry for the client and replying with the contents of the associated response buffer using the specified client-server connection of the request and deallocating the associated thread, iv. in the case when a new request has been received, determining if the new request is for the URL of the request of the associated thread, and in the case when the new and current requests are for the same URL, sending a handle response event to the thread identified by the thread identifier in the data object specified by the client table, and in the case where the requests are for different URLs, deallocating the associated thread. - View Dependent Claims (9)
-
Specification